changing source on html5 video tag

前端 未结 16 1853
既然无缘
既然无缘 2020-11-22 08:31

i\'m trying to build a video player, that works everywhere. so far i\'d be going with:

16条回答
  •  忘了有多久
    2020-11-22 09:27

    Yaur: Although what you have copied and pasted is good advice, this does not mean that it is impossible to change the source element of an HTML5 video element elegantly, even in IE9 (or IE8 for that matter).(This solution does NOT involve replacing the entire video element, as it is bad coding practice).

    A complete solution to changing/switching videos in HTML5 video tags via javascript can be found here and is tested in all HTML5 browser (Firefox, Chrome, Safari, IE9, etc).

    If this helps, or if you're having trouble, please let me know.

提交回复
热议问题