Interface PublisherEventMap

Events dispatched by Publisher object. Manage event listeners with on, once and off methods.

Example:

publisher.on('accessDenied', () => {
console.error('Camera access has been denied!');
}

publisher.off('accessDenied');

Hierarchy

Properties

accessAllowed: never

Event dispatched when a Publisher tries to access some media input device and has the required permissions to do so.

This happens when calling initPublisher or initPublisherAsync and the application has permissions to use the devices. This usually means the user has accepted the permissions dialog that the browser will show when trying to access the camera/microphone/screen.

accessDenied: never

Event dispatched when a Publisher tries to access some media input device and does NOT have the required permissions to do so.

This happens when calling initPublisher or initPublisherAsync and the application lacks the required permissions to use the devices. This usually means the user has NOT accepted the permissions dialog that the browser will show when trying to access the camera/microphone/screen.

accessDialogClosed: never

Event dispatched after the user clicks on "Allow" or "Block" in the pop-up shown by the browser to request permissions for the input media devices.

This event can only be triggered after an accessDialogOpened event has been previously triggered.

accessDialogOpened: never

Event dispatched when the pop-up shown by the browser to request permissions for the input media devices is opened.

You can use this event to alert the user about granting permissions for your website. Note that this event is artificially generated based only on time intervals when accessing media devices. A heavily overloaded client device that simply takes more than usual to access the media device could produce a false trigger of this event.

publisherStartSpeaking: PublisherSpeakingEvent

Event dispatched when the user owning the stream has started speaking.

Extra information:

  • This event will only be triggered for streams that have audio tracks (hasAudio must be true).
  • Further configuration can be applied on how the event is dispatched by setting property publisherSpeakingEventsOptions in the call of setAdvancedConfiguration.
publisherStopSpeaking: PublisherSpeakingEvent

Event dispatched when the user owning the stream has stopped speaking.

Extra information:

  • This event will only be triggered for streams that have audio tracks (hasAudio must be true).
  • Further configuration can be applied on how the event is dispatched by setting property publisherSpeakingEventsOptions in the call of setAdvancedConfiguration.
streamAudioVolumeChange: StreamManagerEvent

Event dispatched when the volume of the media stream's audio track changes. Only applies if hasAudio is true. The frequency this event is fired with is defined by property interval of publisherSpeakingEventsOptions (default 100ms)

streamCreated: StreamEvent

Event dispatched when the Publisher has been published to the session (see publish).

streamDestroyed: StreamEvent

Event dispatched when the Publisher has been unpublished from the session.

streamPlaying: StreamManagerEvent

Event dispatched when the media stream starts playing (one of its videos has media and has begun to play). This event will be dispatched when these 3 conditions are met:

  1. The StreamManager has no video associated in the DOM.
  2. It is associated to one video.
  3. That video starts playing. Internally the expected Web API event is HTMLMediaElement.canplay.
streamPropertyChanged: StreamPropertyChangedEvent

Event dispatched when a Stream undergoes any change in any of its mutable properties (see changedProperty).

videoElementCreated: VideoElementEvent

Event dispatched when a new HTML video element has been inserted into DOM by OpenVidu Browser library. See Manage video players section.

videoElementDestroyed: VideoElementEvent

Event dispatched when an HTML video element has been removed from DOM by OpenVidu Browser library. See Manage video players section.

Generated using TypeDoc