diff --git a/openvidu-browser/src/OpenVidu/Session.ts b/openvidu-browser/src/OpenVidu/Session.ts index d60e60fc..d82aa6b7 100644 --- a/openvidu-browser/src/OpenVidu/Session.ts +++ b/openvidu-browser/src/OpenVidu/Session.ts @@ -193,7 +193,7 @@ export class Session extends EventDispatcher { * and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `sessionDisconnected` to avoid this behavior and take care of disposing and cleaning all the Subscriber objects yourself. - * See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more. + * See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more. * * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session. * This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). diff --git a/openvidu-browser/src/OpenViduInternal/Events/EventMap/PublisherEventMap.ts b/openvidu-browser/src/OpenViduInternal/Events/EventMap/PublisherEventMap.ts index eb21f666..44d47ffc 100644 --- a/openvidu-browser/src/OpenViduInternal/Events/EventMap/PublisherEventMap.ts +++ b/openvidu-browser/src/OpenViduInternal/Events/EventMap/PublisherEventMap.ts @@ -21,6 +21,16 @@ import { StreamManagerEventMap } from './StreamManagerEventMap'; /** * Events dispatched by [[Publisher]] object. Manage event listeners with * [[Publisher.on]], [[Publisher.once]] and [[Publisher.off]] methods. + * + * Example: + * + * ```javascript + * publisher.on('accessDenied', () => { + * console.error('Camera access has been denied!'); + * } + * + * publisher.off('accessDenied'); + * ``` */ export interface PublisherEventMap extends StreamManagerEventMap { diff --git a/openvidu-browser/src/OpenViduInternal/Events/EventMap/SessionEventMap.ts b/openvidu-browser/src/OpenViduInternal/Events/EventMap/SessionEventMap.ts index 1ec7fd6a..90eb4045 100644 --- a/openvidu-browser/src/OpenViduInternal/Events/EventMap/SessionEventMap.ts +++ b/openvidu-browser/src/OpenViduInternal/Events/EventMap/SessionEventMap.ts @@ -30,6 +30,16 @@ import { StreamPropertyChangedEvent } from '../StreamPropertyChangedEvent'; /** * Events dispatched by [[Session]] object. Manage event listeners with * [[Session.on]], [[Session.once]] and [[Session.off]] methods. + * + * Example: + * + * ```javascript + * session.on('connectionCreated', (event) => { + * console.log('Connection ' + event.connection.connectionId + ' created'); + * } + * + * session.off('connectionDestroyed'); + * ``` */ export interface SessionEventMap extends EventMap { diff --git a/openvidu-browser/src/OpenViduInternal/Events/EventMap/StreamManagerEventMap.ts b/openvidu-browser/src/OpenViduInternal/Events/EventMap/StreamManagerEventMap.ts index 815a2b92..a7e8dc53 100644 --- a/openvidu-browser/src/OpenViduInternal/Events/EventMap/StreamManagerEventMap.ts +++ b/openvidu-browser/src/OpenViduInternal/Events/EventMap/StreamManagerEventMap.ts @@ -24,6 +24,16 @@ import { VideoElementEvent } from '../VideoElementEvent'; /** * Events dispatched by [[StreamManager]] object. Manage event listeners with * [[StreamManager.on]], [[StreamManager.once]] and [[StreamManager.off]] methods. + * + * Example: + * + * ```javascript + * streamManager.on('videoElementCreated', (event) => { + * console.log('New video element created:', event.element); + * } + * + * streamManager.off('videoElementCreated'); + * ``` */ export interface StreamManagerEventMap extends EventMap {