@videosdk.live/react-sdk 0.4.9 → 0.4.10
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.js +70 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +70 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +45 -2
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -251,7 +251,7 @@ export function MeetingConsumer({
|
|
|
251
251
|
reliability: string;
|
|
252
252
|
}) => void;
|
|
253
253
|
onMeetingJoined?: () => void;
|
|
254
|
-
onMeetingLeft?: () => void;
|
|
254
|
+
onMeetingLeft?: ({ reason, code }: { reason: string, code: string }) => void;
|
|
255
255
|
onLiveStreamStarted?: () => void;
|
|
256
256
|
onLiveStreamStopped?: () => void;
|
|
257
257
|
onVideoStateChanged?: () => void;
|
|
@@ -819,7 +819,7 @@ export function useMeeting({
|
|
|
819
819
|
reliability: string;
|
|
820
820
|
}) => void;
|
|
821
821
|
onMeetingJoined?: () => void;
|
|
822
|
-
onMeetingLeft?: () => void;
|
|
822
|
+
onMeetingLeft?: ({ reason , code }: { reason: string, code: string }) => void;
|
|
823
823
|
onLiveStreamStarted?: () => void;
|
|
824
824
|
onLiveStreamStopped?: () => void;
|
|
825
825
|
onVideoStateChanged?: () => void;
|
|
@@ -1187,6 +1187,49 @@ export function usePubSub(
|
|
|
1187
1187
|
}>;
|
|
1188
1188
|
};
|
|
1189
1189
|
|
|
1190
|
+
/**
|
|
1191
|
+
*
|
|
1192
|
+
* @param key - Represents the key for which you want to set the value in the realtime store.
|
|
1193
|
+
* ---
|
|
1194
|
+
* @param onValueChanged - This will get triggered when the value for the given key changes.
|
|
1195
|
+
* ---
|
|
1196
|
+
* @returns This will return `setValue()` and `getValue()` methods.
|
|
1197
|
+
* ---
|
|
1198
|
+
* **useRealtimeStore example**
|
|
1199
|
+
* ```js
|
|
1200
|
+
* var key = 'BLOCKED';
|
|
1201
|
+
*
|
|
1202
|
+
* function onValueChanged({value,updatedBy}) {
|
|
1203
|
+
* console.log('New Message:', message);
|
|
1204
|
+
* }
|
|
1205
|
+
*
|
|
1206
|
+
* const {setValue,getValue} = useRealtimeStore(key, {
|
|
1207
|
+
* onValueChanged,
|
|
1208
|
+
* });
|
|
1209
|
+
* ```
|
|
1210
|
+
*/
|
|
1211
|
+
export function useRealtimeStore(
|
|
1212
|
+
key: string,
|
|
1213
|
+
{
|
|
1214
|
+
onValueChanged,
|
|
1215
|
+
}?: {
|
|
1216
|
+
onValueChanged?: ({
|
|
1217
|
+
value,
|
|
1218
|
+
updatedBy,
|
|
1219
|
+
}: {
|
|
1220
|
+
value: string
|
|
1221
|
+
updatedBy: string,
|
|
1222
|
+
}) => void,
|
|
1223
|
+
}
|
|
1224
|
+
): {
|
|
1225
|
+
setValue: ({
|
|
1226
|
+
value
|
|
1227
|
+
}: {
|
|
1228
|
+
value: string;
|
|
1229
|
+
}) => Promise<any>;
|
|
1230
|
+
getValue: () => Promise<string>;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1190
1233
|
export function useFile(): {
|
|
1191
1234
|
uploadBase64File: ({
|
|
1192
1235
|
base64Data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videosdk.live/react-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
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.
|
|
77
|
+
"@videosdk.live/js-sdk": "0.3.10",
|
|
78
78
|
"events": "^3.3.0"
|
|
79
79
|
}
|
|
80
80
|
}
|