/ fm / liveswitch / sdp / rtp / Media
Class: Media
An SDP media description with a transport protocol of "RTP/AVP" or "RTP/SAVP".
Hierarchy
-
↳ Media
Table of contents
Constructors
Methods
- getFormatDescription
- getMediaType
- getNumberOfPorts
- getTransportPort
- getTransportProtocol
- getTypeString
- setFormatDescription
- setMediaType
- setNumberOfPorts
- setTransportPort
- setTransportProtocol
- toString
- generateRtpProfile
- getPayloadTypes
- getRtpAvpTransportProtocol
- getRtpAvpfTransportProtocol
- getRtpSavpTransportProtocol
- getRtpSavpfTransportProtocol
- getUdpTlsRtpSavpTransportProtocol
- getUdpTlsRtpSavpfTransportProtocol
- getWellKnownPayloadClockRate
- getWellKnownPayloadName
- parse
- supportsEncryption
- supportsRtcpBasedFeedback
Constructors
constructor
+ new Media(mediaType: string, transportPort: number, transportProtocol: string, rtpPayloadTypeNumbers: number[]): Media
Initializes a new instance of the [[fm.liveswitch.sdp.rtp.media]] class.
Parameters:
| Name | Type | Description |
|---|---|---|
mediaType |
string | The media type. See [[fm.liveswitch.sdp.mediaType]] for possible values. |
transportPort |
number | The transport port. |
transportProtocol |
string | The transport protocol. |
rtpPayloadTypeNumbers |
number[] | The RTP payload type numbers. |
Returns: Media
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:12
Methods
getFormatDescription
▸ getFormatDescription(): string
Gets the format description.
Returns: string
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:166
getMediaType
▸ getMediaType(): string
Gets the media type. See [[fm.liveswitch.sdp.media.mediaType]] for possible values.
Returns: string
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:178
getNumberOfPorts
▸ getNumberOfPorts(): number
Gets the number of ports.
Returns: number
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:190
getTransportPort
▸ getTransportPort(): number
Gets the transport port.
Returns: number
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:202
getTransportProtocol
▸ getTransportProtocol(): string
Gets the transport protocol.
Returns: string
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:214
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:10
setFormatDescription
▸ setFormatDescription(value: string): void
Sets the format description.
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:226
setMediaType
▸ setMediaType(value: string): void
Sets the media type. See [[fm.liveswitch.sdp.media.mediaType]] for possible values.
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:238
setNumberOfPorts
▸ setNumberOfPorts(value: number): void
Sets the number of ports.
Parameters:
| Name | Type |
|---|---|
value |
number |
Returns: void
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:250
setTransportPort
▸ setTransportPort(value: number): void
Sets the transport port.
Parameters:
| Name | Type |
|---|---|
value |
number |
Returns: void
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:263
setTransportProtocol
▸ setTransportProtocol(value: string): void
Sets the transport protocol.
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:276
toString
▸ toString(): string
Converts this instance to a string.
Returns: string
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:288
generateRtpProfile
▸ StaticgenerateRtpProfile(type: StreamType, rtcpFeedbackSupported: boolean, useDtls: boolean, useEncryption: boolean): string
Generates Rtp Prfile for a given combination of stream type, whjether or not RTCP-based feedback is supported, whether (D)TLS is in use and whether encryption is in use in general.
Parameters:
| Name | Type | Description |
|---|---|---|
type |
StreamType | Stream type. |
rtcpFeedbackSupported |
boolean | Indicates whether Rtcp-based feedback is supported. |
useDtls |
boolean | Indicates whether (D)TLS is in use. |
useEncryption |
boolean | Indicates whether encryption is in use. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:54
getPayloadTypes
▸ StaticgetPayloadTypes(formatDesciption: string): number[]
Gets the payload types.
Parameters:
| Name | Type | Description |
|---|---|---|
formatDesciption |
string | The media format desciption. |
Returns: number[]
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:88
getRtpAvpTransportProtocol
▸ StaticgetRtpAvpTransportProtocol(): string
Gets the protocol keyword for the RTP audio/video profile.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:120
getRtpAvpfTransportProtocol
▸ StaticgetRtpAvpfTransportProtocol(): string
Gets the protocol keyword for the extended RTP audio/video profile.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:108
getRtpSavpTransportProtocol
▸ StaticgetRtpSavpTransportProtocol(): string
Gets the protocol keyword for the Secure RTP audio/video profile.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:144
getRtpSavpfTransportProtocol
▸ StaticgetRtpSavpfTransportProtocol(): string
Gets the protocol keyword for the extended Secure RTP audio/video profile.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:132
getUdpTlsRtpSavpTransportProtocol
▸ StaticgetUdpTlsRtpSavpTransportProtocol(): string
Gets the protocol keyword for the Secure RTP audio/video profile with DTLS key exchange.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:168
getUdpTlsRtpSavpfTransportProtocol
▸ StaticgetUdpTlsRtpSavpfTransportProtocol(): string
Gets the protocol keyword for the extended Secure RTP audio/video profile with DTLS key exchange.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:156
getWellKnownPayloadClockRate
▸ StaticgetWellKnownPayloadClockRate(payloadType: number): number
Returns the clockrate of a well-known payload type.
Parameters:
| Name | Type | Description |
|---|---|---|
payloadType |
number | The well-known payload type to get the clockrate of. |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:181
getWellKnownPayloadName
▸ StaticgetWellKnownPayloadName(payloadType: number): string
Returns the name of a well-known payload type.
Parameters:
| Name | Type | Description |
|---|---|---|
payloadType |
number | The well-known payload type to get the name of. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:221
parse
▸ Staticparse(s: string): Media
Creates an [[fm.liveswitch.sdp.media]] instance from a string.
Parameters:
| Name | Type | Description |
|---|---|---|
s |
string | The string to parse. |
Returns: Media
Inherited from: Media
Defined in: Generated/TypeScript/fm.liveswitch/sdp/Media.ts:121
supportsEncryption
▸ StaticsupportsEncryption(protocol: string): boolean
Returns a value indicating whther a given protocol supports encryption.
Parameters:
| Name | Type | Description |
|---|---|---|
protocol |
string | Protocol keyword. |
Returns: boolean
Value indicating whther a given protocol supports encryption.
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:282
supportsRtcpBasedFeedback
▸ StaticsupportsRtcpBasedFeedback(protocol: string): boolean
Returns a value indicating whther a given protocol supports encryption.
Parameters:
| Name | Type | Description |
|---|---|---|
protocol |
string | Protocol keyword. |
Returns: boolean
Value indicating whther a given protocol supports encryption.
Defined in: Generated/TypeScript/fm.liveswitch/sdp/rtp/Media.ts:296