Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MediaDescription

An SDP media description element.

Hierarchy

  • MediaDescription

Index

Constructors

Properties

Methods

Constructors

constructor

  • Initializes a new instance of the fm.icelink.sdp.mediaDescription class.

    Parameters

    • media: Media

      The media name and transport address.

    Returns MediaDescription

Properties

Private __bandwidths

__bandwidths: Array<Bandwidth>
internal

Private __mediaAttributes

__mediaAttributes: AttributeCollection
internal

Private __orphanedAttributes

__orphanedAttributes: Array<Attribute>
internal

Private _connectionData

_connectionData: ConnectionData
internal

Private _encryptionKey

_encryptionKey: EncryptionKey
internal

Private _media

_media: Media
internal

Private _mediaTitle

_mediaTitle: string
internal

Methods

addBandwidth

  • addBandwidth(bandwidth: Bandwidth): void
  • Adds a proposed bandwidth.

    Parameters

    • bandwidth: Bandwidth

      The proposed bandwidth to add.

    Returns void

addMediaAttribute

  • addMediaAttribute(attribute: Attribute): void
  • Adds a media-level attribute.

    Parameters

    • attribute: Attribute

      The session-level attribute to add.

    Returns void

getBandwidths

  • getBandwidths(): Bandwidth[]
  • Gets the array of proposed bandwidths to be used by the media.

    Returns Bandwidth[]

getCandidateAttributes

  • getCandidateAttributes(): Attribute[]
  • Obtains Ice Candidate attributes associated with this media description.

    Returns Attribute[]

getCcmFirFeedbackAttribute

  • getCcmFirFeedbackAttribute(payloadType: number): FeedbackAttribute
  • Gets the RTCP "ccm fir" feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FeedbackAttribute

getConnectionData

  • getConnectionData(): ConnectionData
  • Gets media-level connection data.

    Returns ConnectionData

getCryptoAttributes

  • getCryptoAttributes(): CryptoAttribute[]
  • Gets CryptoAttributes associated with this MediaDescription.

    Returns CryptoAttribute[]

getEncryptionKey

  • getEncryptionKey(): EncryptionKey
  • Gets the media-level encryption key.

    Returns EncryptionKey

getFingerprintAttribute

  • getFingerprintAttribute(): FingerprintAttribute
  • Gets the Fingerprint Attribute from this MediaDescription

    Returns FingerprintAttribute

getFormatParametersAttribute

  • getFormatParametersAttribute(payloadType: number): FormatParametersAttribute
  • Gets the format parameters attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FormatParametersAttribute

getIceOptionAttributes

  • getIceOptionAttributes(): Attribute[]
  • Obtains Ice Options attributes associated with this media description.

    Returns Attribute[]

getIcePasswordAttribute

  • getIcePasswordAttribute(): PasswordAttribute
  • Gets the IcePasswordAttribute associated with this MediaDescription

    Returns PasswordAttribute

getIceUfragAttribute

  • getIceUfragAttribute(): UfragAttribute
  • Gets the IceUfragAttribute associated with this MediaDescription

    Returns UfragAttribute

getIsApplication

  • getIsApplication(): boolean
  • Gets whether this media description represents an application stream (media type == "application").

    Returns boolean

getIsAudio

  • getIsAudio(): boolean
  • Gets whether this media description represents an audio stream (media type == "audio").

    Returns boolean

getIsMessage

  • getIsMessage(): boolean
  • Gets whether this media description represents a message stream (media type == "message").

    Returns boolean

getIsText

  • getIsText(): boolean
  • Gets whether this media description represents a text stream (media type == "text").

    Returns boolean

getIsVideo

  • getIsVideo(): boolean
  • Gets whether this media description represents a video stream (media type == "video").

    Returns boolean

getMaxPacketTimeAttribute

  • getMaxPacketTimeAttribute(): MaxPacketTimeAttribute
  • Obtains the maximum packet time attribute.

    Returns MaxPacketTimeAttribute

getMedia

  • getMedia(): Media
  • Gets the media name and transport address.

    Returns Media

getMediaAttributes

  • getMediaAttributes(): Attribute[]
  • Gets the array of media-level attributes.

    Returns Attribute[]

getMediaTitle

  • getMediaTitle(): string
  • Gets the media title.

    Returns string

getNackFeedbackAttribute

  • getNackFeedbackAttribute(payloadType: number): FeedbackAttribute
  • Gets the RTCP "nack" feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FeedbackAttribute

getNackPliFeedbackAttribute

  • getNackPliFeedbackAttribute(payloadType: number): FeedbackAttribute
  • Gets the RTCP "nack pli" feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FeedbackAttribute

getNackRpsiFeedbackAttribute

  • getNackRpsiFeedbackAttribute(payloadType: number): FeedbackAttribute
  • Gets the RTCP "nack rpsi" feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FeedbackAttribute

