Today, video.error means video playback has failed, but there are many things that happen under the hood that are not ideal even if they don't cause a playback failure. Most notable are problems that result in rebuffering/stalling, slow startup times, or lower quality renditions.
Segment failures
Network drops
Ad failures
We don't have a standard way to report/capture these issues for the sake of reporting to analytics or responding to in real time.
The API could mimic the errors API
video.addEventListener('warning', (evt)=>{
let warning = video.warning;
});
That seems good enough as long as:
warnings can happen frequently during playback and not be missed as they're cleared out by later warnings
warnings include a timestamp to be clear when they occurred
I could also see an argument for limited-length array of warnings. But that feels more complicated to manage so I'd prefer to avoid that direction if possible.
This is as much a question for discussion as it is a suggestion. It's possible console warnings could be be good enough.
Today,
video.error
means video playback has failed, but there are many things that happen under the hood that are not ideal even if they don't cause a playback failure. Most notable are problems that result in rebuffering/stalling, slow startup times, or lower quality renditions.We don't have a standard way to report/capture these issues for the sake of reporting to analytics or responding to in real time.
The API could mimic the errors API
That seems good enough as long as:
I could also see an argument for limited-length array of warnings. But that feels more complicated to manage so I'd prefer to avoid that direction if possible.
This is as much a question for discussion as it is a suggestion. It's possible console warnings could be be good enough.