@videosdk.live/react-sdk 0.3.1 → 0.3.3
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 +56 -40
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +51 -41
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +20 -10
- package/dist/types/participant.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useEffect, useContext, useState, useRef, useMemo, forwardRef } from 'react';
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
3
|
import { VideoSDK } from '@videosdk.live/js-sdk';
|
|
4
|
-
export { CameraDeviceInfo, DeviceInfo, MicrophoneDeviceInfo } from '@videosdk.live/js-sdk';
|
|
4
|
+
export { CameraDeviceInfo, DeviceInfo, ExternalE2EEKeyProvider, MicrophoneDeviceInfo } from '@videosdk.live/js-sdk';
|
|
5
5
|
|
|
6
6
|
function _arrayLikeToArray(r, a) {
|
|
7
7
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -399,7 +399,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
|
|
|
399
399
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeetingProviderContex.Consumer, null, children));
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
-
var version = "0.3.
|
|
402
|
+
var version = "0.3.3";
|
|
403
403
|
|
|
404
404
|
var MeetingProvider = function MeetingProvider(_ref) {
|
|
405
405
|
var children = _ref.children,
|
|
@@ -407,7 +407,8 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
407
407
|
token = _ref.token,
|
|
408
408
|
joinWithoutUserInteraction = _ref.joinWithoutUserInteraction,
|
|
409
409
|
_reinitialiseMeetingOnConfigChange = _ref.reinitialiseMeetingOnConfigChange,
|
|
410
|
-
deviceInfo = _ref.deviceInfo
|
|
410
|
+
deviceInfo = _ref.deviceInfo,
|
|
411
|
+
keyProvider = _ref.keyProvider;
|
|
411
412
|
var _useState = useState(null),
|
|
412
413
|
meeting = _useState[0],
|
|
413
414
|
setMeeting = _useState[1];
|
|
@@ -435,54 +436,55 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
435
436
|
var _useState9 = useState(false),
|
|
436
437
|
isRecording = _useState9[0],
|
|
437
438
|
setIsRecording = _useState9[1];
|
|
438
|
-
var
|
|
439
|
-
messages =
|
|
440
|
-
setMessages =
|
|
439
|
+
var _useState0 = useState([]),
|
|
440
|
+
messages = _useState0[0],
|
|
441
|
+
setMessages = _useState0[1];
|
|
442
|
+
var _useState1 = useState(new Map()),
|
|
443
|
+
participants = _useState1[0],
|
|
444
|
+
setParticipants = _useState1[1];
|
|
445
|
+
var _useState10 = useState(new Map()),
|
|
446
|
+
characters = _useState10[0],
|
|
447
|
+
setCharacters = _useState10[1];
|
|
441
448
|
var _useState11 = useState(new Map()),
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
var _useState12 = useState(
|
|
445
|
-
|
|
446
|
-
|
|
449
|
+
pinnedParticipants = _useState11[0],
|
|
450
|
+
setPinnedParticipants = _useState11[1];
|
|
451
|
+
var _useState12 = useState(false),
|
|
452
|
+
isLiveStreaming = _useState12[0],
|
|
453
|
+
setIsLiveStreaming = _useState12[1];
|
|
447
454
|
var _useState13 = useState(new Map()),
|
|
448
|
-
|
|
449
|
-
|
|
455
|
+
connections = _useState13[0],
|
|
456
|
+
setConnections = _useState13[1];
|
|
450
457
|
var _useState14 = useState(false),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
var _useState15 = useState(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
var _useState16 = useState(
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
var _useState17 = useState(
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
var _useState18 = useState('
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
var _useState19 = useState(
|
|
466
|
-
livestreamState = _useState19[0],
|
|
467
|
-
setLivestreamState = _useState19[1];
|
|
468
|
-
var _useState20 = useState('HLS_STOPPED'),
|
|
469
|
-
hlsState = _useState20[0],
|
|
470
|
-
setHlsState = _useState20[1];
|
|
471
|
-
var _useState21 = useState({
|
|
458
|
+
isMeetingJoined = _useState14[0],
|
|
459
|
+
setIsMeetingJoined = _useState14[1];
|
|
460
|
+
var _useState15 = useState(false),
|
|
461
|
+
isHls = _useState15[0],
|
|
462
|
+
setIsHls = _useState15[1];
|
|
463
|
+
var _useState16 = useState('RECORDING_STOPPED'),
|
|
464
|
+
recordingState = _useState16[0],
|
|
465
|
+
setRecordingState = _useState16[1];
|
|
466
|
+
var _useState17 = useState('LIVESTREAM_STOPPED'),
|
|
467
|
+
livestreamState = _useState17[0],
|
|
468
|
+
setLivestreamState = _useState17[1];
|
|
469
|
+
var _useState18 = useState('HLS_STOPPED'),
|
|
470
|
+
hlsState = _useState18[0],
|
|
471
|
+
setHlsState = _useState18[1];
|
|
472
|
+
var _useState19 = useState({
|
|
472
473
|
downstreamUrl: null,
|
|
473
474
|
playbackHlsUrl: null,
|
|
474
475
|
livestreamUrl: null
|
|
475
476
|
}),
|
|
476
|
-
hlsUrls =
|
|
477
|
-
setHlsUrls =
|
|
478
|
-
var
|
|
479
|
-
transcriptionState =
|
|
480
|
-
setTranscriptionState =
|
|
477
|
+
hlsUrls = _useState19[0],
|
|
478
|
+
setHlsUrls = _useState19[1];
|
|
479
|
+
var _useState20 = useState('TRANSCRIPTION_STOPPED'),
|
|
480
|
+
transcriptionState = _useState20[0],
|
|
481
|
+
setTranscriptionState = _useState20[1];
|
|
481
482
|
var meetingRef = useRef();
|
|
482
483
|
var localMicOnRef = useRef();
|
|
483
484
|
var localWebcamOnRef = useRef();
|
|
484
485
|
var localScreenShareOnRef = useRef();
|
|
485
486
|
var isRecordingRef = useRef();
|
|
487
|
+
var keyProviderRef = useRef(keyProvider);
|
|
486
488
|
var configRef = useRef(config);
|
|
487
489
|
var tokenRef = useRef(token);
|
|
488
490
|
var joinedOnFirstRender = useRef(false);
|
|
@@ -1164,6 +1166,7 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
1164
1166
|
};
|
|
1165
1167
|
var initSDK = function initSDK() {
|
|
1166
1168
|
VideoSDK.config(tokenRef.current);
|
|
1169
|
+
keyProviderRef.current && VideoSDK.setKeyProvider(keyProviderRef.current);
|
|
1167
1170
|
if (deviceInfo) {
|
|
1168
1171
|
VideoSDK.analytics(deviceInfo);
|
|
1169
1172
|
} else {
|
|
@@ -1413,6 +1416,9 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1413
1416
|
var setViewPort = function setViewPort(width, height) {
|
|
1414
1417
|
participant === null || participant === void 0 ? void 0 : participant.setViewPort(width, height);
|
|
1415
1418
|
};
|
|
1419
|
+
var setScreenShareQuality = function setScreenShareQuality(quality) {
|
|
1420
|
+
participant === null || participant === void 0 ? void 0 : participant.setScreenShareQuality(quality);
|
|
1421
|
+
};
|
|
1416
1422
|
var enableMic = function enableMic() {
|
|
1417
1423
|
participant === null || participant === void 0 ? void 0 : participant.enableMic();
|
|
1418
1424
|
};
|
|
@@ -1535,6 +1541,7 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1535
1541
|
stopConsumingMicStreams: stopConsumingMicStreams,
|
|
1536
1542
|
stopConsumingWebcamStreams: stopConsumingWebcamStreams,
|
|
1537
1543
|
setQuality: setQuality,
|
|
1544
|
+
setScreenShareQuality: setScreenShareQuality,
|
|
1538
1545
|
setViewPort: setViewPort,
|
|
1539
1546
|
enableMic: enableMic,
|
|
1540
1547
|
disableMic: disableMic,
|
|
@@ -2158,12 +2165,15 @@ var createScreenShareVideoTrack = function createScreenShareVideoTrack(_ref2) {
|
|
|
2158
2165
|
_ref2$optimizationMod = _ref2.optimizationMode,
|
|
2159
2166
|
optimizationMode = _ref2$optimizationMod === void 0 ? undefined : _ref2$optimizationMod,
|
|
2160
2167
|
_ref2$withAudio = _ref2.withAudio,
|
|
2161
|
-
withAudio = _ref2$withAudio === void 0 ? 'enable' : _ref2$withAudio
|
|
2168
|
+
withAudio = _ref2$withAudio === void 0 ? 'enable' : _ref2$withAudio,
|
|
2169
|
+
_ref2$multiStream = _ref2.multiStream,
|
|
2170
|
+
multiStream = _ref2$multiStream === void 0 ? false : _ref2$multiStream;
|
|
2162
2171
|
try {
|
|
2163
2172
|
return Promise.resolve(VideoSDK.createScreenShareVideoTrack({
|
|
2164
2173
|
encoderConfig: encoderConfig,
|
|
2165
2174
|
optimizationMode: optimizationMode,
|
|
2166
|
-
withAudio: withAudio
|
|
2175
|
+
withAudio: withAudio,
|
|
2176
|
+
multiStream: multiStream
|
|
2167
2177
|
}));
|
|
2168
2178
|
} catch (e) {
|
|
2169
2179
|
return Promise.reject(e);
|