getNackSliFeedbackAttribute

  • getNackSliFeedbackAttribute(payloadType: number): FeedbackAttribute
  • Gets the RTCP "nack sli" feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    Returns FeedbackAttribute

getPacketTimeAttribute

  • getPacketTimeAttribute(): PacketTimeAttribute
  • Obtains the packet time attribute.

    Returns PacketTimeAttribute

getQualityAttribute

  • getQualityAttribute(): QualityAttribute
  • Gets the QualityAttribute associated with this MediaDescription.

    Returns QualityAttribute

getRtcpAttribute

  • getRtcpAttribute(): Attribute
  • Gets Rtcp Attributes associated with this media description.

    Returns Attribute

getRtcpFeedbackAttribute

  • getRtcpFeedbackAttribute(payloadType: number, type: string, subType: string): FeedbackAttribute
  • Gets the RTCP feedback attribute for the given payload type.

    Parameters

    • payloadType: number

      The payload type.

    • type: string

      The type.

    • subType: string

      The sub-type.

    Returns FeedbackAttribute

getRtcpMultiplexingSupported

  • getRtcpMultiplexingSupported(): boolean
  • Gets a value indicating support for RTCP Multiplexing.

    Returns boolean

getRtpExtMapAttributes

  • getRtpExtMapAttributes(): Attribute[]
  • Obtains the RTP ext-map attributes.

    Returns Attribute[]

getRtpMapAttribute

  • getRtpMapAttribute(formatName: string, clockRate: number, formatParameters: string, rtpMapAttributeIndex: Holder<number>): MapAttribute
  • getRtpMapAttribute(formatName: string, clockRate: number, formatParameters: string): MapAttribute
  • Obtains the RTP map attribute for a given format.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    • rtpMapAttributeIndex: Holder<number>

      The index of the fm.icelink.sdp.rtp.mapAttribute.

    Returns MapAttribute

  • Obtains the RTP map attribute for a given format.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    Returns MapAttribute

getRtpMapAttributes

  • getRtpMapAttributes(): Attribute[]
  • getRtpMapAttributes(formatName: string, clockRate: number, formatParameters: string, rtpMapAttributeIndices: Holder<number[]>): MapAttribute[]
  • getRtpMapAttributes(formatName: string, clockRate: number, formatParameters: string): MapAttribute[]
  • Obtains the RTP map attributes.

    Returns Attribute[]

  • Obtains the RTP map attributes for a given format.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    • rtpMapAttributeIndices: Holder<number[]>

      The indeces of the fm.icelink.sdp.rtp.mapAttribute.

    Returns MapAttribute[]

  • Obtains the RTP map attributes for a given format.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    Returns MapAttribute[]

getSctpMapAttribute

  • getSctpMapAttribute(): MapAttribute
  • Gets the Sctp Map Attribute, if it is present in the Media Description.

    Returns MapAttribute

getSctpMaxMessageSizeAttribute

  • getSctpMaxMessageSizeAttribute(): MaxMessageSizeAttribute
  • Gets the Sctp Max Message Size Attribute, if it is present in the Media Description.

    Returns MaxMessageSizeAttribute

getSetupAttribute

  • getSetupAttribute(): SetupAttribute
  • Gets the SetupAttribute associated with this MediaDescription.

    Returns SetupAttribute

getSsrcAttribute

  • getSsrcAttribute(ssrc: number, name: string, value: string): SsrcAttribute
  • Obtains the SSRC attribute matching a given synchronization source, name, and value.

    Parameters

    • ssrc: number

      The synchronization source.

    • name: string

      The attribute name.

    • value: string

      The attribute value.

    Returns SsrcAttribute

getSsrcAttributes

  • getSsrcAttributes(): SsrcAttribute[]
  • getSsrcAttributes(ssrc: number): SsrcAttribute[]
  • getSsrcAttributes(ssrc: number, name: string): SsrcAttribute[]
  • Obtains the SSRC attributes.

    Returns SsrcAttribute[]

  • Obtains the SSRC attributes matching a given synchronization source.

    Parameters

    • ssrc: number

      The synchronization source.

    Returns SsrcAttribute[]

  • Obtains the SSRC attributes matching a given synchronization source and name.

    Parameters

    • ssrc: number

      The synchronization source.

    • name: string

      The attribute name.

    Returns SsrcAttribute[]

getStreamDirection

  • getStreamDirection(): StreamDirection
  • Gets the stream direction indicated in Media Description. Getter returns StreamDirection if DirectionAttribute is present; otherwise, returns StreamDirection.Unset.

    Returns StreamDirection

getSupportsRtcpMultiplexing

  • getSupportsRtcpMultiplexing(): boolean
  • Gets a value stating whether this media description indicates RTCP Multiplexing support

    Returns boolean

