Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Media

An SDP media description with a transport protocol of "RTP/AVP" or "RTP/SAVP".

Hierarchy

  • Media
    • Media

Index

Constructors

constructor

  • new Media(mediaType: string, transportPort: number, transportProtocol: string, rtpPayloadTypeNumbers: number[]): Media
  • Initializes a new instance of the fm.icelink.sdp.rtp.media class.

    Parameters

    • mediaType: string

      The media type. See fm.icelink.sdp.mediaType for possible values.

    • transportPort: number

      The transport port.

    • transportProtocol: string

      The transport protocol.

    • rtpPayloadTypeNumbers: number[]

      The RTP payload type numbers.

    Returns Media

Methods

getFormatDescription

  • getFormatDescription(): string
  • Gets the format description.

    Returns string

getMediaType

  • getMediaType(): string
  • Gets the media type. See fm.icelink.sdp.media.mediaType for possible values.

    Returns string

getNumberOfPorts

  • getNumberOfPorts(): number
  • Gets the number of ports.

    Returns number

getTransportPort

  • getTransportPort(): number
  • Gets the transport port.

    Returns number

getTransportProtocol

  • getTransportProtocol(): string
  • Gets the transport protocol.

    Returns string

getTypeString

  • getTypeString(): string
  • Returns string

setFormatDescription

  • setFormatDescription(value: string): void
  • Sets the format description.

    Parameters

    • value: string

    Returns void

setMediaType

  • setMediaType(value: string): void
  • Sets the media type. See fm.icelink.sdp.media.mediaType for possible values.

    Parameters

    • value: string

    Returns void

setNumberOfPorts

  • setNumberOfPorts(value: number): void
  • Sets the number of ports.

    Parameters

    • value: number

    Returns void

setTransportPort

  • setTransportPort(value: number): void
  • Sets the transport port.

    Parameters

    • value: number

    Returns void

setTransportProtocol

  • setTransportProtocol(value: string): void
  • Sets the transport protocol.

    Parameters

    • value: string

    Returns void

toString

  • toString(): string
  • Converts this instance to a string.

    Returns string

Static generateRtpProfile

  • generateRtpProfile(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

    • 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

Static getPayloadTypes

  • getPayloadTypes(formatDesciption: string): number[]
  • Gets the payload types.

    Parameters

    • formatDesciption: string

      The media format desciption.

    Returns number[]

Static getRtpAvpTransportProtocol

  • getRtpAvpTransportProtocol(): string
  • Gets the protocol keyword for the RTP audio/video profile.

    Returns string

Static getRtpAvpfTransportProtocol

  • getRtpAvpfTransportProtocol(): string
  • Gets the protocol keyword for the extended RTP audio/video profile.

    Returns string

Static getRtpSavpTransportProtocol

  • getRtpSavpTransportProtocol(): string
  • Gets the protocol keyword for the Secure RTP audio/video profile.

    Returns string

Static getRtpSavpfTransportProtocol

  • getRtpSavpfTransportProtocol(): string
  • Gets the protocol keyword for the extended Secure RTP audio/video profile.

    Returns string

Static getUdpTlsRtpSavpTransportProtocol

  • getUdpTlsRtpSavpTransportProtocol(): string
  • Gets the protocol keyword for the Secure RTP audio/video profile with DTLS key exchange.

    Returns string

Static getUdpTlsRtpSavpfTransportProtocol

  • getUdpTlsRtpSavpfTransportProtocol(): string
  • Gets the protocol keyword for the extended Secure RTP audio/video profile with DTLS key exchange.

    Returns string

Static getWellKnownPayloadClockRate

  • getWellKnownPayloadClockRate(payloadType: number): number
  • Returns the clockrate of a well-known payload type.

    Parameters

    • payloadType: number

      The well-known payload type to get the clockrate of.

    Returns number

Static getWellKnownPayloadName

  • getWellKnownPayloadName(payloadType: number): string
  • Returns the name of a well-known payload type.

    Parameters

    • payloadType: number

      The well-known payload type to get the name of.

    Returns string

Static parse

  • parse(s: string): Media
  • Creates an fm.icelink.sdp.media instance from a string.

    Parameters

    • s: string

      The string to parse.

    Returns Media

Static supportsEncryption

  • supportsEncryption(protocol: string): boolean
  • Returns a value indicating whther a given protocol supports encryption.

    Parameters

    • protocol: string

      Protocol keyword.

    Returns boolean

    Value indicating whther a given protocol supports encryption.

Static supportsRtcpBasedFeedback

  • supportsRtcpBasedFeedback(protocol: string): boolean
  • Returns a value indicating whther a given protocol supports encryption.

    Parameters

    • protocol: string

      Protocol keyword.

    Returns boolean

    Value indicating whther a given protocol supports encryption.