gh darvishani
gh darvishani

Reputation: 160

Event for HTML 5 video streaming by JavaScript

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.

Upvotes: 1

Views: 366

Answers (1)

Brad
Brad

Reputation: 163272

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.

Upvotes: 1

Related Questions