When does HTML5 video return to the Flash player?

I am working on a backup engine for an HTML5 video player. I have a way to replace it with swfobject Flash player, but how do I determine if there are any problems?

In other words, if we use the following list of error events that can be selected, which one should trigger the replacement of the Flash player? Or are we just doing a replacement if any error occurs?

Also, where should the onError handler be called? I’m thinking about a video library, but I want to make sure. Your guidance is greatly appreciated. Thanks.

function failed(e) { // video playback failed - show a message saying why switch (e.target.error.code) { case e.target.error.MEDIA_ERR_ABORTED: alert('You aborted the video playback.'); break; case e.target.error.MEDIA_ERR_NETWORK: alert('A network error caused the video download to fail part-way.'); break; case e.target.error.MEDIA_ERR_DECODE: alert('The video playback was aborted due to a corruption problem or because the video used features your browser did not support.'); break; case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED: alert('The video could not be loaded, either because the server or network failed or because the format is not supported.'); break; default: alert('An unknown error occurred.'); break; } } 
+3
html5 flash html5-video
source share
1 answer

The problem is that many problems cannot be fixed by switching to Flash. In fact, the only time you really benefited from switching to Flash, in IE, FF, and Opera, when you have MP4 to play, and in all browsers when you have FLV. (This can obviously be modified based on the built-in Flash support for webm / Theora.)

For this reason, we did the following for the JW Player for HTML5:

This solution is not reliable, but you get 90% + from it.

Best

Zach

Developer, LongTail Video

+8
source share

All Articles