I found this code in a tutorial that to transform the videos into objects and be treated as if it were a url
blob
, with the first video coming on the page the function works perfectly, however when I call another video through , the only purpose of this code is to help protect the original path of the videos to avoid direct access, which may be wrong?
function mascara()
{
var ms = new MediaSource();
var video = document.querySelector('source');
video.src = window.URL.createObjectURL(ms);
ms.addEventListener('sourceopen', function(e) {
var sourceBuffer = ms.addSourceBuffer('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
sourceBuffer.appendBuffer(oneVideoWebMChunk);
}, false);
};