Solved

youtube api

Posted on 2012-03-28
4
227 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
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…

758 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

21 Experts available now in Live!

Get 1:1 Help Now