w3c / user-timing

User Timing
https://w3c.github.io/user-timing/
Other
26 stars 24 forks source link

Extending 'Recommended mark names' to allow user agents to detect media timeouts #110

Open sushraja-msft opened 5 months ago

sushraja-msft commented 5 months ago

I would like to propose extending performance mark with a recommended mark name for website detected media timeout – ‘mark_media_timeout’, { ‘detail’: {‘error_code’: 1}} so as to allow UA to collect metrics or other diagnostics to help root cause media related performance issues.

Adding context, today media sites detect timeouts and errors while trying to play protected content for APIs like

some of these APIs are on the video element while others are related API promises taking too long to resolve. That is Problem 1: The breadth of APIs that a UA has to cover to measure media playback timeouts is large. Problem 2: Secondly it is not trivial to duplicate the website logic on the UA side, for example tracking time to first frame needs additional checks to see if the tab is visible.

Even if the UA has a better implementation to detect time to first frame, being able to validate the media site's perspective of a timeouts and identify discrepancy is useful that having these additional recommended mark names is valuable.

nicjansma commented 5 months ago

Thanks for bringing this to our attention! This was discussed on the June 6 2024 W3C WebPerf Working Group call.