当我尝试从网址流式传输视频时,出现以下错误:
Uncaught (in promise) DOMException: Failed to load because no supported source was found.
显然,我已经过测试,我的资源很有用。这是一个简化的JS fiddle,这里是该小提琴代码的副本:
// Create HTML Video Element to play the video
var video = document.createElement('video');
video.addEventListener('loadeddata', function (e) {
document.body.appendChild( video );
});
video.src = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4';
video.crossOrigin = 'anonymous';
video.loop = true;
video.play();
为了让它发挥作用,我需要更改什么?