Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
On a website I have a large main div which contains an embedded youtube video.

Below this main video I have three other small thumbnail sized videos.

So, a total of 4 videos, one of which is ready to play.


I want to be able to click on any one of the small thumbnail videos and have that video switch with the main video and then autoplay that video in the main video area.

I'm wondering what Javascript I can include to accompany the html below or whether there might be a better method using an unordered list and list items?

HTML
<div class="responsive-wrapper">
 <div class="responsive-container">
   <iframe src=""></iframe>
 </div>
</div>

<div class="video-list-wrapper" id="video-gallery"> 
 <div class="responsive-wrapper2">
  <div class="responsive-container">
   <iframe src=""></iframe>
  </div>
 </div>
 <div class="responsive-wrapper2">
  <div class="responsive-container">
   <iframe src=""></iframe>
  </div>
 </div>
 <div class="responsive-wrapper2">
  <div class="responsive-container">
   <iframe src=""></iframe>
  </div>
 </div>
</div> 
Posted

1 solution

Use Jquery, you will get what you want to.
This may help you:
http://geckohub.com/jquery/youtubeplaylist/[^]

Or you can find the whole list for Youtube plug-in here:
http://jquery-plugins.net/tag/youtube[^]
 
Share this answer
 
Comments
Member 11025744 21-Aug-14 20:51pm    
Thanks. Although it's not *exactly* what I'm looking for this definitely points me in the right direction. Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900