Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PublisherSpeakingEvent

Defines the following events:

  • publisherStartSpeaking: dispatched by Session
  • publisherStopSpeaking: dispatched by Session

More information:

  • This events will only be triggered for remote streams that have audio tracks
  • Both events share the same lifecycle. That means that you can subscribe to only one of them if you want, but if you call Session.off('publisherStopSpeaking'), keep in mind that this will also internally remove any 'publisherStartSpeaking' event
  • You can further configure how the events are dispatched by setting property publisherSpeakingEventsOptions in the call of OpenVidu.setAdvancedConfiguration

Hierarchy

  • Event
    • PublisherSpeakingEvent

Index

Properties

cancelable

cancelable: boolean

Whether the event has a default behaviour that may be prevented by calling Event.preventDefault

connection

connection: Connection

The client that started or stopped speaking

streamId

streamId: string

The streamId of the Stream affected by the speaking event

target

The object that dispatched the event

type

type: string

The type of event. This is the same string you pass as first parameter when calling method on() of any object implementing EventDispatcher interface

Methods

isDefaultPrevented

  • isDefaultPrevented(): boolean

preventDefault

  • preventDefault(): void
  • Prevents the default behaviour of the event. The following events have a default behaviour:

    • sessionDisconnected: automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and also deletes the HTML video element associated to it.
    • streamDestroyed: if dispatched by a Publisher (you have unpublished), automatically stops all media tracks and deletes the HTML video element associated to the stream. If dispatched by Session, (other user has unpublished), automatically unsubscribes the proper Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and deletes the HTML video element associated to it.

    Returns void

Generated using TypeDoc