When should HTML5 video fall back to Flash player?

前端 未结 1 1510
甜味超标
甜味超标 2021-01-13 22:44

I\'m working on implementing a fallback mechanism for the HTML5 video player. I\'ve got a way to replace it with the swfobject Flash player, but how should I detect if any i

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 22:53

    The trouble here is that many issues can't be fixed by switching to Flash. In fact, the only time you're really benefited by switching to Flash is in IE, FF, and Opera when you've got an MP4 to play, and in all browsers when you've got an FLV. (This is obviously subject to change based on native Flash support for webm / Theora.)

    For this reason, we've done the following for the JW Player for HTML5:

    • Ask the browser if it can play the file.
    • If the browser can't play the file, check the list of supported file types for Flash based on the file's extension.
    • If Flash can't play the file, offer a download link.

    This solution isn't foolproof, but it gets you 90%+ of the way there.

    Best,

    Zach

    Developer, LongTail Video

    0 讨论(0)
提交回复
热议问题