Project

General

Profile

Actions

Feature #93784

closed

Set muted attribute for videos in Textmedia if autoplay is active

Added by Wolfgang Wagner about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2021-03-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #96320: YouTube Autoplay is not working in ChromeClosed2021-12-10

Actions
Related to TYPO3 Core - Bug #99461: Text&Media - local video don´t autoplayClosed2023-01-05

Actions
Actions #1

Updated by Wolfgang Wagner about 3 years ago

  • 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.

Actions #2

Updated by Martin Kutschker about 3 years ago

Had the same idea. I only wondered if we should let editors try their luck and provide them with a "mute" checkbox.

Actions #3

Updated by Martin Kutschker about 3 years ago

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?

Actions #4

Updated by Riccardo De Contardi about 3 years ago

  • Category set to Frontend
Actions #5

Updated by Richard Haeser about 3 years ago

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.

Actions #6

Updated by Benni Mack over 2 years ago

  • Related to Bug #96320: YouTube Autoplay is not working in Chrome added
Actions #7

Updated by Benni Mack over 2 years ago

  • Status changed from New to Closed

Hey Wolfgang,

thanks for the ticket.

I will close this, as this is now fixed with https://github.com/TYPO3/typo3/commit/fc31824a8dcf53c167f0a8e2b4fb15617f92102b and will be released in the next v10, v11 versions.

Actions #8

Updated by Wolfgang Wagner over 2 years ago

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?

Actions #9

Updated by Ralf Hübner over 1 year ago

  • Related to Bug #99461: Text&Media - local video don´t autoplay added
Actions

Also available in: Atom PDF