Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #1411

Merged
merged 3 commits into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions packages/react-native-hms/src/classes/HMSUpdateListenerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
*
* @enum {string}
*
* @example
* ```typescript
* hmsInstance.addEventListener(HMSUpdateListenerActions.ON_JOIN, ({ room: HMSRoom }}) => {
* console.log('Joined room', data);
* // Handle the event
* });
* ```
*
* @property {string} ON_PREVIEW - Emitted when the local preview is available.
* @property {string} ON_JOIN - Emitted when the local user joins the room.
* @property {string} ON_ROOM_UPDATE - Emitted when there is an update related to the room.
Expand Down Expand Up @@ -85,6 +93,18 @@ export enum HMSUpdateListenerActions {
*/
ON_PEER_UPDATE = '3',

/**
* Event emitted when the list of peers in the room is updated.
*
* This event is triggered whenever there is a change in the list of peers present in the room, such as when a new peer joins,
* an existing peer leaves. It allows the application to react to changes in the room's
* participant list, enabling dynamic updates to the UI or other logic based on the current set of participants.
*
* @type {string}
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/large-room
*/
ON_PEER_LIST_UPDATED = 'ON_PEER_LIST_UPDATED',

/**
* Event emitted when there is an update related to a track in the room.
*
Expand Down Expand Up @@ -260,7 +280,7 @@ export enum HMSUpdateListenerActions {
ON_REMOTE_VIDEO_STATS = 'ON_REMOTE_VIDEO_STATS',

/**
* Event emitted when the audio device has changed.
* Event emitted when the audio device has changed. Android only.
*
* This event is triggered whenever there is a change in the audio output device, such as switching from the built-in speaker to a Bluetooth headset.
* Handling this event allows the application to update any UI elements or settings related to the current audio device, ensuring that the user is always aware of which device is being used for audio output.
Expand Down Expand Up @@ -294,18 +314,6 @@ export enum HMSUpdateListenerActions {
*/
ON_SESSION_STORE_CHANGED = 'ON_SESSION_STORE_CHANGED',

/**
* Event emitted when the list of peers in the room is updated.
*
* This event is triggered whenever there is a change in the list of peers present in the room, such as when a new peer joins,
* an existing peer leaves, or a peer's properties are updated. It allows the application to react to changes in the room's
* participant list, enabling dynamic updates to the UI or other logic based on the current set of participants.
*
* @type {string}
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/large-room
*/
ON_PEER_LIST_UPDATED = 'ON_PEER_LIST_UPDATED',

/**
* Event emitted when transcripts are available.
*
Expand Down
Loading