JSFiddle - React, Tailwind, and code Playground
HTML
<video id='video'></video>
JavaScript
fetch(
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4"
)
.then((videoResponse) => {
videoResponse.blob().then((blobData) => {
blobData.arrayBuffer().then((blobArray) => {
const videoBlob = new Blob([blobArray], { type: "video/mp4" });
const videoSrc = URL.createObjectURL(videoBlob);
console.log(videoSrc, 'video src');
const videoElement = document.getElementById('video');
videoElement.src = videoSrc;
setTimeout(() => {
videoElement.play();
}, 200);
});
})
});