Javascript API Reference
    Preparing search index...

    Class Stream

    The Stream class is responsible for handling audio, video, and screen-sharing streams.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    codec: string

    This represents the codec used to encode and decode the stream.

    id: string

    This represents a unique identifier assigned to the stream.

    kind: "audio" | "video" | "share" | "shareAudio"

    This represents the kind of the stream.

    paused: boolean

    This represents whether the stream is currently paused.

    track: MediaStreamTrack

    This represents the underlying media track associated with the stream.

    Methods

    • Removes an event listener that was previously registered.

      Parameters

      • eventType: "state"

        Event name to which you want to unsubscribe.

      • listener: (data: any) => void

        Callback function which was passed while subscribing to the event.

        To view the complete list of available events and their details, refer to StreamEvent.

      Returns void

    • Registers an event listener.

      Parameters

      • eventType: "state"

        Event name to which you want to subscribe.

      • listener: (data: any) => void

        A callback function that is executed when the specified event is emitted.

        To view the complete list of available events and their details, refer to StreamEvent.

      Returns void

      • This method can be used to pause the stream for a remote participant.

      Returns void

      • This method can be used to resume the stream for a remote participant.

      Returns void