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