You need to install the "ubuntu-restricted-extras" package to get rid of the issue.
Do the following steps to install this package:
1. Update the package repository using the following command:
sudo apt update
2. Install the package using the following command:
sudo apt install ubuntu-restricted-extras
3. Close the browser and reopen it. Hopefully, you will not see the problem now.