Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Publisher

Packs local media streams. Participants can publish it to a session. Initialized with OpenVidu.initPublisher method

Hierarchy

  • Publisher

Implements

Index

Properties

accessAllowed

accessAllowed: boolean = false

Whether the Publisher has been granted access to the requested input devices or not

element

element: HTMLElement

HTML DOM element in which the Publisher's video has been inserted

id

id: string

DOM id of the Publisher's video element

session

session: Session

The Session to which the Publisher belongs

stream

stream: Stream

The Stream that you are publishing

Methods

off

  • off(type: string, handler?: function): Publisher

on

once

  • once(type: string, handler: function): Publisher

publishAudio

  • publishAudio(value: boolean): void
  • Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect

    Parameters

    • value: boolean

      true to publish the audio stream, false to unpublish it

    Returns void

publishVideo

  • publishVideo(value: boolean): void
  • Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect

    Parameters

    • value: boolean

      true to publish the video stream, false to unpublish it

    Returns void

subscribeToRemote

  • subscribeToRemote(): void
  • Call this method before Session.publish to subscribe to your Publisher's stream as any other user would do. The local video will be automatically replaced by the remote video

    Returns void

Generated using TypeDoc