You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 5.1 the processing model for addTrack, there's no mention of the streams argument. Is streams required? E.g. Does this work or cause an error (which error)?
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
var track = stream.getVideoTracks()[0];
stream.removeTrack(track);
new RTCPeerConnection().addTrack(track);
})
If streams is an empty list, create a new MediaStream object and add it to streams.
But if the code I wrote above fails, then step 5 seems redundant.
If the code I wrote above does not fail, then I have a larger question.
The larger question is: Can a live track be consumed outside of a stream (assuming PeerConnection is a consumer)?
The MediaStream and Capture spec suggests no, defining “consumer” to be solely of a stream.
Yet the WebRTC spec seems to play fast and loose with this rule, talking about tracks with "inputs" and "outputs" with no mention of streams:
"The concepts of an input and output to a given MediaStreamTrack ..."
"The RTP media API lets a web application send and receive MediaStreamTracks over a peer-to-peer connection. Tracks, when added to a RTCPeerConnection, result in signaling; when this signaling is forwarded to a remote peer, it causes corresponding tracks to be created on the remote side."
I think some clarification in the spec here would help.
The text was updated successfully, but these errors were encountered:
In 5.1 the processing model for
addTrack
, there's no mention of thestreams
argument. Isstreams
required? E.g. Does this work or cause an error (which error)?Interestingly, #processing-remote-mediastreamtracks tolerates reception of stream-less tracks:
But if the code I wrote above fails, then step 5 seems redundant.
If the code I wrote above does not fail, then I have a larger question.
The larger question is: Can a live track be consumed outside of a stream (assuming PeerConnection is a consumer)?
The MediaStream and Capture spec suggests no, defining “consumer” to be solely of a stream.
Yet the WebRTC spec seems to play fast and loose with this rule, talking about tracks with "inputs" and "outputs" with no mention of streams:
I think some clarification in the spec here would help.
The text was updated successfully, but these errors were encountered: