matrix-js-sdk
    Preparing search index...

    Class CallMembership

    Index

    Properties

    rtcBackendIdentity: string

    Accessors

    • get applicationData(): { type: string; [key: string]: unknown }

      Information about the application being used for the RTC session. May contain extra keys specific to the application.

      Returns { type: string; [key: string]: unknown }

    • get memberId(): string

      This computes the membership ID for the membership. For the sticky event based rtcSessionData this is trivial it is member.id. This is not supposed to be used to identity on an rtc backend. This is just a nouance for a generated (sha256) anonymised identity. Only send rtcBackendIdentity to any rtc backend service.

      For the legacy sessionMemberEvents it is a bit more complex. Here we sometimes do not have this data in the event content and we expected the SFU and the client to use ${this.matrixEventData.sender}:${data.device_id}.

      So if there is no membershipID we use the hard coded jwt id default (${this.matrixEventData.sender}:${data.device_id}) value (used until version 0.16.0)

      It is also possible for a session event to set a custom membershipID. in that case this will be used.

      Returns string

    • get scope(): "m.room" | "m.user" | undefined

      Returns "m.room" | "m.user" | undefined

      scope is not used and will be removed in future versions. replaced by application specific types.

    • get slotId(): string

      The ID of the MatrixRTC slot that this membership belongs to (format {application}#{id}). This is computed in case SessionMembershipData is used.

      Returns string

    Methods

    • Gets the absolute expiry timestamp of the membership.

      Returns number | undefined

      The absolute expiry time of the membership as a unix timestamp in milliseconds or undefined if not applicable

    • Returns number | undefined

      The number of milliseconds until the membership expires or undefined if applicable

      Not used by RTC events.

    • Gets the primary transport to use for this RTC membership (m.rtc.member). This will return the primary transport that is used by this call membership to publish their media. Directly relates to the rtc_transports field.

      In case of a legacy session membership (m.call.member) this will return the selected transport where media is published. How this selection happens depends on the focus_active field of the session membership. If the focus_selection is oldest_membership this will return the transport of the oldest membership in the room (based on the created_ts field of the session membership). If the focus_selection is multi_sfu it will return the first transport of the foci_preferred list. (multi_sfu is equivalent to how m.rtc.member rtc_transports work).

      Parameters

      • oldestMembership: CallMembership

        For backwards compatibility with session membership (legacy). Unused in case of RTC membership. Always required to make the consumer not care if it deals with RTC or session memberships.

      Returns Transport | undefined

      The transport this membership uses to publish media or undefined if no transport is available.