I have a video named video.mp4
I want to play it in a video/source tag in HTML, I tried too many answers from other questions and none of them worked.
var URL = this.window.URL || this.window.webkitURL;
var file = new Blob(["./video.mp4"], {"type": "video\/mp4"});
var value = URL.createObjectURL(file);
console.log(value);
video.src = value;
When I tried the code above it printed a blob, but when I want to play the video it doesn't work and shows this error in the console:
Uncaught (in promise) DOMException: The element has no supported sources.
The same thing happens when trying the answers for this question