-
Notifications
You must be signed in to change notification settings - Fork 10
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
CaptureHandleChangeEvent should just be Event #50
Comments
I think that am reading between the lines that you want Clarification:
Between the lines, I am reading that you want this to change, so that
|
Friendly ping @jan-ivar. |
See #56.
JS state updates should be on the same queue, so there's no "latest value" confusion. |
Let's examine a scenario:
The question boils down to - does it make sense for a browser to give C the capture-handle from 4 seconds ago, rather than the current one? |
We don't have to ask this question for every new API. This has been solved many times, so we follow established patterns: const transceiver = new RTCPeerConnection().addTransceiver("video");
transceiver.transport.onstatechange = () => console.log(transceiver.transport.state); // logs all states The state getter returns "the value of the [[DtlsTransportState]] slot", which is set in the same queued task #56 that fires (synchronously calls) the It does not return any underlying "current" value. This is to preserve run-to-completion semantics. |
I have not observed this discussion before. You have the benefit here of having been involved with more APIs than me. I'll do my best to catch up.
This is the key part that I was overlooking - that events don't go in a queue (even if they can be called from a queued task). Shall we close this issue and continue on #56? |
Why don't we keep this one open to track removing the custom event, and leave the other one to specify the event firing algorithms? |
That works for me. |
The doc says "Capturing applications who are permitted to observe a track's CaptureHandle have two ways of reading it."
This is one too many. The second way:
...seems entirely redundant, since this should suffice:
I believe the common pattern in situations like this is to just fire a vanilla
Event
.The text was updated successfully, but these errors were encountered: