@videosdk.live/react-sdk 0.4.10 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,8 @@ export function MeetingProvider({
116
116
  * ---
117
117
  * @param onParticipantJoined - This event callback is trigger when a new participant joins the meeting.
118
118
  * ---
119
- * @param onParticipantLeft - This event callback is trigger when a participant leaves the meeting.
119
+ * @param onParticipantLeft - This event callback is triggered when a participant leaves the meeting.
120
+ * - It provides the participant object and an additional reason object describing why the participant left.
120
121
  * ---
121
122
  * @param onSpeakerChanged -
122
123
  * - This event will be emitted when a active speaker changed.
@@ -218,7 +219,7 @@ export function MeetingConsumer({
218
219
  }: {
219
220
  children: any;
220
221
  onParticipantJoined?: (participant: Participant) => void;
221
- onParticipantLeft?: (participant: Participant) => void;
222
+ onParticipantLeft?: (participant: Participant, reason: { message: string, code: number }) => void;
222
223
  onSpeakerChanged?: (activeSpeakerId: string | null) => void;
223
224
  onPresenterChanged?: (presenterId: string | null) => void;
224
225
  onMainParticipantChanged?: (participant: Participant) => void;
@@ -251,7 +252,7 @@ export function MeetingConsumer({
251
252
  reliability: string;
252
253
  }) => void;
253
254
  onMeetingJoined?: () => void;
254
- onMeetingLeft?: ({ reason, code }: { reason: string, code: string }) => void;
255
+ onMeetingLeft?: (reason: { message: string, code: number }) => void;
255
256
  onLiveStreamStarted?: () => void;
256
257
  onLiveStreamStopped?: () => void;
257
258
  onVideoStateChanged?: () => void;
@@ -675,7 +676,8 @@ export function useStream(
675
676
  /**
676
677
  * @param onParticipantJoined - This event callback is trigger when a new participant joins the meeting.
677
678
  * ---
678
- * @param onParticipantLeft - This event callback is trigger when a participant leaves the meeting.
679
+ * @param onParticipantLeft - This event callback is triggered when a participant leaves the meeting.
680
+ * - It provides the participant object and an additional reason object describing why the participant left.
679
681
  * ---
680
682
  * @param onSpeakerChanged -
681
683
  * - This event will be emitted when a active speaker changed.
@@ -786,7 +788,7 @@ export function useMeeting({
786
788
  onQualityLimitation,
787
789
  }?: {
788
790
  onParticipantJoined?: (participant: Participant) => void;
789
- onParticipantLeft?: (participant: Participant) => void;
791
+ onParticipantLeft?: (participant: Participant, reason: { message: string, code: number }) => void;
790
792
  onSpeakerChanged?: (activeSpeakerId: string | null) => void;
791
793
  onPresenterChanged?: (presenterId: string | null) => void;
792
794
  onMainParticipantChanged?: (participant: Participant) => void;
@@ -819,7 +821,7 @@ export function useMeeting({
819
821
  reliability: string;
820
822
  }) => void;
821
823
  onMeetingJoined?: () => void;
822
- onMeetingLeft?: ({ reason , code }: { reason: string, code: string }) => void;
824
+ onMeetingLeft?: (reason: { message: string, code: number }) => void;
823
825
  onLiveStreamStarted?: () => void;
824
826
  onLiveStreamStopped?: () => void;
825
827
  onVideoStateChanged?: () => void;
@@ -2019,5 +2021,22 @@ export const Constants: {
2019
2021
  VIDEO: Permission;
2020
2022
  AUDIO_AND_VIDEO: Permission;
2021
2023
  };
2024
+ leaveReason:{
2025
+ WEBSOCKET_DISCONNECTED: number,
2026
+ REMOVE_PEER: number,
2027
+ REMOVE_PEER_VIEWER_MODE_CHANGED: number,
2028
+ REMOVE_PEER_MEDIA_RELAY_STOP: number,
2029
+ SWITCH_ROOM: number,
2030
+ ROOM_CLOSE: number,
2031
+ UNKNOWN: number,
2032
+ REMOVE_ALL: number,
2033
+ MEETING_END_API: number,
2034
+ REMOVE_PEER_API: number,
2035
+ MANUAL_LEAVE_CALLED: number,
2036
+ WEBSOCKET_CONNECTION_ATTEMPTS_EXHAUSTED: number,
2037
+ JOIN_ROOM_FAILED: number,
2038
+ SWITCH_ROOM_FAILED: number,
2039
+ CHARACTER_REMOVED: number,
2040
+ }
2022
2041
  };
2023
2042
  export { CameraDeviceInfo, DeviceInfo, MicrophoneDeviceInfo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videosdk.live/react-sdk",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.modern.js",
@@ -74,7 +74,7 @@
74
74
  }
75
75
  },
76
76
  "dependencies": {
77
- "@videosdk.live/js-sdk": "0.3.10",
77
+ "@videosdk.live/js-sdk": "0.3.11",
78
78
  "events": "^3.3.0"
79
79
  }
80
80
  }