Solved

youtube api

Posted on 2012-03-28
4
228 Views
Last Modified: 2012-04-03
using the youtube player api -
i have a handfull of youtube videos
on a web page i have them listed and represented by a thumbnail
when the thumb is clicked i want the video to load in a container div and start playing without needing to click play on the video.

all is working fine except i cannot figure out how to force it to play after it loads in the container div
0
Comment
Question by:dgrafx
  • 3
4 Comments
 
LVL 6

Expert Comment

by:bartvd
ID: 37779149
You can add ?start=1 to the URL.

For example:
<iframe width="420" height="315" src="http://www.youtube.com/embed/7ISz6BhrDXk?autoplay=1" frameborder="0" allowfullscreen></iframe>
0
 
LVL 25

Author Comment

by:dgrafx
ID: 37779527
thanks for the comment

if you look at your code you have ?start=1 in one place and ?autoplay=1 in another
so which one would i use?

I did try both and start causes the video to not display at all and autoplay allows the video to show but doesnt start playing

and i'm not using an iframe but see the following:

<div id="vcont"></div>

function playVid(v) {
      $('#vcont').youTubeEmbed(
            {
                  video                  : v,
                  width                  : 610,
                  progressBar      : true
            }
      );      
}

i've tried putting autoplay in these settings as well

thanks
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 0 total points
ID: 37782485
i went in another direction using a different api where videos just start playing when they are loaded.
thanks
0
 
LVL 25

Author Closing Comment

by:dgrafx
ID: 37799999
i have no need of the original question any longer.
and since the one response was not of any use to me i am deleting the question.
to clarify - even if i had stayed with this method the answer posed was not  helpful.
I appreciate responses though.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now