Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning API #13

Open
heff opened this issue Mar 11, 2024 · 0 comments
Open

Warning API #13

heff opened this issue Mar 11, 2024 · 0 comments

Comments

@heff
Copy link
Member

heff commented Mar 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant