-
Notifications
You must be signed in to change notification settings - Fork 47
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
RTCMediaStreamTrackStats is four dictionaries in one #230
Comments
I think this is nicer and the way it should have been designed from the start. I'm a bit hesitant though. With #191 we could add new dictionary "types" for "isRemote = true", a case which had not been implemented by Chrome/Firefox, and keep the old dictionaries. This change on the other hand would require 4 new dictionaries "types", deprecating the existing "track", which is not backwards compatible with what is already shipped in Chrome since several versions ago. If we do this change it would be good to do it in coordination with other disruptive changes, like if we do sender/receiver stats instead of track stats (#231). |
@henbos I'm not proposing replacing If we don't go for #231 then I'm not proposing removing If we do go for #231 then I'm hoping we do the latter, since I find it intuitive. That's why I left |
Oh okay I assumed the new dictionaries would imply unqiue RTCStats.type:s but if not this is purely editorial. You still have to do the "ifs" in JavaScript but the spec would indeed be more readable. |
Right, the stats spec doesn't typically spell out those steps anywhere, but if it did there'd still be if's (just fewer of them at the top instead of per line-item probably). |
I do worry about the multiplication of types. In OO, there's a design principle like "don't do with inheritance what you can do with containment". |
TPAC feedback: Ready to move forward on this. |
jan-ivar since you're doing #231 do you want to take this on too? |
Fixed by #273 |
The description of nearly every member in RTCMediaStreamTrackStats starts with "Only valid for..."!
Like #191 we can describe this more effectively in WebIDL than with prose:
Base:
Video:
Audio:
If I got some wrong, I blame the prose for being vague.
The text was updated successfully, but these errors were encountered: