Hi

We have a site with a youtube viedo gallery. We list the viedos with a thumnail image and on click it will popup the video using Colorbox node. This is done by reformating the video-node with a iframe player. Using the following code:

<iframe allowfullscreen="" src="http://www.youtube.com/embed/<?php print $youtube_id; ?>?hd=1&amp;rel=0&amp;showinfo=0&amp;autohide=1&amp;fmt=22" frameborder="0" height="338" scrolling="no" width="600"></iframe>

This works nice but we also added the "&autoplay=1" to the src making the video autoplayed then popup in colorbox. Works nice then clicked on the video but when you close the popup window the video starts playing from the begining again in the background so you can hear the music but not see the video.

This behaviour has been seen in latest Chrome and IE on Windows but not in latest FF.

CommentFileSizeAuthor
#1 videoautostart-1631036-1.patch972 bytesiLLin

Comments

iLLin’s picture

StatusFileSize
new972 bytes

Please try the attached patch. I add a onclose event that will destroy the content once the colorbox is closed. This patch is against the latest DEV.

iLLin’s picture

Status: Active » Needs review
kristofferwiklund’s picture

Status: Needs review » Reviewed & tested by the community

I downloaded the latest dev version and tested and now the problem does not exist any more. But I hadn't applied the patch but looking at the patch and the dev version it seems the patch has already been committed to dev.

But nevertheless it works very nice now. The popup video autoplayes on load and closes nice even when the movie is playing.

Thanks.

iLLin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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