Hi.

I'm trying to continue with next video from a youtube playlist when an error occurs (video has been deleted by example).

I don't know how to get an error event from osmplayer and reproduce next video from playlist correctly.
i've tryed this, but first time player jump all videos with error and after that it works.

Could you tell what i'm doing wrong. Thank you very much

example: http://www.lavideogramola.com/temp/osm/

				minplayer.get('media', function(media) {
					
					media.bind('error', function() {
						console.log('Video has an error !');
						media.stop();
							minplayer.get('playlist', function(playlist) {
									playlist.next();
							});
					});
				});

Comments

notecortes’s picture

i think i have solved with this:

				minplayer.get('media', function(media) {					
					media.bind('error', function() {
						if (!media.loading) {
							console.log('Video has an error !');
							media.stop();
							minplayer.get('playlist', function(playlist) {
									playlist.next();
							});
						}//if
					});
				});

Thanks

travist’s picture

Status: Active » Fixed

Well done!

Automatically closed -- issue fixed for 2 weeks with no activity.