?
Solved

youtube api

Posted on 2012-03-28
4
Medium Priority
?
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…
Suggested Courses

771 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