No, you can't specify an initial video id when using the chromeless
player. The proper way of loading a video when the player is available
is along the lines of what you suggest—calling
ytplayer.loadVideoById() from within the player ready callback should
work.
Could you point me to a web page that contains your code where I
could reproduce the errors you're seeing?
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Jan 9, 3:17 pm, FairfieldUWeb <fairfieldu...@gmail.com> wrote:
> I know the answer to this must be right before my eyes...I am working
> with the apiplayer code from the chromeless player example 1 document
> and want to preload the video rather than use the form controls to
> make changes. Can I replace the call for the video
>
> <script type="text/javascript">
> // <![CDATA[
>
> // allowScriptAccess must be set to allow the Javascript from
> one
> // domain to access the swf on the youtube domain
> var params = { allowScriptAccess: "always", bgcolor:
> "#cccccc" };
> // this sets the id of the object or embed tag to 'myytplayer'.
> // You then use this id to access the swf and make calls to the
> player's API
> var atts = { id: "myytplayer" };
> swfobject.embedSWF("http://www.youtube.com/apiplayer?
> enablejsapi=1&playerapiid=ytplayer",
> "ytapiplayer", "640", "360", "9", null, null,
> params, atts);
> //]]>
> </script>
>
> with another parameter that will include the video ID? I tried
> adding
>
> ytplayer.loadVideoById(id, parseInt(startSeconds)); to the
> updateytplayerInfo function or to onYouttubePlayerReady function
> calls, but to no avail, both throw same error.
>
> with my attributes of
>
> ytplayer.loadVideoById("s9f0xvqKn10", parseInt(0));
>
> and the page loads with the video but then throws several errors
> starting with Error 100.
>
> Any tips?
>
> Scott B
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment