Tuesday, June 7, 2011

[YouTube-API] Re: HTML5 video playback on Android

On Wednesday, May 25, 2011 1:34:46 PM UTC+3, tsaarni wrote:
I include sample code below that demonstrates the problem.

When Android HTML5 video player is started it remains in state 2 (paused) regardless of calling ytplayer.playVideo() or any other player functions.  I can manually click the "play" button in the video player to start playback.  However if I call ytplayer.getPlayerState() it still returns 2 (paused).

I also noticed that if calling ytplayer.playVideo() too fast (e.g. immediately in onPlayerReady() callback) I will get error requester saying "Cannot play video: Sorry, this video cannot be played.".
I also see this error: 05-25 13:27:25.289 E/browser ( 8447): Console: Uncaught TypeError: Cannot read property 'ud' of null http://s.ytimg.com/yt/jsbin/www-embed-vflBNdA1p.js:176


Some days ago I noticed that the exact sample code I posted had started to work!  It works on Android 2.3 but it still does not work on Android 2.1 devices I tested (Motorola Droid and Samsung Galaxy S).  On those devices the iframe embed launches Flash player.  I see error "You need to upgrade your Adobe Flash Player to watch this video" since I have disabled plugins in order to "force" HTML5 video playback for better performance.

I believe HTML5 video in general should work on 2.1 too?  For example the player at videojs.com works well.

--
Tero






--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/dnc3c05DVHlEajhK.
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