-
Notifications
You must be signed in to change notification settings - Fork 115
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
editorial: media api introduction #1240
Comments
I'd hold off on doing anything until we settle how tracks are signaled. See issue #1161. |
@fippo Can you submit a PR? |
There are still discussions ongoing about track ID signaling (rtcweb-wg/jsep#842), but I guess the introduction could ignore that aspect. |
Actually with the transceiver model
is not even true anymore as addTransceiver('audio') will generate an SDP that creates a track on the remote side. At least that is my understanding of transceivers and jsep now (and I still don't think this is a good idea) |
Is it just the default direction of "sendrecv" you have a problem with? Or more generally, do you not like that it's possible to have a remote track pop up on the receive side before one is set on the send side? Anyway, I agree the "corresponding tracks" sort of language is misleading, since tracks don't map 1:1 between the send/receive side. It would be good if this were explained somewhere, though it's not exactly straightforward so I don't know if the intro is the best place. |
I think (vaguely; trying to narrow it down) my concern is at the receiving side and breaking currently valid assumptions that you can show the video element after onaddstream + ice connected. While you can do stupid things such as stopping a track without signaling or adding a stopped track in the old model (and/or current implementations) that is not done very often. Granted, the spec currently does not give developers any indication that in ontrack the video stream is not ready either so showing it after iceconnectionstatechange (or readyStateChange for video) is just the lore. Is the introduction the right place for that? |
Figured it out and all of a sudden transceivers makes sense. Thanks @taylor-b and also @jan-ivar for listening to hours of rambling on IRC. With transceivers the lore for when to show a video changes. This moves from the pc iceconnectionstate (which is only valid for initial connection anyway) to the track.onunmute. Which makes sense once one understands the model. But the spec does not explain it at all. http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface step 7 says the initial state of a receivers track is muted. This makes sense because initially the track has not received data. So it seems we need
https://jsfiddle.net/jkzn0y5x/1/ shows this in Firefox 59 with transceivers (and it adds a muted attribute). |
@fippo Can you submit a PR? |
Will do -- https://blog.mozilla.org/webrtc/when-should-you-display-incoming-webrtc-video/ is the prose version. |
I'm still abstaining from PRs so unassigned myself. This is still an issue though but its editorial only so feel free to close. |
Let's update the existing example to include the onunmute. @jan-ivar can you make a PR? |
http://w3c.github.io/webrtc-pc/#rtp-media-api
This is odd. Tracks and streams are an abstraction that is used by this API to describe how media is sent over a p2p connection.
This is even more weird. It is correct but boiled down a bit too much.
If an application adds a track to a peerconnection it signals its intent to transmit media over that connection. This triggers the negotiation process described in 4.7 because we need to negotiate how this media is going to be transmitted over the network in a way that the other peer understands. As part of the negotiation, signaling messages are exchanges between the two applications which make the stream pop up at the remote side. No data is sent until the p2p connection is up though
Shall I try to come up with something along those lines?
The text was updated successfully, but these errors were encountered: