@videosdk.live/react-sdk 0.3.4 → 0.3.6
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 +110 -29
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +110 -29
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +47 -10
- package/dist/types/meeting.d.ts +19 -0
- package/dist/types/participant.d.ts +0 -13
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -538,15 +538,6 @@ export function useParticipant(
|
|
|
538
538
|
}) => Promise<string | null>;
|
|
539
539
|
pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
540
540
|
unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
541
|
-
switchTo: ({
|
|
542
|
-
meetingId,
|
|
543
|
-
payload,
|
|
544
|
-
token
|
|
545
|
-
}: {
|
|
546
|
-
meetingId: string;
|
|
547
|
-
payload: string;
|
|
548
|
-
token: string;
|
|
549
|
-
}) => Promise<void>;
|
|
550
541
|
getShareAudioStats: () => Promise<
|
|
551
542
|
Array<{
|
|
552
543
|
bitrate: number;
|
|
@@ -723,7 +714,12 @@ export function useMeeting({
|
|
|
723
714
|
onMeetingStateChanged,
|
|
724
715
|
onParticipantModeChanged,
|
|
725
716
|
onCharacterJoined,
|
|
726
|
-
onCharacterLeft
|
|
717
|
+
onCharacterLeft,
|
|
718
|
+
onMediaRelayStarted,
|
|
719
|
+
onMediaRelayStopped,
|
|
720
|
+
onMediaRelayError,
|
|
721
|
+
onMediaRelayRequestResponse,
|
|
722
|
+
onMediaRelayRequestReceived,
|
|
727
723
|
}?: {
|
|
728
724
|
onParticipantJoined?: (participant: Participant) => void;
|
|
729
725
|
onParticipantLeft?: (participant: Participant) => void;
|
|
@@ -852,6 +848,47 @@ export function useMeeting({
|
|
|
852
848
|
}) => void;
|
|
853
849
|
onCharacterJoined?: (character: Character) => void;
|
|
854
850
|
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;
|
|
855
892
|
}): {
|
|
856
893
|
meetingId: string;
|
|
857
894
|
meeting: Meeting;
|
package/dist/types/meeting.d.ts
CHANGED
|
@@ -463,6 +463,25 @@ 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
|
+
|
|
466
485
|
/**
|
|
467
486
|
* Add event listener
|
|
468
487
|
* @param eventType Event name to which you want to subscribe.
|
|
@@ -107,19 +107,6 @@ export class Participant {
|
|
|
107
107
|
* 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
108
|
*/
|
|
109
109
|
unpin(type: 'SHARE_AND_CAM' | 'CAM' | 'SHARE'): void;
|
|
110
|
-
/**
|
|
111
|
-
* @deprecated
|
|
112
|
-
* @param options
|
|
113
|
-
*/
|
|
114
|
-
switchTo({
|
|
115
|
-
meetingId,
|
|
116
|
-
payload,
|
|
117
|
-
token
|
|
118
|
-
}: {
|
|
119
|
-
meetingId: string;
|
|
120
|
-
payload: string;
|
|
121
|
-
token: string;
|
|
122
|
-
}): Promise<void>;
|
|
123
110
|
/**
|
|
124
111
|
* @description This method returns the Video Statistics of the participant.
|
|
125
112
|
* 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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videosdk.live/react-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.modern.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"husky": "^2.3.0",
|
|
34
34
|
"jest": "^24.8.0",
|
|
35
35
|
"lint-staged": "^8.1.7",
|
|
36
|
-
"mediasoup-client": "
|
|
36
|
+
"mediasoup-client": "3.9.8",
|
|
37
37
|
"microbundle-crl": "^0.13.10",
|
|
38
38
|
"npm-run-all": "^4.1.5",
|
|
39
39
|
"prettier": "^1.17.1",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@videosdk.live/js-sdk": "0.2.
|
|
77
|
+
"@videosdk.live/js-sdk": "0.2.7",
|
|
78
78
|
"events": "^3.3.0"
|
|
79
79
|
}
|
|
80
80
|
}
|