Feature #93784
closed
Set muted attribute for videos in Textmedia if autoplay is active
Added by Wolfgang Wagner over 3 years ago.
Updated over 2 years ago.
Description
In most current browsers, autoplay for videos (and audio files) seems to work only if the video has no audio track or is muted. (see https://www.w3schools.com/tags/att_video_autoplay.asp)
Therefore, it might make sense to set the attribute "muted" if the option "autoplay" is activated in the content element "textmedia". The generated code would then be, for example:
<video controls autoplay muted>
<source src="movie.mp4" type="video/mp4">
</video>
Perhaps an additional checkbox would also be possible to set the attribute "controls" or not.
- Subject changed from Set muted aittrubute for videos in Textmedia if autoplay is active to Set muted attribute for videos in Textmedia if autoplay is active
In most current browsers, autoplay for videos (and audio files) seems to work only if the video has no audio track or is muted. (see https://www.w3schools.com/tags/att_video_autoplay.asp)
Therefore, it might make sense to set the attribute "muted" if the option "autoplay" is activated in the content element "textmedia". The generated code would then be, for example:
<video controls autoplay muted>
<source src="movie.mp4" type="video/mp4">
</video>
Perhaps an additional checkbox would also be possible to set the attribute "controls" or not.
Had the same idea. I only wondered if we should let editors try their luck and provide them with a "mute" checkbox.
Not so sure about "controls". What about "loop" and "poster" :)
The latter has an interesting question: should'nt the poster image be stored with the video? If so, do we need an override for the reference?
I'm in favour of sensible defaults, so in that regard I would say: mute it when autoplay is set to true. But... I do think that you should be able that people can set the mute option on non-autoplay videos as well. So having an option to set it (or unset if they want to override the default behaviour) would be great. The downside is that indeed, we should have options for other properties as well which might cause to many options for an editor. So not completely convinced yet. Maybe just mute it and make room for a 3rd party extension to add more options to video's. In that case only if you need those extra options, you install the extension.
- Related to Bug #96320: YouTube Autoplay is not working in Chrome added
- Status changed from New to Closed
Hi @Benni Mack, thanks for the info.
But if I see it correctly, the change only applies to external YouTube videos, but not to locally hosted videos? Or am I missing something?
- Related to Bug #99461: Text&Media - local video don´t autoplay added
Also available in: Atom
PDF