Share via


getStreamById method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

The getStreamById method takes an ID and returns the MediaStream with that ID associated with the local or remote end of the connection.

Syntax

var retval = RTCPeerConnection.getStreamById(streamId);

Parameters

  • streamId
    Type: DOMString

    The ID of the MediaStream to be returned.

Return value

Type: MediaStream

The MediaStreams associated with the passed ID.

Remarks

If no matching stream is found, null is returned.

See also

RTCPeerConnection