sip.js.sessiondescriptionhandler.setlocalmediastream.md
September 26, 2022 ยท View on GitHub
Home > sip.js > SessionDescriptionHandler > setLocalMediaStream
SessionDescriptionHandler.setLocalMediaStream() method
Sets the peer connection's sender tracks and local media stream tracks.
Signature:
protected setLocalMediaStream(stream: MediaStream): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| stream | MediaStream | Media stream containing tracks to be utilized. |
Returns:
Promise<void>
Remarks
Only the first audio and video tracks of the provided MediaStream are utilized. Adds tracks if audio and/or video tracks are not already present, otherwise replaces tracks.