Git Product home page Git Product logo

Comments (15)

jan-ivar avatar jan-ivar commented on August 25, 2024

It appears this was merged fairly recently in #682. Was it presented to the WG? I don't recall any WG discussion on it, nor could I locate any mention of it in minutes. Perhaps it shouldn't have been merged?

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

It appears this was merged fairly recently in #682. Was it presented to the WG? I don't recall any WG discussion on it, nor could I locate any mention of it in minutes. Perhaps it shouldn't have been merged?

This was not presented to the WG, it was presented on the bi-weekly stats meeting. In your opinion, what changes do or do not require WG interaction? We've had bi-weekly stats editors meetings for years (since the inception of the getStats API), but as of recently there have been a couple of questions around WG involvement. I don't want to give off the impression that we're going behind the WG's back.

Should WG presentation be required any time we add a new stats type? Any time we make "larger" additions? Or do you want to get involved in the bi-weeklies as well / individual metrics?

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

We should clarify what to do if there are multiple playout paths. Having multiple IDs is one option, but if this is as niche use case as I think it is, I would prefer if the playout can be represented as a single object.

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

Note that RTCAudioPlayoutStats is only applicable to playout paths representing an audio device. I don't imagine many applications plays out the same audio track on multiple devices simultaneously. If your use case is piping it to an AudioContext I think WebAudio-centric metrics may be more suitable than RTCPeerConnection.getStats(). The playout stats are not all-encompassing of any possible playout path

from webrtc-stats.

padenot avatar padenot commented on August 25, 2024

What other use case is there, playing out on an HTMLMediaElement with an srcObject ? This is pretty niche, there's no way to perform anything as simple as a mix-down of two remote peers, except by using a bunch of HTLMMediaElement and let the OS do the mix-down, which makes this API really awkward, because you have to inspect all the stats for each object, instead of one. It can also be really inefficient (depending on the implementation and platform).

I think we should remove this, having statistics about output is the responsibility of the objects responsible for rendering, and the AudioContext already provide what's needed, and more. Introducing coupling here is not something that is desirable. Also, the terminology is incorrect and inconsistent with the rest of the Web Platform and audio programming generally.

This API isn't capable of representing all use-case, niche or not (which is not a strong argument anyway, we can't assume use-cases as API designers, it just needs to work), not flexible enough for authors to understand quality in common scenario, as previously said.

Authors that want to understand quality of the rendering will ask the rendering object if the rendering is going well, it's simpler to do and better in every aspect.

from webrtc-stats.

alvestrand avatar alvestrand commented on August 25, 2024

The particular metrics exposed here (samples inserted and removed in order to do rate adaption) are operations that in our current implementation are performed solely within the WebRTC module.
Once the samples exit WebRTC and enter the synchronous realm (such as WebAudio), this kind of processing is (as far as I can tell) not relevant.

Where would you propose exposing them, and what (conceptual) mechanism would you propose to get the information from the WebRTC module to where the information is exposed?

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

Even multiple HTMLMediaElement objects are considered the same playout path from WebRTC's perspective. The RTCAudioPlayoutStats implementation that shipped in Chrome M111 (currently Stable) at least is always one, and its samples are counted after mixing and what is sent to the device. But it would also be possible that each inbound-rtp has its own playout path if mixing is not implemented in WebRTC.

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

What other use case is there, playing out on an HTMLMediaElement with an srcObject ?

Yes. In Chromium you'll have an N:1 relationship between inbound-rtps and media-playout when you do this.
This was exposed here because this kind of mixing may be implemented inside WebRTC.

I think we should remove this, having statistics about output is the responsibility of the objects responsible for rendering, and the AudioContext already provide what's needed, and more.

RTCAudioPlayoutStats is not applicable if you use WebAudio. And if you do, it sounds like WebAudio already solves your problem and getStats() should not get involved.

from webrtc-stats.

jan-ivar avatar jan-ivar commented on August 25, 2024

This was not presented to the WG, it was presented on the bi-weekly stats meeting.

Those meetings aren't open to members, and therefore do not represent the view of the WG. My understanding of the role of editors includes discretion to craft and merge editorial PRs, maybe PRs for normative bug fixes where WG opinion can be inferred from earlier discussion, and PRs for issues that have been discussed in the WG that the WG agrees to proceed with.

It's been best practice for a while in most specs this WG owns to present new features and even substantive normative fixes to the WG in its monthly online interim meeting to ensure that proper WG discussion has happened.

We've had bi-weekly stats editors meetings for years (since the inception of the getStats API), but as of recently there have been a couple of questions around WG involvement.

This document, now governed by the 2 November 2021 W3C Process Document, is auto-published by the chairs to TR, which is the canonical version the public is pointed to, in spite of its disclaimer:

  • "Publication as a Candidate Recommendation does not imply endorsement by W3C and its Members. A Candidate Recommendation Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot."

I've emphasized "Working Group intends to include" to highlight that this document purports to represent the current will of the WG, not its editors.

In your opinion ...Should WG presentation be required any time we add a new stats type?

Yes. Other WGs that have a more live document model usually pay the cost of a more rigorous PR process.

Any time we make "larger" additions?

If they're normative, yes. This has been happening in the past AFAIK.

Or do you want to get involved in the bi-weeklies as well / individual metrics?

Adding one more person to those meetings won't solve things. For disclosure, I was unaware of this recurring meeting until last year, and I haven't been at them. All other WebRTC specs are covered by our weekly WebRTC editors' meeting, which I attend regularly.

from webrtc-stats.

jan-ivar avatar jan-ivar commented on August 25, 2024

But it would also be possible that each inbound-rtp has its own playout path if mixing is not implemented in WebRTC.

So the same JS might get a stats object in some implementations but not others? We try not to expose implementation details like this, because it's bad for web compat.

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

Filed #746 regarding the process and WG questions.

from webrtc-stats.

jan-ivar avatar jan-ivar commented on August 25, 2024

@henbos if we're not backing this out, can we add a note that clarifies there stats lack consensus? This would seem necessary to satisfy "Possible to merge PRs that may lack consensus, if a note is attached indicating controversy."

from webrtc-stats.

henbos avatar henbos commented on August 25, 2024

We can add a note for sure. Something like "Feature at risk. This metric currently lacks consensus."?
Is this a note you would also like to add to #741 ?

from webrtc-stats.

jan-ivar avatar jan-ivar commented on August 25, 2024

Since this is at CR, yes at risk makes sense. Thanks for catching that!

Is this a note you would also like to add to #741 ?

Seems added in #685 and #684? Yes, that would be great, thanks!

from webrtc-stats.

dontcallmedom-bot avatar dontcallmedom-bot commented on August 25, 2024

This issue was discussed in the minutes of WebRTC March 2023 meeting – 21 March 2023 (Issue #742 Assorted comments on RTCAudioPlayoutStats)

from webrtc-stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.