@videosdk.live/react-sdk 0.1.78 → 0.1.79

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.
@@ -266,11 +266,11 @@ export function MeetingConsumer({
266
266
  livestreamUrl,
267
267
  }: {
268
268
  status:
269
- | 'HLS_STARTING'
270
- | 'HLS_STARTED'
271
- | 'HLS_PLAYABLE'
272
- | 'HLS_STOPPING'
273
- | 'HLS_STOPPED';
269
+ | 'HLS_STARTING'
270
+ | 'HLS_STARTED'
271
+ | 'HLS_PLAYABLE'
272
+ | 'HLS_STOPPING'
273
+ | 'HLS_STOPPED';
274
274
  downstreamUrl?: string;
275
275
  playbackHlsUrl?: string;
276
276
  livestreamUrl?: string;
@@ -279,30 +279,30 @@ export function MeetingConsumer({
279
279
  status,
280
280
  }: {
281
281
  status:
282
- | 'RECORDING_STARTING'
283
- | 'RECORDING_STARTED'
284
- | 'RECORDING_STOPPING'
285
- | 'RECORDING_STOPPED';
282
+ | 'RECORDING_STARTING'
283
+ | 'RECORDING_STARTED'
284
+ | 'RECORDING_STOPPING'
285
+ | 'RECORDING_STOPPED';
286
286
  }) => void;
287
287
  onLivestreamStateChanged?: ({
288
288
  status,
289
289
  }: {
290
290
  status:
291
- | 'LIVESTREAM_STARTING'
292
- | 'LIVESTREAM_STARTED'
293
- | 'LIVESTREAM_STOPPING'
294
- | 'LIVESTREAM_STOPPED';
291
+ | 'LIVESTREAM_STARTING'
292
+ | 'LIVESTREAM_STARTED'
293
+ | 'LIVESTREAM_STOPPING'
294
+ | 'LIVESTREAM_STOPPED';
295
295
  }) => void;
296
296
  onMeetingStateChanged?: ({
297
297
  state,
298
298
  }: {
299
299
  state:
300
- | 'CONNECTING'
301
- | 'CONNECTED'
302
- | 'FAILED'
303
- | 'DISCONNECTED'
304
- | 'CLOSING'
305
- | 'CLOSED';
300
+ | 'CONNECTING'
301
+ | 'CONNECTED'
302
+ | 'FAILED'
303
+ | 'DISCONNECTED'
304
+ | 'CLOSING'
305
+ | 'CLOSED';
306
306
  }) => void;
307
307
  onParticipantModeChanged?: ({
308
308
  participantId,
@@ -426,6 +426,7 @@ export function useParticipant(
426
426
  enableWebcam: () => void;
427
427
  disableWebcam: () => void;
428
428
  remove: () => void;
429
+ captureImage: ({ height, width }: { height?: number, width?: number }) => Promise<string | null>;
429
430
  pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
430
431
  unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
431
432
  switchTo: ({
@@ -668,11 +669,11 @@ export function useMeeting({
668
669
  livestreamUrl,
669
670
  }: {
670
671
  status:
671
- | 'HLS_STARTING'
672
- | 'HLS_STARTED'
673
- | 'HLS_PLAYABLE'
674
- | 'HLS_STOPPING'
675
- | 'HLS_STOPPED';
672
+ | 'HLS_STARTING'
673
+ | 'HLS_STARTED'
674
+ | 'HLS_PLAYABLE'
675
+ | 'HLS_STOPPING'
676
+ | 'HLS_STOPPED';
676
677
  downstreamUrl?: string;
677
678
  playbackHlsUrl?: string;
678
679
  livestreamUrl?: string;
@@ -681,30 +682,30 @@ export function useMeeting({
681
682
  status,
682
683
  }: {
683
684
  status:
684
- | 'RECORDING_STARTING'
685
- | 'RECORDING_STARTED'
686
- | 'RECORDING_STOPPING'
687
- | 'RECORDING_STOPPED';
685
+ | 'RECORDING_STARTING'
686
+ | 'RECORDING_STARTED'
687
+ | 'RECORDING_STOPPING'
688
+ | 'RECORDING_STOPPED';
688
689
  }) => void;
689
690
  onLivestreamStateChanged?: ({
690
691
  status,
691
692
  }: {
692
693
  status:
693
- | 'LIVESTREAM_STARTING'
694
- | 'LIVESTREAM_STARTED'
695
- | 'LIVESTREAM_STOPPING'
696
- | 'LIVESTREAM_STOPPED';
694
+ | 'LIVESTREAM_STARTING'
695
+ | 'LIVESTREAM_STARTED'
696
+ | 'LIVESTREAM_STOPPING'
697
+ | 'LIVESTREAM_STOPPED';
697
698
  }) => void;
698
699
  onMeetingStateChanged?: ({
699
700
  state,
700
701
  }: {
701
702
  state:
702
- | 'CONNECTING'
703
- | 'CONNECTED'
704
- | 'FAILED'
705
- | 'DISCONNECTED'
706
- | 'CLOSING'
707
- | 'CLOSED';
703
+ | 'CONNECTING'
704
+ | 'CONNECTED'
705
+ | 'FAILED'
706
+ | 'DISCONNECTED'
707
+ | 'CLOSING'
708
+ | 'CLOSED';
708
709
  }) => void;
709
710
  onParticipantModeChanged?: ({
710
711
  participantId,
@@ -888,9 +889,9 @@ export function usePubSub(
888
889
  sendOnly,
889
890
  }: {
890
891
  persist: boolean;
891
- sendOnly: Array<String>;
892
+ sendOnly?: Array<String>;
892
893
  },
893
- payload: object,
894
+ payload?: object,
894
895
  ) => void;
895
896
  messages: Array<{
896
897
  id: string;
@@ -903,6 +904,20 @@ export function usePubSub(
903
904
  }>;
904
905
  };
905
906
 
907
+ export function useFile(): {
908
+ uploadBase64File: ({ base64Data, token, fileName }: {
909
+ base64Data: string;
910
+ token: string;
911
+ fileName: string;
912
+ }) => Promise<string | null>;
913
+
914
+ fetchBase64File: ({ url, token }: {
915
+ url: string;
916
+ token: string;
917
+ }) => Promise<string | null>;
918
+ };
919
+
920
+
906
921
  /**
907
922
  * @param microphoneId - It will be the id of the mic from which the audio should be captured.
908
923
  * ---
@@ -941,20 +956,20 @@ export function createMicrophoneAudioTrack({
941
956
  microphoneId,
942
957
  }: {
943
958
  noiseConfig?:
944
- | {
945
- echoCancellation: boolean;
946
- autoGainControl: boolean;
947
- noiseSuppression: boolean;
948
- }
949
- | undefined;
959
+ | {
960
+ echoCancellation: boolean;
961
+ autoGainControl: boolean;
962
+ noiseSuppression: boolean;
963
+ }
964
+ | undefined;
950
965
  encoderConfig?:
951
- | 'speech_low_quality'
952
- | 'speech_standard'
953
- | 'music_standard'
954
- | 'standard_stereo'
955
- | 'high_quality'
956
- | 'high_quality_stereo'
957
- | undefined;
966
+ | 'speech_low_quality'
967
+ | 'speech_standard'
968
+ | 'music_standard'
969
+ | 'standard_stereo'
970
+ | 'high_quality'
971
+ | 'high_quality_stereo'
972
+ | undefined;
958
973
  microphoneId?: string | undefined;
959
974
  }): Promise<MediaStream>;
960
975
 
@@ -1001,25 +1016,25 @@ export function createCameraVideoTrack({
1001
1016
  }: {
1002
1017
  cameraId?: string | undefined;
1003
1018
  encoderConfig?:
1004
- | 'h90p_w160p'
1005
- | 'h180p_w320p'
1006
- | 'h216p_w384p'
1007
- | 'h360p_w640p'
1008
- | 'h540p_w960p'
1009
- | 'h720p_w1280p'
1010
- | 'h1080p_w1920p'
1011
- | 'h1440p_w2560p'
1012
- | 'h2160p_w3840p'
1013
- | 'h120p_w160p'
1014
- | 'h180p_w240p'
1015
- | 'h240p_w320p'
1016
- | 'h360p_w480p'
1017
- | 'h480p_w640p'
1018
- | 'h540p_w720p'
1019
- | 'h720p_w960p'
1020
- | 'h1080p_w1440p'
1021
- | 'h1440p_w1920p'
1022
- | undefined;
1019
+ | 'h90p_w160p'
1020
+ | 'h180p_w320p'
1021
+ | 'h216p_w384p'
1022
+ | 'h360p_w640p'
1023
+ | 'h540p_w960p'
1024
+ | 'h720p_w1280p'
1025
+ | 'h1080p_w1920p'
1026
+ | 'h1440p_w2560p'
1027
+ | 'h2160p_w3840p'
1028
+ | 'h120p_w160p'
1029
+ | 'h180p_w240p'
1030
+ | 'h240p_w320p'
1031
+ | 'h360p_w480p'
1032
+ | 'h480p_w640p'
1033
+ | 'h540p_w720p'
1034
+ | 'h720p_w960p'
1035
+ | 'h1080p_w1440p'
1036
+ | 'h1440p_w1920p'
1037
+ | undefined;
1023
1038
  facingMode?: 'user' | 'environment' | undefined;
1024
1039
  optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
1025
1040
  multiStream?: boolean;
@@ -1057,12 +1072,12 @@ export function createScreenShareVideoTrack({
1057
1072
  withAudio,
1058
1073
  }: {
1059
1074
  encoderConfig?:
1060
- | 'h360p_30fps'
1061
- | 'h720p_5fps'
1062
- | 'h720p_15fps'
1063
- | 'h1080p_15fps'
1064
- | 'h1080p_30fps'
1065
- | undefined;
1075
+ | 'h360p_30fps'
1076
+ | 'h720p_5fps'
1077
+ | 'h720p_15fps'
1078
+ | 'h1080p_15fps'
1079
+ | 'h1080p_30fps'
1080
+ | undefined;
1066
1081
  optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
1067
1082
  withAudio?: 'enable' | 'disable';
1068
1083
  }): Promise<MediaStream>;
@@ -71,7 +71,11 @@ export class Participant {
71
71
  */
72
72
  disableWebcam(): void;
73
73
  /**
74
- * @description This method can be used to set the incoming video quality of the participant
74
+ * @description This method can be used to capture image in the meeting
75
+ */
76
+ captureImage({height,width}:{height?:number,width?:number}): Promise<string | null>;
77
+ /**
78
+ * @description This method can be used to set the incoming video quality of the participant
75
79
  * @param quality
76
80
  */
77
81
  setQuality(quality: 'low' | 'med' | 'high'): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videosdk.live/react-sdk",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
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.74",
76
+ "@videosdk.live/js-sdk": "0.0.75",
77
77
  "events": "^3.3.0"
78
78
  }
79
79
  }