@defcomm/meetingsdk 0.4.6 → 0.4.8
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/react/MeetingProvider.tsx
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
createContext,
|
|
7
|
+
useContext,
|
|
8
|
+
useMemo,
|
|
9
|
+
useRef,
|
|
10
|
+
useState as useState2
|
|
11
|
+
} from "react";
|
|
6
12
|
|
|
7
13
|
// src/config/ws.ts
|
|
8
14
|
var SDK_CONFIG = {
|
|
@@ -1009,6 +1015,7 @@ var SFUClient = class {
|
|
|
1009
1015
|
}
|
|
1010
1016
|
case "reaction": {
|
|
1011
1017
|
const reaction = payload.reaction || payload;
|
|
1018
|
+
console.log("[SFUClient] RECEIVED REACTION", reaction);
|
|
1012
1019
|
if (reaction?.id && reaction?.emoji) this.onReaction(reaction);
|
|
1013
1020
|
break;
|
|
1014
1021
|
}
|
|
@@ -2875,6 +2882,11 @@ var MeetingProvider = ({
|
|
|
2875
2882
|
emoji: reaction.emoji
|
|
2876
2883
|
}
|
|
2877
2884
|
};
|
|
2885
|
+
console.log("[MeetingProvider] PUBSUB REACTION", message);
|
|
2886
|
+
pubSubListeners.current.get("REACTION")?.forEach((fn) => {
|
|
2887
|
+
console.log("[MeetingProvider] DELIVERING REACTION");
|
|
2888
|
+
fn(message);
|
|
2889
|
+
});
|
|
2878
2890
|
setReactionPubSubMessages(
|
|
2879
2891
|
(previous) => [...previous, message].slice(-50)
|
|
2880
2892
|
);
|
|
@@ -2942,14 +2954,16 @@ var MeetingProvider = ({
|
|
|
2942
2954
|
recording,
|
|
2943
2955
|
usePubSub: (topic) => {
|
|
2944
2956
|
if (topic === "SECURE_CHAT") {
|
|
2945
|
-
const chatMessages = messages.map(
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2957
|
+
const chatMessages = messages.map(
|
|
2958
|
+
(message) => ({
|
|
2959
|
+
id: message.id,
|
|
2960
|
+
topic: "SECURE_CHAT",
|
|
2961
|
+
sender_id: message.sender_id,
|
|
2962
|
+
sender_name: message.sender_name,
|
|
2963
|
+
timestamp: message.timestamp,
|
|
2964
|
+
data: message
|
|
2965
|
+
})
|
|
2966
|
+
);
|
|
2953
2967
|
return {
|
|
2954
2968
|
messages: chatMessages,
|
|
2955
2969
|
publish: ((data) => {
|