@videosdk.live/react-sdk 0.1.83 → 0.1.84
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 +19 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +150 -134
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
7
|
|
|
8
8
|
import { Connection } from './connection';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
CameraDeviceInfo,
|
|
11
|
+
DeviceInfo,
|
|
12
|
+
MicrophoneDeviceInfo,
|
|
13
|
+
PlaybackDeviceInfo
|
|
14
|
+
} from './deviceInfo';
|
|
10
15
|
import { Permission } from './permission';
|
|
11
16
|
import { Meeting } from './meeting';
|
|
12
17
|
import { Participant } from './participant';
|
|
@@ -64,7 +69,7 @@ import { Stream } from './stream';
|
|
|
64
69
|
* - This is a boolean flag, when set to true, allows a participant to join a meeting directly without explicitly calling the join() function.
|
|
65
70
|
*
|
|
66
71
|
* - This is an OPTIONAL parameter. By default, it is set to false meaning, user has to manually call the join().
|
|
67
|
-
*
|
|
72
|
+
*
|
|
68
73
|
*/
|
|
69
74
|
export function MeetingProvider({
|
|
70
75
|
children,
|
|
@@ -72,7 +77,7 @@ export function MeetingProvider({
|
|
|
72
77
|
token,
|
|
73
78
|
joinWithoutUserInteraction,
|
|
74
79
|
reinitialiseMeetingOnConfigChange: _reinitialiseMeetingOnConfigChange,
|
|
75
|
-
deviceInfo
|
|
80
|
+
deviceInfo
|
|
76
81
|
}: {
|
|
77
82
|
children: any;
|
|
78
83
|
config: {
|
|
@@ -190,7 +195,7 @@ export function MeetingConsumer({
|
|
|
190
195
|
onRecordingStateChanged,
|
|
191
196
|
onLivestreamStateChanged,
|
|
192
197
|
onMeetingStateChanged,
|
|
193
|
-
onParticipantModeChanged
|
|
198
|
+
onParticipantModeChanged
|
|
194
199
|
}: {
|
|
195
200
|
children: any;
|
|
196
201
|
onParticipantJoined?: (participant: Participant) => void;
|
|
@@ -202,7 +207,7 @@ export function MeetingConsumer({
|
|
|
202
207
|
participantId,
|
|
203
208
|
name,
|
|
204
209
|
allow,
|
|
205
|
-
deny
|
|
210
|
+
deny
|
|
206
211
|
}: {
|
|
207
212
|
participantId: string;
|
|
208
213
|
name: string;
|
|
@@ -211,7 +216,7 @@ export function MeetingConsumer({
|
|
|
211
216
|
}) => void;
|
|
212
217
|
onEntryResponded?: ({
|
|
213
218
|
participantId,
|
|
214
|
-
decision
|
|
219
|
+
decision
|
|
215
220
|
}: {
|
|
216
221
|
participantId: string;
|
|
217
222
|
decision: string;
|
|
@@ -234,7 +239,7 @@ export function MeetingConsumer({
|
|
|
234
239
|
onWebcamRequested?: ({
|
|
235
240
|
participantId,
|
|
236
241
|
accept,
|
|
237
|
-
reject
|
|
242
|
+
reject
|
|
238
243
|
}: {
|
|
239
244
|
participantId: string;
|
|
240
245
|
accept: () => void;
|
|
@@ -243,7 +248,7 @@ export function MeetingConsumer({
|
|
|
243
248
|
onMicRequested?: ({
|
|
244
249
|
participantId,
|
|
245
250
|
accept,
|
|
246
|
-
reject
|
|
251
|
+
reject
|
|
247
252
|
}: {
|
|
248
253
|
participantId: string;
|
|
249
254
|
accept: () => void;
|
|
@@ -252,7 +257,7 @@ export function MeetingConsumer({
|
|
|
252
257
|
onPinStateChanged?: ({
|
|
253
258
|
participantId,
|
|
254
259
|
state,
|
|
255
|
-
pinnedBy
|
|
260
|
+
pinnedBy
|
|
256
261
|
}: {
|
|
257
262
|
participantId: string;
|
|
258
263
|
state: { share: boolean; cam: boolean };
|
|
@@ -268,50 +273,50 @@ export function MeetingConsumer({
|
|
|
268
273
|
status,
|
|
269
274
|
downstreamUrl,
|
|
270
275
|
playbackHlsUrl,
|
|
271
|
-
livestreamUrl
|
|
276
|
+
livestreamUrl
|
|
272
277
|
}: {
|
|
273
278
|
status:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
+
| 'HLS_STARTING'
|
|
280
|
+
| 'HLS_STARTED'
|
|
281
|
+
| 'HLS_PLAYABLE'
|
|
282
|
+
| 'HLS_STOPPING'
|
|
283
|
+
| 'HLS_STOPPED';
|
|
279
284
|
downstreamUrl?: string;
|
|
280
285
|
playbackHlsUrl?: string;
|
|
281
286
|
livestreamUrl?: string;
|
|
282
287
|
}) => void;
|
|
283
288
|
onRecordingStateChanged?: ({
|
|
284
|
-
status
|
|
289
|
+
status
|
|
285
290
|
}: {
|
|
286
291
|
status:
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
292
|
+
| 'RECORDING_STARTING'
|
|
293
|
+
| 'RECORDING_STARTED'
|
|
294
|
+
| 'RECORDING_STOPPING'
|
|
295
|
+
| 'RECORDING_STOPPED';
|
|
291
296
|
}) => void;
|
|
292
297
|
onLivestreamStateChanged?: ({
|
|
293
|
-
status
|
|
298
|
+
status
|
|
294
299
|
}: {
|
|
295
300
|
status:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
301
|
+
| 'LIVESTREAM_STARTING'
|
|
302
|
+
| 'LIVESTREAM_STARTED'
|
|
303
|
+
| 'LIVESTREAM_STOPPING'
|
|
304
|
+
| 'LIVESTREAM_STOPPED';
|
|
300
305
|
}) => void;
|
|
301
306
|
onMeetingStateChanged?: ({
|
|
302
|
-
state
|
|
307
|
+
state
|
|
303
308
|
}: {
|
|
304
309
|
state:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
310
|
+
| 'CONNECTING'
|
|
311
|
+
| 'CONNECTED'
|
|
312
|
+
| 'FAILED'
|
|
313
|
+
| 'DISCONNECTED'
|
|
314
|
+
| 'CLOSING'
|
|
315
|
+
| 'CLOSED';
|
|
311
316
|
}) => void;
|
|
312
317
|
onParticipantModeChanged?: ({
|
|
313
318
|
participantId,
|
|
314
|
-
mode
|
|
319
|
+
mode
|
|
315
320
|
}: {
|
|
316
321
|
participantId: string;
|
|
317
322
|
mode: 'CONFERENCE' | 'VIEWER';
|
|
@@ -335,19 +340,19 @@ export function MeetingConsumer({
|
|
|
335
340
|
* ---
|
|
336
341
|
* @returns This will returns methods and events associated with media devices and permissions. You can refer this [API Reference](https://docs.videosdk.live/react/api/sdk-reference/use-mediaDevice/introduction)
|
|
337
342
|
*/
|
|
338
|
-
export function useMediaDevice(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
): {
|
|
343
|
+
export function useMediaDevice({
|
|
344
|
+
onDeviceChanged
|
|
345
|
+
}?: {
|
|
346
|
+
onDeviceChanged?: (devices: Promise<Array<DeviceInfo>>) => void;
|
|
347
|
+
}): {
|
|
345
348
|
getDevices: () => Promise<Array<DeviceInfo>>;
|
|
346
349
|
getCameras: () => Promise<Array<CameraDeviceInfo>>;
|
|
347
350
|
getMicrophones: () => Promise<Array<MicrophoneDeviceInfo>>;
|
|
348
351
|
getPlaybackDevices: () => Promise<Array<PlaybackDeviceInfo>>;
|
|
349
352
|
checkPermissions: (permissions?: Permission) => Promise<Map<string, boolean>>;
|
|
350
|
-
requestPermission: (
|
|
353
|
+
requestPermission: (
|
|
354
|
+
permissions?: Permission
|
|
355
|
+
) => Promise<Map<string, boolean>>;
|
|
351
356
|
};
|
|
352
357
|
|
|
353
358
|
/**
|
|
@@ -414,14 +419,14 @@ export function useParticipant(
|
|
|
414
419
|
onStreamEnabled,
|
|
415
420
|
onStreamDisabled,
|
|
416
421
|
onMediaStatusChanged,
|
|
417
|
-
onVideoQualityChanged
|
|
422
|
+
onVideoQualityChanged
|
|
418
423
|
}?: {
|
|
419
424
|
onStreamDisabled?: (stream: Stream) => void;
|
|
420
425
|
onStreamEnabled?: (stream: Stream) => void;
|
|
421
426
|
onMediaStatusChanged?: ({
|
|
422
427
|
kind,
|
|
423
428
|
peerId,
|
|
424
|
-
newStatus
|
|
429
|
+
newStatus
|
|
425
430
|
}: {
|
|
426
431
|
kind: 'audio' | 'video';
|
|
427
432
|
peerId: string;
|
|
@@ -430,13 +435,13 @@ export function useParticipant(
|
|
|
430
435
|
onVideoQualityChanged?: ({
|
|
431
436
|
peerId,
|
|
432
437
|
prevQuality,
|
|
433
|
-
currentQuality
|
|
438
|
+
currentQuality
|
|
434
439
|
}: {
|
|
435
440
|
peerId: string;
|
|
436
441
|
prevQuality: 'low' | 'med' | 'high';
|
|
437
442
|
currentQuality: 'low' | 'med' | 'high';
|
|
438
443
|
}) => void;
|
|
439
|
-
}
|
|
444
|
+
}
|
|
440
445
|
): {
|
|
441
446
|
displayName: string;
|
|
442
447
|
participant: Participant;
|
|
@@ -463,13 +468,19 @@ export function useParticipant(
|
|
|
463
468
|
enableWebcam: () => void;
|
|
464
469
|
disableWebcam: () => void;
|
|
465
470
|
remove: () => void;
|
|
466
|
-
captureImage: ({
|
|
471
|
+
captureImage: ({
|
|
472
|
+
height,
|
|
473
|
+
width
|
|
474
|
+
}: {
|
|
475
|
+
height?: number;
|
|
476
|
+
width?: number;
|
|
477
|
+
}) => Promise<string | null>;
|
|
467
478
|
pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
468
479
|
unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
469
480
|
switchTo: ({
|
|
470
481
|
meetingId,
|
|
471
482
|
payload,
|
|
472
|
-
token
|
|
483
|
+
token
|
|
473
484
|
}: {
|
|
474
485
|
meetingId: string;
|
|
475
486
|
payload: string;
|
|
@@ -626,7 +637,7 @@ export function useMeeting({
|
|
|
626
637
|
onRecordingStateChanged,
|
|
627
638
|
onLivestreamStateChanged,
|
|
628
639
|
onMeetingStateChanged,
|
|
629
|
-
onParticipantModeChanged
|
|
640
|
+
onParticipantModeChanged
|
|
630
641
|
}?: {
|
|
631
642
|
onParticipantJoined?: (participant: Participant) => void;
|
|
632
643
|
onParticipantLeft?: (participant: Participant) => void;
|
|
@@ -637,7 +648,7 @@ export function useMeeting({
|
|
|
637
648
|
participantId,
|
|
638
649
|
name,
|
|
639
650
|
allow,
|
|
640
|
-
deny
|
|
651
|
+
deny
|
|
641
652
|
}: {
|
|
642
653
|
participantId: string;
|
|
643
654
|
name: string;
|
|
@@ -646,7 +657,7 @@ export function useMeeting({
|
|
|
646
657
|
}) => void;
|
|
647
658
|
onEntryResponded?: ({
|
|
648
659
|
participantId,
|
|
649
|
-
decision
|
|
660
|
+
decision
|
|
650
661
|
}: {
|
|
651
662
|
participantId: string;
|
|
652
663
|
decision: string;
|
|
@@ -669,7 +680,7 @@ export function useMeeting({
|
|
|
669
680
|
onWebcamRequested?: ({
|
|
670
681
|
participantId,
|
|
671
682
|
accept,
|
|
672
|
-
reject
|
|
683
|
+
reject
|
|
673
684
|
}: {
|
|
674
685
|
participantId: string;
|
|
675
686
|
accept: () => void;
|
|
@@ -678,7 +689,7 @@ export function useMeeting({
|
|
|
678
689
|
onMicRequested?: ({
|
|
679
690
|
participantId,
|
|
680
691
|
accept,
|
|
681
|
-
reject
|
|
692
|
+
reject
|
|
682
693
|
}: {
|
|
683
694
|
participantId: string;
|
|
684
695
|
accept: () => void;
|
|
@@ -687,7 +698,7 @@ export function useMeeting({
|
|
|
687
698
|
onPinStateChanged?: ({
|
|
688
699
|
participantId,
|
|
689
700
|
state,
|
|
690
|
-
pinnedBy
|
|
701
|
+
pinnedBy
|
|
691
702
|
}: {
|
|
692
703
|
participantId: string;
|
|
693
704
|
state: { share: boolean; cam: boolean };
|
|
@@ -703,50 +714,50 @@ export function useMeeting({
|
|
|
703
714
|
status,
|
|
704
715
|
downstreamUrl,
|
|
705
716
|
playbackHlsUrl,
|
|
706
|
-
livestreamUrl
|
|
717
|
+
livestreamUrl
|
|
707
718
|
}: {
|
|
708
719
|
status:
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
720
|
+
| 'HLS_STARTING'
|
|
721
|
+
| 'HLS_STARTED'
|
|
722
|
+
| 'HLS_PLAYABLE'
|
|
723
|
+
| 'HLS_STOPPING'
|
|
724
|
+
| 'HLS_STOPPED';
|
|
714
725
|
downstreamUrl?: string;
|
|
715
726
|
playbackHlsUrl?: string;
|
|
716
727
|
livestreamUrl?: string;
|
|
717
728
|
}) => void;
|
|
718
729
|
onRecordingStateChanged?: ({
|
|
719
|
-
status
|
|
730
|
+
status
|
|
720
731
|
}: {
|
|
721
732
|
status:
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
733
|
+
| 'RECORDING_STARTING'
|
|
734
|
+
| 'RECORDING_STARTED'
|
|
735
|
+
| 'RECORDING_STOPPING'
|
|
736
|
+
| 'RECORDING_STOPPED';
|
|
726
737
|
}) => void;
|
|
727
738
|
onLivestreamStateChanged?: ({
|
|
728
|
-
status
|
|
739
|
+
status
|
|
729
740
|
}: {
|
|
730
741
|
status:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
742
|
+
| 'LIVESTREAM_STARTING'
|
|
743
|
+
| 'LIVESTREAM_STARTED'
|
|
744
|
+
| 'LIVESTREAM_STOPPING'
|
|
745
|
+
| 'LIVESTREAM_STOPPED';
|
|
735
746
|
}) => void;
|
|
736
747
|
onMeetingStateChanged?: ({
|
|
737
|
-
state
|
|
748
|
+
state
|
|
738
749
|
}: {
|
|
739
750
|
state:
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
751
|
+
| 'CONNECTING'
|
|
752
|
+
| 'CONNECTED'
|
|
753
|
+
| 'FAILED'
|
|
754
|
+
| 'DISCONNECTED'
|
|
755
|
+
| 'CLOSING'
|
|
756
|
+
| 'CLOSED';
|
|
746
757
|
}) => void;
|
|
747
758
|
onParticipantModeChanged?: ({
|
|
748
759
|
participantId,
|
|
749
|
-
mode
|
|
760
|
+
mode
|
|
750
761
|
}: {
|
|
751
762
|
participantId: string;
|
|
752
763
|
mode: 'CONFERENCE' | 'VIEWER';
|
|
@@ -803,7 +814,7 @@ export function useMeeting({
|
|
|
803
814
|
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
804
815
|
quality: 'low' | 'med' | 'high';
|
|
805
816
|
mode: 'video-and-audio' | 'audio';
|
|
806
|
-
}
|
|
817
|
+
}
|
|
807
818
|
) => void;
|
|
808
819
|
stopRecording: () => void;
|
|
809
820
|
startLiveStream: (
|
|
@@ -818,7 +829,7 @@ export function useMeeting({
|
|
|
818
829
|
gridSize: number;
|
|
819
830
|
};
|
|
820
831
|
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
821
|
-
}
|
|
832
|
+
}
|
|
822
833
|
) => void;
|
|
823
834
|
stopLiveStream: () => void;
|
|
824
835
|
startHls: (config?: {
|
|
@@ -856,7 +867,7 @@ export function useMeeting({
|
|
|
856
867
|
seekVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
857
868
|
connectTo: ({
|
|
858
869
|
meetingId,
|
|
859
|
-
payload
|
|
870
|
+
payload
|
|
860
871
|
}: {
|
|
861
872
|
meetingId: string;
|
|
862
873
|
payload: string;
|
|
@@ -895,7 +906,7 @@ export function usePubSub(
|
|
|
895
906
|
topic: string,
|
|
896
907
|
{
|
|
897
908
|
onMessageReceived,
|
|
898
|
-
onOldMessagesReceived
|
|
909
|
+
onOldMessagesReceived
|
|
899
910
|
}?: {
|
|
900
911
|
onMessageReceived?: (message: {
|
|
901
912
|
id: string;
|
|
@@ -915,20 +926,20 @@ export function usePubSub(
|
|
|
915
926
|
timestamp: string;
|
|
916
927
|
topic: string;
|
|
917
928
|
payload: object;
|
|
918
|
-
}
|
|
929
|
+
}>
|
|
919
930
|
) => void;
|
|
920
|
-
}
|
|
931
|
+
}
|
|
921
932
|
): {
|
|
922
933
|
publish: (
|
|
923
934
|
message: string,
|
|
924
935
|
{
|
|
925
936
|
persist,
|
|
926
|
-
sendOnly
|
|
937
|
+
sendOnly
|
|
927
938
|
}: {
|
|
928
939
|
persist: boolean;
|
|
929
940
|
sendOnly?: Array<String>;
|
|
930
941
|
},
|
|
931
|
-
payload?: object
|
|
942
|
+
payload?: object
|
|
932
943
|
) => void;
|
|
933
944
|
messages: Array<{
|
|
934
945
|
id: string;
|
|
@@ -942,19 +953,25 @@ export function usePubSub(
|
|
|
942
953
|
};
|
|
943
954
|
|
|
944
955
|
export function useFile(): {
|
|
945
|
-
uploadBase64File: ({
|
|
956
|
+
uploadBase64File: ({
|
|
957
|
+
base64Data,
|
|
958
|
+
token,
|
|
959
|
+
fileName
|
|
960
|
+
}: {
|
|
946
961
|
base64Data: string;
|
|
947
962
|
token: string;
|
|
948
963
|
fileName: string;
|
|
949
964
|
}) => Promise<string | null>;
|
|
950
965
|
|
|
951
|
-
fetchBase64File: ({
|
|
966
|
+
fetchBase64File: ({
|
|
967
|
+
url,
|
|
968
|
+
token
|
|
969
|
+
}: {
|
|
952
970
|
url: string;
|
|
953
971
|
token: string;
|
|
954
972
|
}) => Promise<string | null>;
|
|
955
973
|
};
|
|
956
974
|
|
|
957
|
-
|
|
958
975
|
/**
|
|
959
976
|
* @param microphoneId - It will be the id of the mic from which the audio should be captured.
|
|
960
977
|
* ---
|
|
@@ -990,23 +1007,23 @@ export function useFile(): {
|
|
|
990
1007
|
export function createMicrophoneAudioTrack({
|
|
991
1008
|
noiseConfig,
|
|
992
1009
|
encoderConfig,
|
|
993
|
-
microphoneId
|
|
1010
|
+
microphoneId
|
|
994
1011
|
}: {
|
|
995
1012
|
noiseConfig?:
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1013
|
+
| {
|
|
1014
|
+
echoCancellation: boolean;
|
|
1015
|
+
autoGainControl: boolean;
|
|
1016
|
+
noiseSuppression: boolean;
|
|
1017
|
+
}
|
|
1018
|
+
| undefined;
|
|
1002
1019
|
encoderConfig?:
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1020
|
+
| 'speech_low_quality'
|
|
1021
|
+
| 'speech_standard'
|
|
1022
|
+
| 'music_standard'
|
|
1023
|
+
| 'standard_stereo'
|
|
1024
|
+
| 'high_quality'
|
|
1025
|
+
| 'high_quality_stereo'
|
|
1026
|
+
| undefined;
|
|
1010
1027
|
microphoneId?: string | undefined;
|
|
1011
1028
|
}): Promise<MediaStream>;
|
|
1012
1029
|
|
|
@@ -1049,29 +1066,29 @@ export function createCameraVideoTrack({
|
|
|
1049
1066
|
encoderConfig,
|
|
1050
1067
|
facingMode,
|
|
1051
1068
|
optimizationMode,
|
|
1052
|
-
multiStream
|
|
1069
|
+
multiStream
|
|
1053
1070
|
}: {
|
|
1054
1071
|
cameraId?: string | undefined;
|
|
1055
1072
|
encoderConfig?:
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
| 'h90p_w160p'
|
|
1074
|
+
| 'h180p_w320p'
|
|
1075
|
+
| 'h216p_w384p'
|
|
1076
|
+
| 'h360p_w640p'
|
|
1077
|
+
| 'h540p_w960p'
|
|
1078
|
+
| 'h720p_w1280p'
|
|
1079
|
+
| 'h1080p_w1920p'
|
|
1080
|
+
| 'h1440p_w2560p'
|
|
1081
|
+
| 'h2160p_w3840p'
|
|
1082
|
+
| 'h120p_w160p'
|
|
1083
|
+
| 'h180p_w240p'
|
|
1084
|
+
| 'h240p_w320p'
|
|
1085
|
+
| 'h360p_w480p'
|
|
1086
|
+
| 'h480p_w640p'
|
|
1087
|
+
| 'h540p_w720p'
|
|
1088
|
+
| 'h720p_w960p'
|
|
1089
|
+
| 'h1080p_w1440p'
|
|
1090
|
+
| 'h1440p_w1920p'
|
|
1091
|
+
| undefined;
|
|
1075
1092
|
facingMode?: 'user' | 'environment' | undefined;
|
|
1076
1093
|
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1077
1094
|
multiStream?: boolean;
|
|
@@ -1106,15 +1123,15 @@ export function createCameraVideoTrack({
|
|
|
1106
1123
|
export function createScreenShareVideoTrack({
|
|
1107
1124
|
encoderConfig,
|
|
1108
1125
|
optimizationMode,
|
|
1109
|
-
withAudio
|
|
1126
|
+
withAudio
|
|
1110
1127
|
}: {
|
|
1111
1128
|
encoderConfig?:
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1129
|
+
| 'h360p_30fps'
|
|
1130
|
+
| 'h720p_5fps'
|
|
1131
|
+
| 'h720p_15fps'
|
|
1132
|
+
| 'h1080p_15fps'
|
|
1133
|
+
| 'h1080p_30fps'
|
|
1134
|
+
| undefined;
|
|
1118
1135
|
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1119
1136
|
withAudio?: 'enable' | 'disable';
|
|
1120
1137
|
}): Promise<MediaStream>;
|
|
@@ -1127,7 +1144,7 @@ export function createScreenShareVideoTrack({
|
|
|
1127
1144
|
* import { getNetworkStats } from "@videosdk.live/react-sdk";
|
|
1128
1145
|
*
|
|
1129
1146
|
* try{
|
|
1130
|
-
* const options = { timeoutDuration: 45000 };
|
|
1147
|
+
* const options = { timeoutDuration: 45000 };
|
|
1131
1148
|
* const networkStats = await VideoSDK.getNetworkStats(options);
|
|
1132
1149
|
* console.log("networkStats", networkStats);
|
|
1133
1150
|
* }catch(Ex)
|
|
@@ -1139,10 +1156,8 @@ export function createScreenShareVideoTrack({
|
|
|
1139
1156
|
export function getNetworkStats({
|
|
1140
1157
|
timeoutDuration
|
|
1141
1158
|
}?: {
|
|
1142
|
-
timeoutDuration?:
|
|
1143
|
-
|
|
1144
|
-
| undefined;
|
|
1145
|
-
}): Promise<{downloadSpeed: number,uploadSpeed: number}>;
|
|
1159
|
+
timeoutDuration?: number | undefined;
|
|
1160
|
+
}): Promise<{ downloadSpeed: number; uploadSpeed: number }>;
|
|
1146
1161
|
|
|
1147
1162
|
export const Constants: {
|
|
1148
1163
|
errors: {
|
|
@@ -1202,3 +1217,4 @@ export const Constants: {
|
|
|
1202
1217
|
AUDIO_AND_VIDEO: Permission;
|
|
1203
1218
|
};
|
|
1204
1219
|
};
|
|
1220
|
+
export { CameraDeviceInfo, DeviceInfo, MicrophoneDeviceInfo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videosdk.live/react-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.84",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.modern.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@videosdk.live/js-sdk": "0.0.
|
|
76
|
+
"@videosdk.live/js-sdk": "0.0.81",
|
|
77
77
|
"events": "^3.3.0"
|
|
78
78
|
}
|
|
79
79
|
}
|