Youtube autoplay on pop-up (is it possible?)

IAR's picture
IAR
Thu, 08/06/2015 - 02:30
#1
Youtube autoplay on pop-up (is it possible?)

Hello

I can add a youtube video on my slider, no problem. If we click on the thumbnail, a pop-up is displayed and then we have to click again to play the video. This is not optimal.

I would like to know if there is any way for the video to start playing (automatically) once we click on the thumbnail and the pop-up is displayed.

Thank you.

phuonght's picture
phuonght
Thu, 08/06/2015 - 04:26

Hi,

Here is a suggestion for you:

In file md_slider/md_slider/templates/front/front_layers_render.tpl.php, line 28

change

<a title="<?php print htmlentities($layer->title, ENT_QUOTES, 'UTF-8'); ?>" class="md-video" href="<?php print $layer->url; ?>">

into

<a title="<?php print htmlentities($layer->title, ENT_QUOTES, 'UTF-8'); ?>" class="md-video" href="<?php print $layer->url; ?>?autoplay=1">

note: it only works with youtube, maybe we will update this function in next version of mega slider.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.