getTypeString

  • getTypeString(): string
  • Returns string

insertCcmFirAttribute

  • insertCcmFirAttribute(formatName: string, clockRate: number, formatParameters: string): boolean
  • Inserts a CCM-FIR attribute for the given format if it doesn't already exist.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    Returns boolean

insertMediaAttribute

  • insertMediaAttribute(attribute: Attribute, index: number): void
  • DEPRECATED: Use AddMediaAttribute instead. Inserts a media-level attribute at the given index.

    Parameters

    • attribute: Attribute

      The session-level attribute to add.

    • index: number

      The index.

    Returns void

insertNackPliAttribute

  • insertNackPliAttribute(formatName: string, clockRate: number, formatParameters: string): boolean
  • Inserts a NACK-PLI attribute for the given format if it doesn't already exist.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    Returns boolean

insertRembAttribute

  • insertRembAttribute(formatName: string, clockRate: number, formatParameters: string): boolean
  • Inserts a REMB attribute for the given format if it doesn't already exist.

    Parameters

    • formatName: string

      Format name.

    • clockRate: number

      Clock rate.

    • formatParameters: string

      Format parameters.

    Returns boolean

Private isMediaType

  • isMediaType(mediaType: string): boolean
  • internal

    Parameters

    • mediaType: string

    Returns boolean

removeBandwidth

  • removeBandwidth(bandwidth: Bandwidth): boolean
  • Removes a proposed bandwidth.

    Parameters

    • bandwidth: Bandwidth

      The proposed bandwidth to remove.

    Returns boolean

removeMediaAttribute

  • removeMediaAttribute(attribute: Attribute): boolean
  • Removes a media-level attribute.

    Parameters

    • attribute: Attribute

      The session-level attribute to remove.

    Returns boolean

setConnectionData

  • setConnectionData(value: ConnectionData): void
  • Sets media-level connection data.

    Parameters

    • value: ConnectionData

    Returns void

setEncryptionKey

  • setEncryptionKey(value: EncryptionKey): void
  • Sets the media-level encryption key.

    Parameters

    • value: EncryptionKey

    Returns void

Private setMedia

  • setMedia(value: Media): void
  • internal

    Parameters

    • value: Media

    Returns void

setMediaTitle

  • setMediaTitle(value: string): void
  • Sets the media title.

    Parameters

    • value: string

    Returns void

setQualityAttribute

  • setQualityAttribute(value: QualityAttribute): void
  • Sets the QualityAttribute associated with this MediaDescription.

    Parameters

    • value: QualityAttribute

    Returns void

setRtcpAttribute

  • setRtcpAttribute(value: Attribute): void
  • Sets Rtcp Attributes associated with this media description.

    Parameters

    • value: Attribute

    Returns void

setSetupAttribute

  • setSetupAttribute(value: SetupAttribute): void
  • Sets the SetupAttribute associated with this MediaDescription.

    Parameters

    • value: SetupAttribute

    Returns void

setStreamDirection

  • setStreamDirection(value: StreamDirection): void
  • Sets the stream direction indicated in Media Description. Getter returns StreamDirection if DirectionAttribute is present; otherwise, returns StreamDirection.Unset.

    Parameters

    • value: StreamDirection

    Returns void

supportsIce

  • supportsIce(): boolean
  • Gets a value indicating whether this SDP MediaDescription suggests support for ICE.

    Returns boolean

toString

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

    Returns string

updateQualityAttributeValue

  • updateQualityAttributeValue(quality: number): void
  • Updates SDP Quality Attribute associated with this media description if one is present. Otherwise, creates a new one and inserts it into this media description.

    Parameters

    • quality: number

    Returns void

Static getCryptoAttributesFromCollection

  • internal

    Parameters

    Returns CryptoAttribute[]

Static getFingerprintAttributeFromCollection

  • internal

    Parameters

    Returns FingerprintAttribute

Static getIceOptionAttributesFromCollection

  • internal

    Parameters

    Returns Attribute[]

Static getIcePasswordAttributeFromCollection

  • internal

    Parameters

    Returns PasswordAttribute

Static getIceUfragAttributeFromCollection

  • internal

    Parameters

    Returns UfragAttribute

Static getQualityAttributeFromCollection

  • internal

    Parameters

    Returns QualityAttribute

Static getRtcpMultiplexingSupportFromCollection

  • internal

    Parameters

    Returns boolean

Static getRtpExtMapAttributesFromCollection

  • internal

    Parameters

    Returns Attribute[]

Static getSetupAttributeFromCollection

  • internal

    Parameters

    Returns SetupAttribute

Static getStreamDirectionFromCollection

  • internal

    Parameters

    Returns StreamDirection

Static getSupportsIceFromCollection

  • internal

    Parameters

    Returns boolean

Static parse

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

    Parameters

    • s: string

      The string to parse.

    Returns MediaDescription