@videosdk.live/react-sdk 0.4.2 → 0.4.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 +76 -58
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +76 -58
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -444,7 +444,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
|
|
|
444
444
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeetingProviderContex.Consumer, null, children));
|
|
445
445
|
};
|
|
446
446
|
|
|
447
|
-
var version = "0.4.
|
|
447
|
+
var version = "0.4.3";
|
|
448
448
|
|
|
449
449
|
var MeetingProvider = function MeetingProvider(_ref) {
|
|
450
450
|
var children = _ref.children,
|
|
@@ -481,49 +481,49 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
481
481
|
var _useState9 = useState(false),
|
|
482
482
|
isRecording = _useState9[0],
|
|
483
483
|
setIsRecording = _useState9[1];
|
|
484
|
-
var
|
|
485
|
-
messages =
|
|
486
|
-
setMessages =
|
|
484
|
+
var _useState0 = useState([]),
|
|
485
|
+
messages = _useState0[0],
|
|
486
|
+
setMessages = _useState0[1];
|
|
487
|
+
var _useState1 = useState(new Map()),
|
|
488
|
+
participants = _useState1[0],
|
|
489
|
+
setParticipants = _useState1[1];
|
|
490
|
+
var _useState10 = useState(new Map()),
|
|
491
|
+
characters = _useState10[0],
|
|
492
|
+
setCharacters = _useState10[1];
|
|
487
493
|
var _useState11 = useState(new Map()),
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
var _useState12 = useState(
|
|
491
|
-
|
|
492
|
-
|
|
494
|
+
pinnedParticipants = _useState11[0],
|
|
495
|
+
setPinnedParticipants = _useState11[1];
|
|
496
|
+
var _useState12 = useState(false),
|
|
497
|
+
isLiveStreaming = _useState12[0],
|
|
498
|
+
setIsLiveStreaming = _useState12[1];
|
|
493
499
|
var _useState13 = useState(new Map()),
|
|
494
|
-
|
|
495
|
-
|
|
500
|
+
connections = _useState13[0],
|
|
501
|
+
setConnections = _useState13[1];
|
|
496
502
|
var _useState14 = useState(false),
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
var _useState15 = useState(
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
var _useState16 = useState(
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
var _useState17 = useState(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
var _useState18 = useState('
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
var _useState19 = useState(
|
|
512
|
-
livestreamState = _useState19[0],
|
|
513
|
-
setLivestreamState = _useState19[1];
|
|
514
|
-
var _useState20 = useState('HLS_STOPPED'),
|
|
515
|
-
hlsState = _useState20[0],
|
|
516
|
-
setHlsState = _useState20[1];
|
|
517
|
-
var _useState21 = useState({
|
|
503
|
+
isMeetingJoined = _useState14[0],
|
|
504
|
+
setIsMeetingJoined = _useState14[1];
|
|
505
|
+
var _useState15 = useState(false),
|
|
506
|
+
isHls = _useState15[0],
|
|
507
|
+
setIsHls = _useState15[1];
|
|
508
|
+
var _useState16 = useState('RECORDING_STOPPED'),
|
|
509
|
+
recordingState = _useState16[0],
|
|
510
|
+
setRecordingState = _useState16[1];
|
|
511
|
+
var _useState17 = useState('LIVESTREAM_STOPPED'),
|
|
512
|
+
livestreamState = _useState17[0],
|
|
513
|
+
setLivestreamState = _useState17[1];
|
|
514
|
+
var _useState18 = useState('HLS_STOPPED'),
|
|
515
|
+
hlsState = _useState18[0],
|
|
516
|
+
setHlsState = _useState18[1];
|
|
517
|
+
var _useState19 = useState({
|
|
518
518
|
downstreamUrl: null,
|
|
519
519
|
playbackHlsUrl: null,
|
|
520
520
|
livestreamUrl: null
|
|
521
521
|
}),
|
|
522
|
-
hlsUrls =
|
|
523
|
-
setHlsUrls =
|
|
524
|
-
var
|
|
525
|
-
transcriptionState =
|
|
526
|
-
setTranscriptionState =
|
|
522
|
+
hlsUrls = _useState19[0],
|
|
523
|
+
setHlsUrls = _useState19[1];
|
|
524
|
+
var _useState20 = useState('TRANSCRIPTION_STOPPED'),
|
|
525
|
+
transcriptionState = _useState20[0],
|
|
526
|
+
setTranscriptionState = _useState20[1];
|
|
527
527
|
var meetingRef = useRef();
|
|
528
528
|
var localMicOnRef = useRef();
|
|
529
529
|
var localWebcamOnRef = useRef();
|
|
@@ -739,8 +739,14 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
739
739
|
meeting.off('whiteboard-stopped', _handle_whiteboard_stopped);
|
|
740
740
|
meeting.off('whiteboard-started', _handle_whiteboard_started);
|
|
741
741
|
meeting.off('transcription-state-changed', _handle_transcription_state_changed);
|
|
742
|
+
meeting.off('transcription-text', _handle_transcription_text);
|
|
742
743
|
meeting.off('character-joined', _handle_character_joined);
|
|
743
744
|
meeting.off('character-left', _handle_character_left);
|
|
745
|
+
meeting.off('media-relay-started', _handle_media_relay_started);
|
|
746
|
+
meeting.off('media-relay-stopped', _handle_media_relay_stopped);
|
|
747
|
+
meeting.off('media-relay-error', _handle_media_relay_error);
|
|
748
|
+
meeting.off('media-relay-request-response', _handle_media_relay_request_response);
|
|
749
|
+
meeting.off('media-relay-request-received', _handle_media_relay_request_received);
|
|
744
750
|
}
|
|
745
751
|
if (typeof (meeting === null || meeting === void 0 ? void 0 : (_meeting$localPartici = meeting.localParticipant) === null || _meeting$localPartici === void 0 ? void 0 : _meeting$localPartici.off) === 'function') {
|
|
746
752
|
meeting.localParticipant.off('stream-enabled', _handle_localParticipant_stream_enabled);
|
|
@@ -1229,9 +1235,9 @@ var MeetingProvider = function MeetingProvider(_ref) {
|
|
|
1229
1235
|
meeting.stopLivestream();
|
|
1230
1236
|
}
|
|
1231
1237
|
};
|
|
1232
|
-
var connectTo = function connectTo(
|
|
1233
|
-
var meetingId =
|
|
1234
|
-
payload =
|
|
1238
|
+
var connectTo = function connectTo(_ref0) {
|
|
1239
|
+
var meetingId = _ref0.meetingId,
|
|
1240
|
+
payload = _ref0.payload;
|
|
1235
1241
|
try {
|
|
1236
1242
|
var _meeting4 = meetingRef.current;
|
|
1237
1243
|
var _temp = function () {
|
|
@@ -1473,6 +1479,12 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1473
1479
|
setTrack(stream);
|
|
1474
1480
|
onStreamEnabled(stream);
|
|
1475
1481
|
};
|
|
1482
|
+
var _handleStreamPaused = function _handleStreamPaused(data) {
|
|
1483
|
+
onStreamPaused(data);
|
|
1484
|
+
};
|
|
1485
|
+
var _handleStreamResumed = function _handleStreamResumed(data) {
|
|
1486
|
+
onStreamResumed(data);
|
|
1487
|
+
};
|
|
1476
1488
|
var _handleParticipantModeChanged = function _handleParticipantModeChanged(data) {
|
|
1477
1489
|
if (participantId === data.participantId) {
|
|
1478
1490
|
setMode(data.mode);
|
|
@@ -1507,6 +1519,18 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1507
1519
|
newStatus: newStatus
|
|
1508
1520
|
});
|
|
1509
1521
|
};
|
|
1522
|
+
var _handleProducerAdded = function _handleProducerAdded(data) {
|
|
1523
|
+
onProducerAdded(data);
|
|
1524
|
+
};
|
|
1525
|
+
var _handleProducerRemoved = function _handleProducerRemoved(data) {
|
|
1526
|
+
onProducerRemoved(data);
|
|
1527
|
+
};
|
|
1528
|
+
var _handleConsumerAdded = function _handleConsumerAdded(data) {
|
|
1529
|
+
onConsumerAdded(data);
|
|
1530
|
+
};
|
|
1531
|
+
var _handleConsumerRemoved = function _handleConsumerRemoved(data) {
|
|
1532
|
+
onConsumerRemoved(data);
|
|
1533
|
+
};
|
|
1510
1534
|
var setQuality = function setQuality(quality) {
|
|
1511
1535
|
participant === null || participant === void 0 ? void 0 : participant.setQuality(quality);
|
|
1512
1536
|
};
|
|
@@ -1585,32 +1609,26 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1585
1609
|
}
|
|
1586
1610
|
participant === null || participant === void 0 ? void 0 : participant.on('stream-enabled', _handleStreamEnabled);
|
|
1587
1611
|
participant === null || participant === void 0 ? void 0 : participant.on('stream-disabled', _handleStreamDisabled);
|
|
1588
|
-
participant === null || participant === void 0 ? void 0 : participant.on('stream-paused',
|
|
1589
|
-
|
|
1590
|
-
});
|
|
1591
|
-
participant === null || participant === void 0 ? void 0 : participant.on('stream-resumed', function (data) {
|
|
1592
|
-
onStreamResumed(data);
|
|
1593
|
-
});
|
|
1612
|
+
participant === null || participant === void 0 ? void 0 : participant.on('stream-paused', _handleStreamPaused);
|
|
1613
|
+
participant === null || participant === void 0 ? void 0 : participant.on('stream-resumed', _handleStreamResumed);
|
|
1594
1614
|
participant === null || participant === void 0 ? void 0 : participant.on('media-status-changed', _handleMediaStatusChanged);
|
|
1595
1615
|
participant === null || participant === void 0 ? void 0 : participant.on('video-quality-changed', _handleVideoQualityChanged);
|
|
1596
|
-
participant === null || participant === void 0 ? void 0 : participant.on('producer-added',
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
participant === null || participant === void 0 ? void 0 : participant.on('
|
|
1600
|
-
onProducerRemoved(data);
|
|
1601
|
-
});
|
|
1602
|
-
participant === null || participant === void 0 ? void 0 : participant.on('consumer-added', function (data) {
|
|
1603
|
-
onConsumerAdded(data);
|
|
1604
|
-
});
|
|
1605
|
-
participant === null || participant === void 0 ? void 0 : participant.on('consumer-removed', function (data) {
|
|
1606
|
-
onConsumerRemoved(data);
|
|
1607
|
-
});
|
|
1616
|
+
participant === null || participant === void 0 ? void 0 : participant.on('producer-added', _handleProducerAdded);
|
|
1617
|
+
participant === null || participant === void 0 ? void 0 : participant.on('producer-removed', _handleProducerRemoved);
|
|
1618
|
+
participant === null || participant === void 0 ? void 0 : participant.on('consumer-added', _handleConsumerAdded);
|
|
1619
|
+
participant === null || participant === void 0 ? void 0 : participant.on('consumer-removed', _handleConsumerRemoved);
|
|
1608
1620
|
eventEmitter.on(events['participant-mode-changed'], _handleParticipantModeChanged);
|
|
1609
1621
|
return function () {
|
|
1610
1622
|
participant === null || participant === void 0 ? void 0 : participant.off('stream-enabled', _handleStreamEnabled);
|
|
1611
1623
|
participant === null || participant === void 0 ? void 0 : participant.off('stream-disabled', _handleStreamDisabled);
|
|
1624
|
+
participant === null || participant === void 0 ? void 0 : participant.off('stream-paused', _handleStreamPaused);
|
|
1625
|
+
participant === null || participant === void 0 ? void 0 : participant.off('stream-resumed', _handleStreamResumed);
|
|
1612
1626
|
participant === null || participant === void 0 ? void 0 : participant.off('media-status-changed', _handleMediaStatusChanged);
|
|
1613
1627
|
participant === null || participant === void 0 ? void 0 : participant.off('video-quality-changed', _handleVideoQualityChanged);
|
|
1628
|
+
participant === null || participant === void 0 ? void 0 : participant.off('producer-added', _handleProducerAdded);
|
|
1629
|
+
participant === null || participant === void 0 ? void 0 : participant.off('producer-removed', _handleProducerRemoved);
|
|
1630
|
+
participant === null || participant === void 0 ? void 0 : participant.off('consumer-added', _handleConsumerAdded);
|
|
1631
|
+
participant === null || participant === void 0 ? void 0 : participant.off('consumer-removed', _handleConsumerRemoved);
|
|
1614
1632
|
eventEmitter.off(events['participant-mode-changed'], _handleParticipantModeChanged);
|
|
1615
1633
|
};
|
|
1616
1634
|
}, [participant]);
|