1

I create streaming video with node js and HTML 5 video. And now i wanna set event for each buffing or maybe for stream packet. How I can find useful event. I found this link that describe, how streaming happen and i need an event to fire for each chunk.

Rstilora
  • 11
  • 5

1 Answers1

1

There is no event for this on the media element, directly. It's abstracted from view of your code.

However, if you're in control of the source, you can deploy a Service Worker which is effectively a proxy that you implement in JavaScript. It's normally used for cache control, but you can use it to intercept and log when media requests are made.

Brad
  • 159,648
  • 54
  • 349
  • 530