- Issue created by @pianomansam
- Status changed to Needs review
over 1 year ago 8:17pm 11 August 2023 - First commit to issue fork.
- πΊπΈUnited States nsciacca
Thanks for this! I added a couple other parameters for YouTube when it's used as background image to suppress the controls, set the loop and a playlist param so it continues to play.
- π¦π²Armenia le72 Yerevan π¦π²
Applied the patch, but the background YouTube video is still not autoplay :-(
Using Drupal core 10.2.3 with Media oEmbed Control 2.0.0-beta3. - π¦π²Armenia le72 Yerevan π¦π²
The problem is in HTML::load(), HTML::saveHTML().
The "allowfullscreen" attribute becomes allowfullscreen="" and farther replacement doesn't work. - πͺπΈSpain ipitbiz
I've added a small change to make the patch work, although I'd like to have it reviewed in case anyone has a better solution.
- π¨π¦Canada phjou Vancouver π¨π¦ πͺπΊ
The patch works for me, the video is playing automatically now. Thank you!
- π¨π¦Canada phjou Vancouver π¨π¦ πͺπΊ
Ok changes pushed to the merge request branch.
- π¨π¦Canada phjou Vancouver π¨π¦ πͺπΊ
Ok I pushed a new change reverting the encoding to use a single replace instead. It seems some characters like & are already & but the apostrophe is not. So the previous change broke videos with other special characters.
If we were directly using $dom->saveHTML then the issue would not even occur but since it creates problems with the css placeholders we cannot get rid of the str_replace approach and use saveHTML.
So I went down the road to use another replace to handle that case. The code for the apostrophe is not even ' but ' which I find strange as well.
The str_replace approach might have unexpected issues that we are not aware of, but so far the branch worked very well in that version and I could get all videos that I tested in autoplay.
- First commit to issue fork.
- π§π·Brazil igoragatti
I've reduced the str_replace to change only the src address, since that is the only thing we are changing on the markup I thought it would be cleaner that way
- Status changed to RTBC
2 months ago 12:23pm 5 February 2025 - π³π±Netherlands michaelmol
I can confirm that the https://www.drupal.org/project/media_oembed_control/issues/3380731#comme... π YouTube live videos won't autoplay due to missing "mute" url parameter Active works for youtube videos to support autoplaying.
so please merge the https://git.drupalcode.org/project/media_oembed_control/-/merge_requests...