views:

145

answers:

1

Hi --

I can successfully trap the "ended" event in an HTML5 video like so: onended="do_ended()"

And in that function, I can make a playlist that works on desktop Chrome and Safari (yes, also with jQuery and AJAX):

function do_ended() { $.get("/nextclip.php",{'id':video_id},function(data){ $("#html5_screen").html('<source src="'+data+'" type="video/mp4" />'); $("#html5_screen")[0].load(); $("#html5_screen")[0].play(); }); }

But, this seems to fail in iPhone and iPad. Does anyone have a working example? Thanks!

A: 

What code it is in the nextclip.php??

Tobiaz
/nextclip.php is just an ajax call that prints and returns the name of the next video file (you know, the next clip) for use by html5_screen.src=data . If you don't want to use ajax, you could have a javascript array with all of the video file names. You don't have to use my code; look at the source of bionicworks.com/php/playlist as his site works well.
Jay