Search code examples
htmlhtml5-videofallback

HTML5 video open file error fallback


I have a similar question as HTML5 video, fallback to flash if no .ogv file

But my question is I want to fallback to flash if browser CAN'T OPEN .ogv file (not DOESN'T SUPPORT ogv). Suppose my html already has preset fallback codes below source elements, can I instruct browsers continue executing these preset fallback codes if all sources are failed to open (i.e. no source network state)?


Solution

  • You can sniff whether browser supports or does not support OGV beforehand before playing it:

    http://diveintohtml5.info/detect.html#video-formats