Friday, September 23, 2011

[YouTube-API] Re: Javascript stops passing values to C#/WPF

Just found out Javascript does not get the correct values from the
SWFObject.

So in short, when my application (with Youtube Player API) plays
videos, some of them stop returning to data Javascript after 5 to 10
seconds.

-----

Functions that fail in this situation:

player.getCurrentTime():Number
Returns the elapsed time in seconds since the video started playing.

player.getVideoBytesLoaded():Number
Returns the number of bytes loaded for the current video.

player.getVideoBytesTotal():Number
Returns the size in bytes of the currently loaded/playing video or an
approximation of the video's size.

Functions that always work in this situation:

player.getDuration():Number
Returns the duration in seconds of the currently playing video. Note
that getDuration() will return 0 until the video's metadata is loaded,
which normally happens just after the video starts playing.

-----

I already have the latest version of the SWFObject ...

/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/
mit-license.php
>
*/

--
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