@videosdk.live/react-sdk 0.1.105 → 0.2.1
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +102 -93
- package/dist/types/meeting.d.ts +2 -2
- package/dist/types/participant.d.ts +1 -1
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -44,13 +44,15 @@ import { Character, CharacterMode, CharacterState } from './character';
|
|
|
44
44
|
* ---
|
|
45
45
|
* @param config.mode -
|
|
46
46
|
*
|
|
47
|
-
* - There are
|
|
47
|
+
* - There are 3 types of modes:
|
|
48
|
+
*
|
|
49
|
+
* - **SEND_AND_RECV**: Both audio and video streams will be produced and consumed in this mode.
|
|
50
|
+
*
|
|
51
|
+
* - **RECV_ONLY**: Both audio and video streams will be only consumed in this mode.
|
|
52
|
+
*
|
|
53
|
+
* - **SIGNALLING_ONLY**: Audio and video streams will not be produced or consumed in this mode.
|
|
48
54
|
*
|
|
49
|
-
* -
|
|
50
|
-
*
|
|
51
|
-
* - **VIEWER**: Audio and video streams will not be produced or consumed in this mode.
|
|
52
|
-
*
|
|
53
|
-
* - defaultValue : **CONFERENCE**
|
|
55
|
+
* - defaultValue : **SEND_AND_RECV**
|
|
54
56
|
*
|
|
55
57
|
* ---
|
|
56
58
|
*
|
|
@@ -95,7 +97,7 @@ export function MeetingProvider({
|
|
|
95
97
|
customCameraVideoTrack?: MediaStream | undefined;
|
|
96
98
|
customMicrophoneAudioTrack?: MediaStream | undefined;
|
|
97
99
|
multiStream?: boolean;
|
|
98
|
-
mode?: '
|
|
100
|
+
mode?: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY';
|
|
99
101
|
metaData?: object;
|
|
100
102
|
defaultCamera?: 'front' | 'back';
|
|
101
103
|
debugMode: boolean;
|
|
@@ -164,8 +166,9 @@ export function MeetingProvider({
|
|
|
164
166
|
* @param onParticipantModeChanged -
|
|
165
167
|
* - This event will be triggered when mode gets chanded.
|
|
166
168
|
* - It will pass mode, as an event callback parameter.
|
|
167
|
-
* - **
|
|
168
|
-
* - **
|
|
169
|
+
* - **SEND_AND_RECV**: Both audio and video streams will be produced and consumed in this mode.
|
|
170
|
+
* - **RECV_ONLY**: Both audio and video streams will be only consumed in this mode.
|
|
171
|
+
* - **SIGNALLING_ONLY**: Audio and video streams will not be produced or consumed in this mode.
|
|
169
172
|
*/
|
|
170
173
|
|
|
171
174
|
export function MeetingConsumer({
|
|
@@ -280,11 +283,11 @@ export function MeetingConsumer({
|
|
|
280
283
|
livestreamUrl
|
|
281
284
|
}: {
|
|
282
285
|
status:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
| 'HLS_STARTING'
|
|
287
|
+
| 'HLS_STARTED'
|
|
288
|
+
| 'HLS_PLAYABLE'
|
|
289
|
+
| 'HLS_STOPPING'
|
|
290
|
+
| 'HLS_STOPPED';
|
|
288
291
|
downstreamUrl?: string;
|
|
289
292
|
playbackHlsUrl?: string;
|
|
290
293
|
livestreamUrl?: string;
|
|
@@ -293,37 +296,37 @@ export function MeetingConsumer({
|
|
|
293
296
|
status
|
|
294
297
|
}: {
|
|
295
298
|
status:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
299
|
+
| 'RECORDING_STARTING'
|
|
300
|
+
| 'RECORDING_STARTED'
|
|
301
|
+
| 'RECORDING_STOPPING'
|
|
302
|
+
| 'RECORDING_STOPPED';
|
|
300
303
|
}) => void;
|
|
301
304
|
onLivestreamStateChanged?: ({
|
|
302
305
|
status
|
|
303
306
|
}: {
|
|
304
307
|
status:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
| 'LIVESTREAM_STARTING'
|
|
309
|
+
| 'LIVESTREAM_STARTED'
|
|
310
|
+
| 'LIVESTREAM_STOPPING'
|
|
311
|
+
| 'LIVESTREAM_STOPPED';
|
|
309
312
|
}) => void;
|
|
310
313
|
onMeetingStateChanged?: ({
|
|
311
314
|
state
|
|
312
315
|
}: {
|
|
313
316
|
state:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
| 'CONNECTING'
|
|
318
|
+
| 'CONNECTED'
|
|
319
|
+
| 'FAILED'
|
|
320
|
+
| 'DISCONNECTED'
|
|
321
|
+
| 'CLOSING'
|
|
322
|
+
| 'CLOSED';
|
|
320
323
|
}) => void;
|
|
321
324
|
onParticipantModeChanged?: ({
|
|
322
325
|
participantId,
|
|
323
326
|
mode
|
|
324
327
|
}: {
|
|
325
328
|
participantId: string;
|
|
326
|
-
mode: '
|
|
329
|
+
mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
|
|
327
330
|
}) => void;
|
|
328
331
|
}): any;
|
|
329
332
|
|
|
@@ -460,7 +463,7 @@ export function useParticipant(
|
|
|
460
463
|
isActiveSpeaker: boolean;
|
|
461
464
|
isMainParticipant: boolean;
|
|
462
465
|
pinState: any;
|
|
463
|
-
mode: '
|
|
466
|
+
mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
|
|
464
467
|
consumeMicStreams: () => void;
|
|
465
468
|
consumeWebcamStreams: () => void;
|
|
466
469
|
stopConsumingMicStreams: () => void;
|
|
@@ -620,8 +623,9 @@ export function useParticipant(
|
|
|
620
623
|
* @param onParticipantModeChanged -
|
|
621
624
|
* - This event will be triggered when mode gets chanded.
|
|
622
625
|
* - It will pass mode, as an event callback parameter.
|
|
623
|
-
* - **
|
|
624
|
-
* - **
|
|
626
|
+
* - **SEND_AND_RECV**: Both audio and video streams will be produced and consumed in this mode.
|
|
627
|
+
* - **RECV_ONLY**: Both audio and video streams will be only consumed in this mode.
|
|
628
|
+
* - **SIGNALLING_ONLY**: Audio and video streams will not be produced or consumed in this mode.
|
|
625
629
|
* ---
|
|
626
630
|
* @returns This will return Meeting properties and method. You can refer this [API Reference](https://docs.videosdk.live/react/api/sdk-reference/use-meeting/introduction)
|
|
627
631
|
*
|
|
@@ -739,11 +743,11 @@ export function useMeeting({
|
|
|
739
743
|
livestreamUrl
|
|
740
744
|
}: {
|
|
741
745
|
status:
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
746
|
+
| 'HLS_STARTING'
|
|
747
|
+
| 'HLS_STARTED'
|
|
748
|
+
| 'HLS_PLAYABLE'
|
|
749
|
+
| 'HLS_STOPPING'
|
|
750
|
+
| 'HLS_STOPPED';
|
|
747
751
|
downstreamUrl?: string;
|
|
748
752
|
playbackHlsUrl?: string;
|
|
749
753
|
livestreamUrl?: string;
|
|
@@ -752,37 +756,37 @@ export function useMeeting({
|
|
|
752
756
|
status
|
|
753
757
|
}: {
|
|
754
758
|
status:
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
+
| 'RECORDING_STARTING'
|
|
760
|
+
| 'RECORDING_STARTED'
|
|
761
|
+
| 'RECORDING_STOPPING'
|
|
762
|
+
| 'RECORDING_STOPPED';
|
|
759
763
|
}) => void;
|
|
760
764
|
onLivestreamStateChanged?: ({
|
|
761
765
|
status
|
|
762
766
|
}: {
|
|
763
767
|
status:
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
+
| 'LIVESTREAM_STARTING'
|
|
769
|
+
| 'LIVESTREAM_STARTED'
|
|
770
|
+
| 'LIVESTREAM_STOPPING'
|
|
771
|
+
| 'LIVESTREAM_STOPPED';
|
|
768
772
|
}) => void;
|
|
769
773
|
onMeetingStateChanged?: ({
|
|
770
774
|
state
|
|
771
775
|
}: {
|
|
772
776
|
state:
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
| 'CONNECTING'
|
|
778
|
+
| 'CONNECTED'
|
|
779
|
+
| 'FAILED'
|
|
780
|
+
| 'DISCONNECTED'
|
|
781
|
+
| 'CLOSING'
|
|
782
|
+
| 'CLOSED';
|
|
779
783
|
}) => void;
|
|
780
784
|
onParticipantModeChanged?: ({
|
|
781
785
|
participantId,
|
|
782
786
|
mode
|
|
783
787
|
}: {
|
|
784
788
|
participantId: string;
|
|
785
|
-
mode: '
|
|
789
|
+
mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
|
|
786
790
|
}) => void;
|
|
787
791
|
onCharacterJoined?: (character: Character) => void;
|
|
788
792
|
onCharacterLeft?: (character: Character) => void;
|
|
@@ -905,7 +909,7 @@ export function useMeeting({
|
|
|
905
909
|
>;
|
|
906
910
|
changeMic: (object: string | MediaStream) => void;
|
|
907
911
|
changeWebcam: (object: string | MediaStream) => void;
|
|
908
|
-
changeMode(mode: '
|
|
912
|
+
changeMode(mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'): void;
|
|
909
913
|
startVideo: ({ link }: { link: string }) => void;
|
|
910
914
|
stopVideo: () => void;
|
|
911
915
|
pauseVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
@@ -1331,20 +1335,20 @@ export function createMicrophoneAudioTrack({
|
|
|
1331
1335
|
microphoneId
|
|
1332
1336
|
}: {
|
|
1333
1337
|
noiseConfig?:
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1338
|
+
| {
|
|
1339
|
+
echoCancellation: boolean;
|
|
1340
|
+
autoGainControl: boolean;
|
|
1341
|
+
noiseSuppression: boolean;
|
|
1342
|
+
}
|
|
1343
|
+
| undefined;
|
|
1340
1344
|
encoderConfig?:
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1345
|
+
| 'speech_low_quality'
|
|
1346
|
+
| 'speech_standard'
|
|
1347
|
+
| 'music_standard'
|
|
1348
|
+
| 'standard_stereo'
|
|
1349
|
+
| 'high_quality'
|
|
1350
|
+
| 'high_quality_stereo'
|
|
1351
|
+
| undefined;
|
|
1348
1352
|
microphoneId?: string | undefined;
|
|
1349
1353
|
}): Promise<MediaStream>;
|
|
1350
1354
|
|
|
@@ -1391,25 +1395,25 @@ export function createCameraVideoTrack({
|
|
|
1391
1395
|
}: {
|
|
1392
1396
|
cameraId?: string | undefined;
|
|
1393
1397
|
encoderConfig?:
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1398
|
+
| 'h90p_w160p'
|
|
1399
|
+
| 'h180p_w320p'
|
|
1400
|
+
| 'h216p_w384p'
|
|
1401
|
+
| 'h360p_w640p'
|
|
1402
|
+
| 'h540p_w960p'
|
|
1403
|
+
| 'h720p_w1280p'
|
|
1404
|
+
| 'h1080p_w1920p'
|
|
1405
|
+
| 'h1440p_w2560p'
|
|
1406
|
+
| 'h2160p_w3840p'
|
|
1407
|
+
| 'h120p_w160p'
|
|
1408
|
+
| 'h180p_w240p'
|
|
1409
|
+
| 'h240p_w320p'
|
|
1410
|
+
| 'h360p_w480p'
|
|
1411
|
+
| 'h480p_w640p'
|
|
1412
|
+
| 'h540p_w720p'
|
|
1413
|
+
| 'h720p_w960p'
|
|
1414
|
+
| 'h1080p_w1440p'
|
|
1415
|
+
| 'h1440p_w1920p'
|
|
1416
|
+
| undefined;
|
|
1413
1417
|
facingMode?: 'user' | 'environment' | undefined;
|
|
1414
1418
|
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1415
1419
|
multiStream?: boolean;
|
|
@@ -1447,12 +1451,12 @@ export function createScreenShareVideoTrack({
|
|
|
1447
1451
|
withAudio
|
|
1448
1452
|
}: {
|
|
1449
1453
|
encoderConfig?:
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1454
|
+
| 'h360p_30fps'
|
|
1455
|
+
| 'h720p_5fps'
|
|
1456
|
+
| 'h720p_15fps'
|
|
1457
|
+
| 'h1080p_15fps'
|
|
1458
|
+
| 'h1080p_30fps'
|
|
1459
|
+
| undefined;
|
|
1456
1460
|
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1457
1461
|
withAudio?: 'enable' | 'disable';
|
|
1458
1462
|
}): Promise<MediaStream>;
|
|
@@ -1559,8 +1563,13 @@ export const Constants: {
|
|
|
1559
1563
|
characterState: CharacterState;
|
|
1560
1564
|
characterMode: CharacterMode;
|
|
1561
1565
|
modes: {
|
|
1562
|
-
|
|
1563
|
-
|
|
1566
|
+
// Deprecated modes
|
|
1567
|
+
CONFERENCE: string; // Deprecated
|
|
1568
|
+
VIEWER: string; // Deprecated
|
|
1569
|
+
// New modes
|
|
1570
|
+
SEND_AND_RECV: string; // New mode
|
|
1571
|
+
SIGNALLING_ONLY: string; // New mode
|
|
1572
|
+
RECV_ONLY: string
|
|
1564
1573
|
};
|
|
1565
1574
|
permission: {
|
|
1566
1575
|
AUDIO: Permission;
|
package/dist/types/meeting.d.ts
CHANGED
|
@@ -89,9 +89,9 @@ export class Meeting {
|
|
|
89
89
|
join(): void;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* @description
|
|
92
|
+
* @description This method is used to change the participant mode between SEND_AND_RECV, RECV_ONLY and SIGNALLING_ONLY
|
|
93
93
|
*/
|
|
94
|
-
changeMode(mode: '
|
|
94
|
+
changeMode(mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'): void;
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* @description These method is used to leave the meeting for local participant
|
|
@@ -43,7 +43,7 @@ export class Participant {
|
|
|
43
43
|
* @description This represents participant's current mode
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
46
|
-
mode: '
|
|
46
|
+
mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
|
|
47
47
|
/**
|
|
48
48
|
* @description This represents metaData which is passed in MeetingProvider
|
|
49
49
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videosdk.live/react-sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
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.
|
|
77
|
+
"@videosdk.live/js-sdk": "0.1.5",
|
|
78
78
|
"events": "^3.3.0"
|
|
79
79
|
}
|
|
80
80
|
}
|