@videosdk.live/react-sdk 0.3.7 → 0.3.8
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 +122 -231
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +123 -226
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +20 -67
- package/dist/types/meeting.d.ts +3 -36
- package/dist/types/participant.d.ts +13 -5
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -235,8 +235,8 @@ export function MeetingConsumer({
|
|
|
235
235
|
participantId: string;
|
|
236
236
|
decision: string;
|
|
237
237
|
}) => void;
|
|
238
|
-
onPausedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined
|
|
239
|
-
onResumedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined
|
|
238
|
+
onPausedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined}) => void;
|
|
239
|
+
onResumedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined}) => void;
|
|
240
240
|
onRecordingStarted?: () => void;
|
|
241
241
|
onRecordingStopped?: () => void;
|
|
242
242
|
onChatMessage?: (data: {
|
|
@@ -522,7 +522,6 @@ export function useParticipant(
|
|
|
522
522
|
stopConsumingMicStreams: () => void;
|
|
523
523
|
stopConsumingWebcamStreams: () => void;
|
|
524
524
|
setQuality: (quality: 'low' | 'med' | 'high') => void;
|
|
525
|
-
setScreenShareQuality: (quality: 'low' | 'med' | 'high') => void;
|
|
526
525
|
setViewPort: (width: number, height: number) => void;
|
|
527
526
|
enableMic: () => void;
|
|
528
527
|
disableMic: () => void;
|
|
@@ -538,6 +537,15 @@ export function useParticipant(
|
|
|
538
537
|
}) => Promise<string | null>;
|
|
539
538
|
pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
540
539
|
unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
540
|
+
switchTo: ({
|
|
541
|
+
meetingId,
|
|
542
|
+
payload,
|
|
543
|
+
token
|
|
544
|
+
}: {
|
|
545
|
+
meetingId: string;
|
|
546
|
+
payload: string;
|
|
547
|
+
token: string;
|
|
548
|
+
}) => Promise<void>;
|
|
541
549
|
getShareAudioStats: () => Promise<
|
|
542
550
|
Array<{
|
|
543
551
|
bitrate: number;
|
|
@@ -714,12 +722,7 @@ export function useMeeting({
|
|
|
714
722
|
onMeetingStateChanged,
|
|
715
723
|
onParticipantModeChanged,
|
|
716
724
|
onCharacterJoined,
|
|
717
|
-
onCharacterLeft
|
|
718
|
-
onMediaRelayStarted,
|
|
719
|
-
onMediaRelayStopped,
|
|
720
|
-
onMediaRelayError,
|
|
721
|
-
onMediaRelayRequestResponse,
|
|
722
|
-
onMediaRelayRequestReceived,
|
|
725
|
+
onCharacterLeft
|
|
723
726
|
}?: {
|
|
724
727
|
onParticipantJoined?: (participant: Participant) => void;
|
|
725
728
|
onParticipantLeft?: (participant: Participant) => void;
|
|
@@ -744,8 +747,8 @@ export function useMeeting({
|
|
|
744
747
|
participantId: string;
|
|
745
748
|
decision: string;
|
|
746
749
|
}) => void;
|
|
747
|
-
onPausedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined
|
|
748
|
-
onResumedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined
|
|
750
|
+
onPausedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined}) => void;
|
|
751
|
+
onResumedAllStreams?: ({ kind }: { kind: "audio" | "video" | "share" | "shareAudio" | "all" | undefined}) => void;
|
|
749
752
|
onRecordingStarted?: () => void;
|
|
750
753
|
onRecordingStopped?: () => void;
|
|
751
754
|
onChatMessage?: (data: {
|
|
@@ -848,47 +851,6 @@ export function useMeeting({
|
|
|
848
851
|
}) => void;
|
|
849
852
|
onCharacterJoined?: (character: Character) => void;
|
|
850
853
|
onCharacterLeft?: (character: Character) => void;
|
|
851
|
-
onMediaRelayStarted?: ({
|
|
852
|
-
meetingId
|
|
853
|
-
}: {
|
|
854
|
-
meetingId: string
|
|
855
|
-
}) => void;
|
|
856
|
-
onMediaRelayStopped?: ({
|
|
857
|
-
meetingId,
|
|
858
|
-
reason
|
|
859
|
-
}: {
|
|
860
|
-
meetingId: string;
|
|
861
|
-
reason: string;
|
|
862
|
-
}) => void;
|
|
863
|
-
onMediaRelayError?: ({
|
|
864
|
-
meetingId,
|
|
865
|
-
error
|
|
866
|
-
}: {
|
|
867
|
-
meetingId: string;
|
|
868
|
-
error: string;
|
|
869
|
-
}) => void;
|
|
870
|
-
onMediaRelayRequestResponse?: ({
|
|
871
|
-
decision,
|
|
872
|
-
decidedBy,
|
|
873
|
-
meetingId
|
|
874
|
-
}: {
|
|
875
|
-
decision: "accepted" | "declined";
|
|
876
|
-
decidedBy: string;
|
|
877
|
-
meetingId: string;
|
|
878
|
-
}) => void;
|
|
879
|
-
onMediaRelayRequestReceived?: ({
|
|
880
|
-
participantId,
|
|
881
|
-
meetingId,
|
|
882
|
-
displayName,
|
|
883
|
-
accept,
|
|
884
|
-
reject
|
|
885
|
-
}: {
|
|
886
|
-
participantId: string;
|
|
887
|
-
meetingId: string;
|
|
888
|
-
displayName: string;
|
|
889
|
-
accept: () => void;
|
|
890
|
-
reject: () => void;
|
|
891
|
-
}) => void;
|
|
892
854
|
}): {
|
|
893
855
|
meetingId: string;
|
|
894
856
|
meeting: Meeting;
|
|
@@ -1541,8 +1503,6 @@ export function createCameraVideoTrack({
|
|
|
1541
1503
|
*
|
|
1542
1504
|
* #### Values : `enable`, `disable`
|
|
1543
1505
|
* ---
|
|
1544
|
-
* @param multiStream - It will specifiy if the stream should send multiple resolution layers or single resolution layer.
|
|
1545
|
-
* Please refere thi link for more understanding [What is multiStream ?](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/render-media/optimize-video-track#what-is-multistream)
|
|
1546
1506
|
*
|
|
1547
1507
|
* **Code Example**
|
|
1548
1508
|
* ```js
|
|
@@ -1552,30 +1512,23 @@ export function createCameraVideoTrack({
|
|
|
1552
1512
|
* optimizationMode: "motion", // "text" | "detail", Default : "motion"
|
|
1553
1513
|
* encoderConfig: "h720p_15fps", // `h360p_30fps` | `h1080p_30fps` // Default : `h720p_15fps`
|
|
1554
1514
|
* withAudio:'enable' // `disable`, Default : `disable`
|
|
1555
|
-
* multiStream: true // false, Default : false
|
|
1556
|
-
*
|
|
1557
1515
|
* });
|
|
1558
1516
|
* ```
|
|
1559
1517
|
*/
|
|
1560
1518
|
export function createScreenShareVideoTrack({
|
|
1561
1519
|
encoderConfig,
|
|
1562
1520
|
optimizationMode,
|
|
1563
|
-
withAudio
|
|
1564
|
-
multiStream,
|
|
1521
|
+
withAudio
|
|
1565
1522
|
}: {
|
|
1566
1523
|
encoderConfig?:
|
|
1567
|
-
|
|
|
1568
|
-
|
|
|
1569
|
-
|
|
|
1570
|
-
|
|
|
1571
|
-
|
|
|
1572
|
-
| "h720p_30fps"
|
|
1573
|
-
| "h1080p_15fps"
|
|
1574
|
-
| "h1080p_30fps"
|
|
1524
|
+
| 'h360p_30fps'
|
|
1525
|
+
| 'h720p_5fps'
|
|
1526
|
+
| 'h720p_15fps'
|
|
1527
|
+
| 'h1080p_15fps'
|
|
1528
|
+
| 'h1080p_30fps'
|
|
1575
1529
|
| undefined;
|
|
1576
1530
|
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1577
1531
|
withAudio?: 'enable' | 'disable';
|
|
1578
|
-
multiStream?: boolean;
|
|
1579
1532
|
}): Promise<MediaStream>;
|
|
1580
1533
|
|
|
1581
1534
|
/**
|
package/dist/types/meeting.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export class Meeting {
|
|
|
170
170
|
resumeAllStreams(
|
|
171
171
|
kind?: "audio" | "video" | "share" | "shareAudio" | "all"
|
|
172
172
|
): void;
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
/**
|
|
175
175
|
* @param webhookUrl
|
|
176
176
|
* Webhook URL which will be called by VideoSDK when the recording state gets changed
|
|
@@ -463,25 +463,6 @@ export class Meeting {
|
|
|
463
463
|
meetingId: string;
|
|
464
464
|
payload: string;
|
|
465
465
|
}): Promise<void>;
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* @description This method is used to request media relay to another meeting
|
|
469
|
-
* @param options.destinationMeetingId The ID of the meeting to relay media to
|
|
470
|
-
* @param options.token Optional token for the destination meeting
|
|
471
|
-
* @param options.kinds Optional array of media types to relay ('audio', 'video', 'share', 'share_audio')
|
|
472
|
-
*/
|
|
473
|
-
requestMediaRelay(options: {
|
|
474
|
-
destinationMeetingId: string;
|
|
475
|
-
token?: string;
|
|
476
|
-
kinds?: Array<'audio' | 'video' | 'share' | 'share_audio'>;
|
|
477
|
-
}): void;
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* @description Stop relaying media to a destination meeting
|
|
481
|
-
* @param destinationMeetingId The meeting ID to stop media relay to
|
|
482
|
-
*/
|
|
483
|
-
stopMediaRelay(destinationMeetingId: string): void;
|
|
484
|
-
|
|
485
466
|
/**
|
|
486
467
|
* Add event listener
|
|
487
468
|
* @param eventType Event name to which you want to subscribe.
|
|
@@ -526,14 +507,7 @@ export class Meeting {
|
|
|
526
507
|
| 'transcription-text'
|
|
527
508
|
| 'transcription-state-changed'
|
|
528
509
|
| 'character-joined'
|
|
529
|
-
| 'character-left'
|
|
530
|
-
| "paused-all-streams"
|
|
531
|
-
| "resumed-all-streams"
|
|
532
|
-
| "media-relay-started"
|
|
533
|
-
| "media-relay-stopped"
|
|
534
|
-
| "media-relay-error"
|
|
535
|
-
| "media-relay-request-response"
|
|
536
|
-
| "media-relay-request-received",
|
|
510
|
+
| 'character-left',
|
|
537
511
|
listener: (data: any) => void
|
|
538
512
|
): void;
|
|
539
513
|
/**
|
|
@@ -580,14 +554,7 @@ export class Meeting {
|
|
|
580
554
|
| 'transcription-text'
|
|
581
555
|
| 'transcription-state-changed'
|
|
582
556
|
| 'character-joined'
|
|
583
|
-
| 'character-left'
|
|
584
|
-
| "paused-all-streams"
|
|
585
|
-
| "resumed-all-streams"
|
|
586
|
-
| "media-relay-started"
|
|
587
|
-
| "media-relay-stopped"
|
|
588
|
-
| "media-relay-error"
|
|
589
|
-
| "media-relay-request-response"
|
|
590
|
-
| "media-relay-request-received",
|
|
557
|
+
| 'character-left',
|
|
591
558
|
|
|
592
559
|
listener: (data: any) => void
|
|
593
560
|
): void;
|
|
@@ -85,11 +85,6 @@ export class Participant {
|
|
|
85
85
|
* @param quality
|
|
86
86
|
*/
|
|
87
87
|
setQuality(quality: 'low' | 'med' | 'high'): void;
|
|
88
|
-
/**
|
|
89
|
-
* @description This method can be used to set the incoming screen sharevideo quality of the participant
|
|
90
|
-
* @param quality
|
|
91
|
-
*/
|
|
92
|
-
setScreenShareQuality(quality: 'low' | 'med' | 'high'): void;
|
|
93
88
|
/**
|
|
94
89
|
* @description This method can be used to set the video quality of the participant based on the size of the viewport it is being displayed in
|
|
95
90
|
* @param width Width of the Viewport in which participant video is shown
|
|
@@ -107,6 +102,19 @@ export class Participant {
|
|
|
107
102
|
* If `CAM` is provided, it will only unpin the participant's camera, If `SHARE` is provided, it will only unpin the participant's screen share
|
|
108
103
|
*/
|
|
109
104
|
unpin(type: 'SHARE_AND_CAM' | 'CAM' | 'SHARE'): void;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated
|
|
107
|
+
* @param options
|
|
108
|
+
*/
|
|
109
|
+
switchTo({
|
|
110
|
+
meetingId,
|
|
111
|
+
payload,
|
|
112
|
+
token
|
|
113
|
+
}: {
|
|
114
|
+
meetingId: string;
|
|
115
|
+
payload: string;
|
|
116
|
+
token: string;
|
|
117
|
+
}): Promise<void>;
|
|
110
118
|
/**
|
|
111
119
|
* @description This method returns the Video Statistics of the participant.
|
|
112
120
|
* To learn more about the video statistics check these [reference](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/render-media/understanding-call-quality)
|