I have a block where I display a video using blob, I just want to hide a video into a devtools network.
Here is what I have tried so far
<video id="videoplayer" playsinline autoplay controls>
<source src="" type="video/mp4">
</video>
window.onload = function() {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/videos/mena.mp4', true);
xhr.responseType = 'blob'; //important
xhr.onload = function(e) {
if (this.status == 200) {
console.log("loaded");
var blob = this.response;
var video = document.getElementById('videoplayer');
video.oncanplaythrough = function() {
console.log("Can play through video without stopping");
URL.revokeObjectURL(this.src);
};
video.src = URL.createObjectURL(blob);
video.load();
}
};
xhr.send();
}
The above function generates this link below perfectly as I want:
blob:http://localhost:8080/bb58f8d4-a5b8-43e2-99f4-7a4a7bbfe60c
if you visit youtube video and inspect a video there is no link displayed in devtools
How can I hide the mp4 link in devtools network?