@defcomm/meetingsdk 0.4.0 → 0.4.2
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.
- package/dist/index.d.mts +6 -205
- package/dist/index.d.ts +6 -205
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2780,6 +2780,9 @@ var MeetingProvider = ({
|
|
|
2780
2780
|
const activeSpeakerListeners = useRef(
|
|
2781
2781
|
/* @__PURE__ */ new Set()
|
|
2782
2782
|
);
|
|
2783
|
+
const connectionStateListeners = useRef(
|
|
2784
|
+
/* @__PURE__ */ new Set()
|
|
2785
|
+
);
|
|
2783
2786
|
if (!sdkRef.current) {
|
|
2784
2787
|
sdkRef.current = new VideoSDKCore(
|
|
2785
2788
|
{
|
|
@@ -2809,6 +2812,11 @@ var MeetingProvider = ({
|
|
|
2809
2812
|
},
|
|
2810
2813
|
onReaction: (reaction) => {
|
|
2811
2814
|
reactionListeners.current.forEach((fn) => fn(reaction));
|
|
2815
|
+
},
|
|
2816
|
+
onConnectionStateChanged: (state) => {
|
|
2817
|
+
connectionStateListeners.current.forEach(
|
|
2818
|
+
(fn) => fn(state)
|
|
2819
|
+
);
|
|
2812
2820
|
}
|
|
2813
2821
|
}
|
|
2814
2822
|
);
|
|
@@ -2918,6 +2926,12 @@ var MeetingProvider = ({
|
|
|
2918
2926
|
reactionListeners.current.add(cb);
|
|
2919
2927
|
return () => reactionListeners.current.delete(cb);
|
|
2920
2928
|
},
|
|
2929
|
+
onConnectionStateChanged: (cb) => {
|
|
2930
|
+
connectionStateListeners.current.add(cb);
|
|
2931
|
+
return () => {
|
|
2932
|
+
connectionStateListeners.current.delete(cb);
|
|
2933
|
+
};
|
|
2934
|
+
},
|
|
2921
2935
|
onActiveSpeakersChanged: (cb) => {
|
|
2922
2936
|
activeSpeakerListeners.current.add(cb);
|
|
2923
2937
|
return () => {
|
|
@@ -3023,6 +3037,10 @@ var useMeeting = (handlers) => {
|
|
|
3023
3037
|
if (!handlers?.onRecordingStopped) return;
|
|
3024
3038
|
return ctx.onRecordingStopped(handlers.onRecordingStopped);
|
|
3025
3039
|
}, [handlers?.onRecordingStopped]);
|
|
3040
|
+
useEffect3(() => {
|
|
3041
|
+
if (!handlers?.onConnectionStateChanged) return;
|
|
3042
|
+
return ctx.onConnectionStateChanged(handlers.onConnectionStateChanged);
|
|
3043
|
+
}, [handlers?.onConnectionStateChanged]);
|
|
3026
3044
|
useEffect3(() => {
|
|
3027
3045
|
if (!handlers?.onReaction) return;
|
|
3028
3046
|
return ctx.onReaction(handlers.onReaction);
|
|
@@ -3163,7 +3181,6 @@ export {
|
|
|
3163
3181
|
ActiveSpeakerDetector,
|
|
3164
3182
|
MeetingProvider,
|
|
3165
3183
|
MeetingState,
|
|
3166
|
-
SFUClient,
|
|
3167
3184
|
VideoSDKCore,
|
|
3168
3185
|
useLocalParticipant,
|
|
3169
3186
|
useMeeting,
|