Options
All
  • Public
  • Public/Protected
  • All
Menu

The VideoController class is a managing class to control the video-related functions and states in an active meeting, such as mute or unmute local or remote video.

Hierarchy

  • VideoEventEmitter
    • VideoController

Index

Constructors

Events

  • Occurs when the local video state changes.

    Parameters

    • event: LOCAL_VIDEO_MUTE_CHANGED
    • listener: ((mute: boolean) => void)
        • (mute: boolean): void
        • Parameters

          • mute: boolean

          Returns void

    Returns any

  • Occurs when the remote video mute changes.

    Parameters

    • event: REMOTE_VIDEO_MUTE_CHANGED
    • listener: ((uid: string, mute: boolean) => void)
        • (uid: string, mute: boolean): void
        • Parameters

          • uid: string
          • mute: boolean

          Returns void

    Returns any

  • Occurs when the host or moderator wants you to unmute your video. This is a demand request, the app can decide whether to unmute.

    Parameters

    Returns any

Accessors

  • get _enableVbg(): boolean
  • set _enableVbg(bool: boolean): void
  • Returns boolean

  • Parameters

    • bool: boolean

    Returns void

  • get _enableVbgConfig(): undefined | VbgConfigImage | VbgConfigBlur
  • set _enableVbgConfig(config: undefined | VbgConfigImage | VbgConfigBlur): void
  • Returns undefined | VbgConfigImage | VbgConfigBlur

  • Parameters

    • config: undefined | VbgConfigImage | VbgConfigBlur

    Returns void

Methods

  • cancelDemandRequest(): void
  • Used for cancel video demand request by host

    Returns void

  • Disable the virtual background capacity

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • muteAllRemoteVideoStreams(allowUnmute?: boolean): Promise<ErrorCodeType>
  • Stops subscribing to the video stream of all meeting users.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • allowUnmute: boolean = true

      if True means the remote user can turn on the video by themselves, False means they can not.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Stops publishing the local video stream.

    description

    A successful call of muteLocalVideoStream triggers the VideoEvent.LOCAL_VIDEO_MUTE_CHANGED event callback to the local user.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Stops subscribing to the video stream of a specified user.

    description

    A successful call of muteRemoteVideoStream triggers the VideoEvent.REMOTE_VIDEO_MUTE_CHANGED event callback to the specified remote user.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the specified remote user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Removes the specified listener from the listener array for the event named eventName.

    Parameters

    Returns void

  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    Parameters

    Returns void

  • startPreview(constraints: boolean | MediaTrackConstraints): Promise<MediaStream>
  • Binds the video view and starts the local camera preview.

    Parameters

    • constraints: boolean | MediaTrackConstraints

    Returns Promise<MediaStream>

  • Unbinds the video view and stops the video camera preview.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • switchVirtualBackground(type: "blur"): Promise<ErrorCodeType>
  • switchVirtualBackground(type: "image", config: string): Promise<ErrorCodeType>
  • Enable the virtual background capacity and switch between blur and image types.

    Parameters

    • type: "blur"

      : "blur" | "image"

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • Parameters

    • type: "image"
    • config: string

    Returns Promise<ErrorCodeType>

  • Resumes subscribing to the video stream of all meeting users.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise

  • unmuteLocalVideoStream(mediaTrackConstraints?: boolean | MediaTrackConstraints, options?: IMediaStreamOptions): Promise<MediaStream>
  • Resumes publishing the local video stream.

    description

    A successful call of unmuteLocalVideoStream triggers the VideoEvent.LOCAL_VIDEO_MUTE_CHANGED event callback to the local user.

    Parameters

    • mediaTrackConstraints: boolean | MediaTrackConstraints = true
    • options: IMediaStreamOptions = {}

    Returns Promise<MediaStream>

    0 means the action succeeds or fails otherwise

  • Resumes subscribing to the video stream of a specified user.

    description

    A successful call of unmuteRemoteVideoStream triggers the VideoEvent.REMOTE_VIDEO_MUTE_CHANGED event callback to the specified remote user.

    description

    Only the meeting host or moderator has permission to invoke this method.

    Parameters

    • uid: string

      The unique id of the specified remote user

    Returns Promise<ErrorCodeType>

    0 means the action succeeds or fails otherwise