HTML5 video error handling

前端 未结 6 1123
一整个雨季
一整个雨季 2020-12-09 02:50

I need to tell, whether video cannot be played (\"x\" sign is shown in browser).

This code does\'t works. \"onerror\" event will never be fired under Firefox

6条回答
  •  [愿得一人]
    2020-12-09 03:50

    Try adding the event listener to the tag instead - I think the onerror attribute ("error" event) works on the source tag now, not the video tag.

提交回复
热议问题