google / mediapy

This Python library makes it easy to display images and videos in a notebook.
https://pypi.org/project/mediapy/
Apache License 2.0
389 stars 18 forks source link

Add "muted" attribute to <video> #28

Closed hhoppe closed 1 year ago

hhoppe commented 1 year ago

Web browsers often disable autoplay of HTML video unless the <video> tag contains the muted attribute. I am not sure why this has not been a problem so far; maybe the policy is not applied for (small) videos where the source data is provided in-line using <source src="data:video/mp4;base64,{b64}" type="video/mp4"/>. In our case, the videos do not have sound, so it is safe to always let them start in the muted state when autoplay is on. Perhaps this might resolve issue #27.