In the module description it says videos "will automatically play the first time they're clicked on".

We've noticed on browsers that block autoplay (e.g.chrome, safari) that it takes 2 clicks to get videos playing. Is there any way around this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milodesc created an issue. See original summary.

milodesc’s picture

Title: 2clicks needed to play videos » Two clicks needed to play videos
ash2303’s picture

If initial sound is not important, a workaround would be to use
mute=1 (Custom YouTube parameters)
parameter. Works in Chrome but without sound.

mfb’s picture

I think it'd be a good idea to add mute, would you or anyone else like to provide a patch?

ash2303’s picture

We don't need patch to add mute option, you can add it using settings. Go to /admin/config/content/mytube, enter mute=1 in (Custom YouTube parameters) setting. Save form & clear cache.

milodesc’s picture

Oh, thanks for the suggestion, Ash2303!

I'll run this by our stakeholders. It's too bad there's no way to have our privacy and have 1-click play.

mfb’s picture

What I was suggesting was making the default parameters autoplay=1&mute=1

ash2303’s picture

In actual none of the options should be applied by default and allow user to add whatever they want. I think autoplay=1 is applied by default to overcome the extra button click that module is masking over embeds.

mfb’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: Feature request » Bug report
Status: Active » Needs review
FileSize
2.32 KB

Realized we need to use the new allow attribute to allow autoplay on embeds.

mfb’s picture

FileSize
3.75 KB

Fix logic - we want to add the allow attribute regardless of the custom size setting.

mfb’s picture

FileSize
3.27 KB

We only need to figure out the default width and height once.

mfb’s picture

FileSize
3.33 KB

Reroll

  • mfb committed 7361eb3 on 7.x-1.x
    Issue #3080372 by mfb, ash2303, milodesc: Two clicks needed to play...
mfb’s picture

Status: Needs review » Fixed

  • mfb committed 7361eb3 on 8.x-1.x
    Issue #3080372 by mfb, ash2303, milodesc: Two clicks needed to play...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.