Simplify SDP parser.
- Source
Methods
(inner) adaptCodecName(sdp, codec, newCodecName) → {String}
Replace codec name of a SDP.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
codec | String | Codec name to be replaced. |
newCodecName | String | New codec name to replace. |
- Source
SDP updated with new codec name.
- Type:
- String
(inner) getAvailableHeaderExtensionIdRange(sdp) → {Array.<Number>}
Gets all available header extension IDs of the current Session Description.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
All available header extension IDs.
- Type:
- Array.<Number>
(inner) getAvailablePayloadTypeRange(sdp) → {Array.<Number>}
Gets all available payload type IDs of the current Session Description.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
All available payload type ids.
- Type:
- Array.<Number>
(inner) removeSdpLine(sdp, sdpLine) → {String}
Remove SDP line.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
sdpLine | String | SDP line to remove. |
- Source
SDP without the line.
- Type:
- String
SdpParser.removeSdpLine(sdp, 'custom line')
(inner) renegotiate(localDescription, remoteDescription)
Renegotiate remote sdp based on previous description. This function will fill missing m-lines cloning on the remote description by cloning the codec and extensions already negotiated for that media
Name | Type | Description |
---|---|---|
localDescription | String | Updated local sdp |
remoteDescription | String | Previous remote sdp |
- Source
(inner) setAbsoluteCaptureTime(sdp) → {String}
Mangle SDP for adding absolute capture time header extension.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
SDP mungled with abs-capture-time header extension.
- Type:
- String
SdpParser.setAbsoluteCaptureTime(sdp)
(inner) setDTX(sdp) → {String}
Set DTX (Discontinuous Transmission) to the connection. Advanced configuration of the opus audio codec that allows for a large reduction in the audio traffic. For example, when a participant is silent, the audio packets won't be transmitted.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
SDP parsed with dtx support.
- Type:
- String
SdpParser.setDTX(sdp)
(inner) setDependencyDescriptor(sdp) → {String}
Mangle SDP for adding dependency descriptor header extension.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
SDP mungled with abs-capture-time header extension.
- Type:
- String
SdpParser.setAbsoluteCaptureTime(sdp)
(inner) setMultiopus(sdp, mediaStream) → {String}
Parse SDP for support multiopus. Only available in Google Chrome.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
mediaStream | MediaStream | MediaStream offered in the stream. |
- Source
SDP parsed with multiopus support.
- Type:
- String
SdpParser.setMultiopus(sdp, mediaStream)
(inner) setSimulcast(sdp, codec) → {String}
Parse SDP for support simulcast. Only available in Chromium based browsers.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
codec | String | Codec. |
- Source
SDP parsed with simulcast support.
- Type:
- String
SdpParser.setSimulcast(sdp, 'h264')
(inner) setStereo(sdp) → {String}
Parse SDP for support stereo.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
- Source
SDP parsed with stereo support.
- Type:
- String
SdpParser.setStereo(sdp)
(inner) setVideoBitrate(sdp, bitrate) → {String}
Parse SDP for desired bitrate.
Name | Type | Description |
---|---|---|
sdp | String | Current SDP. |
bitrate | Number | Bitrate value in kbps or 0 for unlimited bitrate. |
- Source
SDP parsed with desired bitrate.
- Type:
- String
SdpParser.setVideoBitrate(sdp, 1000)
(inner) updateMissingVideoExtensions(localDescription, remoteDescription) → {String}
Adds missing extensions of each video section in the localDescription
Name | Type | Description |
---|---|---|
localDescription | String | Previous local sdp |
remoteDescription | String | Remote sdp |
- Source
SDP updated with missing extensions.
- Type:
- String