0

I wish to relay a video through a server to the browser.

It seems that, using the Blob API, this can be done with the URL.createObjectURL method.

This creates a link that I can use in the html5 video element, however, this blob can not be altered.

How could I append new data to the Blob object using the same href?

Also, I doubt that the file will be streamed entirely sequentially, and think the browser will request different parts of the file, especially for scrubbing. How could I dynamically fetch and write bytes into the blob object?

Is the MediaSource API something worth looking into?

Tobiq
  • 2,489
  • 19
  • 38

1 Answers1

0

One possibility is to use a service worker. That allows you to intercept network requests, and provide a streamed response.

Tamas Hegedus
  • 28,755
  • 12
  • 63
  • 97
  • I just realised, use a normal href to my server, and have it dynamically fetch and respond with the relevant data, right? Seem's like I'd need to start manually inspecting the HTTP requests. – Tobiq May 30 '17 at 21:40