1

I have an API that returns video stream with partial content (206) support. But this API needs some custom headers like authentication, so I use fetch to get the stream and create object URL.

I've created a fetch request:

let vidSrc = fetch(".../video", {
   headers: {
       Authorization: ...
   }
}).then((data) => {
   return URL.createObjectURL(data);
});

videoElement.src = vidSrc;

But then the object URL doesn't transfer the range request to the API service.

How can I get the partial content support with fetch and object URLs?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.