w3c / mediacapture-extensions

Extensions to Media Capture and Streams by the WebRTC Working Group
https://w3c.github.io/mediacapture-extensions/
Other
19 stars 14 forks source link

[Track Stats API] Feature detection of audio vs video stats #101

Closed henbos closed 10 months ago

henbos commented 11 months ago

MediaStreamTrack can be either audio or video. We've previously talked about having a single stats method for both the audio and video case for consistency, but as I implemented a prototype of this API for video stats and not audio stats, I realized that if both APIs share the same name then there is no way to easily feature detect this API, unless you consider try-catch a sensible option and throwing in the not implemented case.

Proposal:

henbos commented 11 months ago

Alternative discussed: just return an empty dictionary

henbos commented 10 months ago

In TPAC the desire to just call this "stats" was expressed (#107) and in a previous meeting there was little interest in feature detection, so I'm abandoning this issue