将视频预加载为Blob,然后用于createObjectURL()创建BlobURL。该视频可在所有操作系统/浏览器上播放,但在iOS 10.3上尝试播放(承诺)以下消息时被拒绝:
NotSupportedError (DOM Exception 9): The operation is not supported.
如果将<video>src 切换到正常的视频网址,则它会正常播放。
获取Blob网址的代码:
fetch(videoURL)
.then(response => response.blob())
.then(window.URL.createObjectURL)
.then(console.log)
Run Code Online (Sandbox Code Playgroud)