matrix-js-sdk
    Preparing search index...

    Class CallMembership

    Index
    backendIdentities: string[]

    Possible identities which this member may have on the backends of their published transports.

    rtcBackendIdentity: string

    Check the backend for the existence of any of backendIdentities instead.

    • 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 nuance for a generated (sha256) anonymised identity. Only send backendIdentities 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

    • get transports(): Transport[]

      The value of the transports.published field for RTC memberships (m.rtc.member). Or the value of the foci_preferred field for legacy session memberships (m.call.member).

      Returns Transport[]

    • 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.

    • Experimental

      Gets the primary transport used by this call membership to publish media.

      For RTC membership (m.rtc.member), the transport is computed from the transports.published array. For legacy session membership (m.call.member), in turn, the transport is computed from the foci_preferred array.

      Regardless of the membership kind, the transport is chosen in the following sequence:

      1. Return the first m.livekit transport from the array if there is one.
      2. Otherwise, return the first livekit transport from the array if there is one.
      3. Otherwise, return the first element of the array.

      Parameters

      Returns Transport | undefined

      The transport this membership uses to publish media.

      Part of MSC4195.