Interface VideoStreamIndex

[[VideoStreamIndex]] holds the set of video streams available on the server for subscription

interface VideoStreamIndex {
    allStreams(): VideoStreamIdSet;
    allVideoSendingSourcesExcludingSelf(selfAttendeeId: string): VideoSource[];
    attendeeIdForGroupId(groupId: number): string;
    attendeeIdForStreamId(streamId: number): string;
    attendeeIdForTrack(trackId: string): string;
    externalUserIdForTrack(trackId: string): string;
    groupIdForSSRC(ssrcId: number): number;
    groupIdForStreamId(streamId: number): number;
    highestQualityStreamFromEachGroupExcludingSelf(
        selfAttendeeId: string,
    ): VideoStreamIdSet;
    integrateBitratesFrame(bitrates: ISdkBitrateFrame): void;
    integrateIndexFrame(indexFrame: SdkIndexFrame): void;
    integrateSubscribeAckFrame(subscribeAck: SdkSubscribeAckFrame): void;
    integrateUplinkPolicyDecision(
        encodingParameters: RTCRtpEncodingParameters[],
    ): void;
    localStreamDescriptions(): VideoStreamDescription[];
    numberOfParticipants(): number;
    numberOfVideoPublishingParticipantsExcludingSelf(
        selfAttendeeId: string,
    ): number;
    overrideStreamIdMappings(previous: number, current: number): void;
    remoteStreamDescriptions(): VideoStreamDescription[];
    remoteVideoUpdateSent(): void;
    sendVideoStreamIdFromRid(rid: string): number;
    streamIdForSSRC(ssrcId: number): number;
    streamIdForTrack(trackId: string): number;
    StreamIdsInSameGroup(streamId1: number, streamId2: number): boolean;
    streamSelectionUnderBandwidthConstraint(
        selfAttendeeId: string,
        largeTileAttendeeIds: Set<string>,
        smallTileAttendeeIds: Set<string>,
        bandwidthKbps: number,
    ): VideoStreamIdSet;
    streamsPausedAtSource(): VideoStreamIdSet;
    subscribeFrameSent(): void;
}

Implemented by

Methods

  • Saves [[SdkSubscribeAckFrame]] in [[VideoStreamIndex]]

    Parameters

    • subscribeAck: SdkSubscribeAckFrame

    Returns void

  • Updates cached local stream description array via uplink decisions, an array of [[RTCRtpEncodingParameters]]

    Parameters

    • encodingParameters: RTCRtpEncodingParameters[]

    Returns void

  • Returns the number of participants who are publishing videos excluding self

    Parameters

    • selfAttendeeId: string

    Returns number

  • Override mappings using stream ID (i.e. for streamIdForTrack, and streamIdForSSRC) locally (i.e. without the need for a subscribe ACK message)

    Parameters

    • previous: number
    • current: number

    Returns void

  • This function caches the currently ingested index frame specifically as a backup for map functions like groupIdForStreamIdso that we can maintain information about previous senders simulcast streams to enable stream switching, e.g. if a sender is transmitting low/hi and switches to just low, receivers need the previously used index to be able to know what group ID the high stream corresponds to.

    Returns void

  • Determines if the stream ID's are from the same group (client)

    Parameters

    • streamId1: number
    • streamId2: number

    Returns boolean

  • Return a selection set of streams for subscription based on self attendee id, size information of tiles, bandwidth limitation

    Parameters

    • selfAttendeeId: string
    • largeTileAttendeeIds: Set<string>
    • smallTileAttendeeIds: Set<string>
    • bandwidthKbps: number

    Returns VideoStreamIdSet

  • This function caches the currently ingested index frame for subscribe related activities (e.g. mapping tracks).

    The index will also use the stored index as a backup for map functions like groupIdForStreamIdso that we can maintain information about previous senders simulcast streams to enable stream switching, e.g. if a sender is transmitting low/hi and switches to just low, receivers need the previous index to be able to know what group ID the high stream corresponds to.

    Returns void