0

I want to embed multiple youtube videos on one single page. Users click on the first top video to play the video, they decide they don't want to watch anymore, so they click on the second bottom video to play that one, but the first video is still playing, resulting overlapping audio and 2 videos playing the same time.

I want to if user click on second video then the other video will stop, letting only one video play at a time. Is this possible? How?

Ive done a playlist before but I want to try something different other than playlist. I also try making a thumb video image, click to open pop up window like bootstrap modal, but that did't work either. The video was still playing in the background in the modal when click away.

Here is my fiddle: https://fiddle.jshell.net/m2bxx7t9/

user2343800
  • 133
  • 1
  • 4
  • 16
  • I think you should look to the YouTube API Iframe to track the onPlayerStateChange event : https://developers.google.com/youtube/iframe_api_reference – Jonathan Anctil Nov 11 '16 at 16:06
  • Did you try this? http://stackoverflow.com/questions/12994459/how-to-stop-embedded-youtube-videos-from-playing-simultaneously/12995545#12995545 – Zeshan Munir Nov 11 '16 at 16:58
  • I tried both above. It didn't seem to work or I don't know how to implemented with this: https://fiddle.jshell.net/m2bxx7t9/ – user2343800 Nov 11 '16 at 17:09

0 Answers0