Options
All
  • Public
  • Public/Protected
  • All
Menu

The StreamStore class is used for managing media streams.

Hierarchy

Index

Constructors

constructor

Accessors

localCameraStreamUuid

  • get localCameraStreamUuid(): undefined | string
  • Loal camera stream UUID

    Returns undefined | string

localMicStreamUuid

  • get localMicStreamUuid(): undefined | string
  • Local microphone stream UUID

    Returns undefined | string

localShareStreamUuid

  • get localShareStreamUuid(): undefined | string
  • Local screen stream UUID

    Returns undefined | string

shareStreamToken

  • get shareStreamToken(): undefined | string
  • Local screen share token

    Returns undefined | string

shareStreamTokens

  • get shareStreamTokens(): Map<string, string>
  • Screen share tokens key: Stream UUID value: RTC token

    Returns Map<string, string>

streamByStreamUuid

  • get streamByStreamUuid(): Map<string, EduStream>
  • Streams in the room key: Stream UUID value: Stream object

    Returns Map<string, EduStream>

streamByUserUuid

  • get streamByUserUuid(): Map<string, Set<string>>
  • Stream UUID set indexed by User UUID key: User UUID value: Set of stream UUID

    Returns Map<string, Set<string>>

streamVolumes

  • get streamVolumes(): Map<string, number>
  • Volume list indexed by stream UUID key: Stream UUID value: volume value, range by: 0 ~ 1

    Returns Map<string, number>

Methods

destroyScreenShareStream

  • Destroys the screen stream

    Parameters

    Returns void

initializeScreenShareStream

  • initializeScreenShareStream(scene: AgoraRteScene, streamUuid: string, rtcToken: string): void
  • Initializes the screen stream

    Parameters

    • scene: AgoraRteScene

      Room object

    • streamUuid: string

      Stream UUID

    • rtcToken: string

      RTC Token

    Returns void

muteRemoteAudioStream

  • Subscribes/Unsubscribes the remote audio stream

    Parameters

    • stream: EduStream

      Stream object

    • muted: boolean

      Whether to subscribe

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns void

muteRemoteVideoStream

  • Subscribes/Unsubscribes the remote video stream

    Parameters

    • stream: EduStream

      Stream object

    • muted: boolean

      Whether to subscribe

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns void

muteRemoteVideoStreamMass

  • muteRemoteVideoStreamMass(streams: EduStream[], muted: boolean, fromScene?: AgoraRteScene): undefined | Promise<string[]>
  • Subscribes a batch of streams

    Parameters

    • streams: EduStream[]

      Set of stream object

    • muted: boolean

      Whether to subscribe

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns undefined | Promise<string[]>

publishScreenShare

  • Creates a screen share stream for the local user, returns the stream id and the token of the created stream. This method only allows creating one screen share stream in the room, if multiple streams are needed, please use publishScreenShareStateless

    Parameters

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    • Optional streamOptions: Partial<AgoraStreamStates>

      Options for publishing stream

    Returns Promise<any>

publishScreenShareStateless

  • publishScreenShareStateless(fromScene?: AgoraRteScene): Promise<any>
  • Creates a screen share stream for the local user, returns the stream id and the token of the created stream. This method allows creating multiple screen share streams in the room

    Parameters

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<any>

publishStreamToCdn

  • Bypass push, pushs the currently published stream to CDN

    Parameters

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<void>

setLatencyLevel

  • Sets the delay level (only available if the current user has no audio and video streams published)

    Parameters

    • level: AgoraLatencyLevel

      Level of streaming delay

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<void>

setRemoteVideoStreamType

  • Sets the remote video stream quality type

    Parameters

    • streamUuid: string

      The UUID of the stream to be set

    • remoteVideoStreamType: AGRemoteVideoStreamType

      The stream type to set

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<void>

setupRemoteVideo

  • Renders the remote video

    Parameters

    • stream: EduStream

      Stream object

    • dom: HTMLElement

      DOM node

    • mirror: boolean

      Whether to apply mirror

    • Optional renderMode: AGRenderMode

      Mode of rendering video

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns void

unpublishScreenShare

  • Removes the screen share stream that is created for the local user before

    Parameters

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<void>

unpublishScreenShareStateless

  • unpublishScreenShareStateless(fromScene?: AgoraRteScene): Promise<void>
  • Removes the screen share stream that is created for the local user before

    Parameters

    • Optional fromScene: AgoraRteScene

      The room object in which the stream resides, if not passed, defaults to the current room

    Returns Promise<void>

updateExpandedScopeAndStreams

  • updateExpandedScopeAndStreams(state: 0 | 1, data: { userUuids: string[] }): Promise<void>
  • Updates the status and users of the video gallery

    Parameters

    • state: 0 | 1

      1 open 0 close

    • data: { userUuids: string[] }

      userUuids users who publish streams

      • userUuids: string[]

    Returns Promise<void>

updateLocalPublishState

updateRemotePublishState

updateRemotePublishStateBatch