@videosdk.live/react-sdk 0.3.9 → 0.3.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.
@@ -86,7 +86,8 @@ export class Character extends Participant {
86
86
  | 'character-joined'
87
87
  | 'character-left'
88
88
  | 'user-message'
89
- | 'data',
89
+ | 'data'
90
+ | 'error',
90
91
  listener: (data: any) => void
91
92
  ): void;
92
93
  /**
@@ -105,7 +106,8 @@ export class Character extends Participant {
105
106
  | 'character-joined'
106
107
  | 'character-left'
107
108
  | 'user-message'
108
- | 'data',
109
+ | 'data'
110
+ | 'error',
109
111
  listener: (data: any) => void
110
112
  ): void;
111
113
  }
@@ -1242,6 +1242,8 @@ export function useTranscription({
1242
1242
  * ---
1243
1243
  * @param onData - This will triggered when a character worker notify payload.
1244
1244
  * ---
1245
+ * @param onError - This will triggered when a there is an error related to character.
1246
+ * ---
1245
1247
  * @param onStreamEnabled - It's a callback which gets triggered whenever a character's video, audio or screen share stream is enabled.
1246
1248
  * ---
1247
1249
  * @param onStreamEnabled - It's a callback which gets triggered whenever a character's video, audio or screen share stream is disabled.
@@ -1272,6 +1274,10 @@ export function useTranscription({
1272
1274
  * function onData(topic, data) {
1273
1275
  * console.log('character data available:', topic, data);
1274
1276
  * }
1277
+ *
1278
+ * function onError(topic, data) {
1279
+ * console.log('character error:', data.code,data.message);
1280
+ * }
1275
1281
  *
1276
1282
  * const { join, leave, sendMessage, interrupt } = useCharacter({
1277
1283
  * interactionId,
@@ -1288,6 +1294,7 @@ export function useTranscription({
1288
1294
  * onCharacterMessage,
1289
1295
  * onUserMessage,
1290
1296
  * onData,
1297
+ * onError,
1291
1298
  * onCharacterJoined,
1292
1299
  * onCharacterLeft,
1293
1300
  *
@@ -1333,6 +1340,7 @@ export function useCharacter(
1333
1340
  onCharacterMessage,
1334
1341
  onUserMessage,
1335
1342
  onData,
1343
+ onError,
1336
1344
  onStreamEnabled,
1337
1345
  onStreamDisabled,
1338
1346
  onMediaStatusChanged,
@@ -1356,6 +1364,7 @@ export function useCharacter(
1356
1364
  }) => void;
1357
1365
 
1358
1366
  onData?: (topic: string, data: any) => void;
1367
+ onError?: (data: any) => void;
1359
1368
  onCharacterJoined?: () => void;
1360
1369
  onCharacterLeft?: () => void;
1361
1370
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videosdk.live/react-sdk",
3
- "version": "0.3.9",
3
+ "version": "0.3.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.2.7",
77
+ "@videosdk.live/js-sdk": "^0.2.9",
78
78
  "events": "^3.3.0"
79
79
  }
80
80
  }