HTML5 Canvas drawImage with video source not working on Android

前端 未结 3 642
深忆病人
深忆病人 2021-01-05 15:19

I am trying to use canvas\'s drawImage method with video source, but it\'s not working in Android 4.4.2, tested with Chrome browser.

Here\'s my code:

3条回答
  •  我在风中等你
    2021-01-05 15:58

    It seems to be an issue with that specific file format (mp4).

    Substituting a webm file and it works fine.

    Unfortunate, but that's been the way of for a while (to really require webm/ogg and not just mp4, regardless of what browsers claim to support).

    (I bet its a bug relating to anti-drm screenshot stuff? who knows)

    for example use the source http://video.webmfiles.org/big-buck-bunny_trailer.webm and it will work: http://jsfiddle.net/h1hjp0Lp/15/

提交回复
热议问题