5

I'm using videoJS to play my videos which are hosted on Brightcove. I just give it a videoId and it automatically fetches the src which I guess gets translated into a blob src like src="blob:https://crap.crap".

However, it seems like when I remove the <video> component then put it back, the video gets refetched from the source and I'm not sure if the browser cached it or not. Does anyone know if it's possible to manually cache a blob src?

edit: It is streamed via this protocol

Hyyan Abo Fakher
  • 3,497
  • 3
  • 21
  • 35
MarksCode
  • 8,074
  • 15
  • 64
  • 133
  • no, blobs are unique each time they are created. the underlying http-based hls files might reside in the http cache however, so don't be surprised if you see warm-cache load times, as in-computer lag between caches is minimal. – dandavis Sep 10 '18 at 18:17
  • So for brightcove videos, I just set a `data-video-id` value on the ` – MarksCode Sep 10 '18 at 18:31
  • What are the caching headers of the response, btw? – 9000 Sep 10 '18 at 19:26
  • @9000 on each segment*.ts file I see the header `Cache-Control: public, max-age=31118785` – MarksCode Sep 10 '18 at 20:07
  • 1
    If you created a URL from the blob using `URL.createObjectURL()` then it does cache it for the lifetime of the window being open and you should call `URL.revokeObjectURL()` to release the memory. – Dominic Sep 11 '18 at 08:53

0 Answers0