@videosdk.live/react-sdk 0.6.5 → 0.6.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 +22 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/participant.d.ts +10 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -458,7 +458,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
|
|
|
458
458
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MeetingProviderContex.Consumer, null, children));
|
|
459
459
|
};
|
|
460
460
|
|
|
461
|
-
var version = "0.6.
|
|
461
|
+
var version = "0.6.6";
|
|
462
462
|
|
|
463
463
|
var MeetingProvider = function MeetingProvider(_ref) {
|
|
464
464
|
var children = _ref.children,
|
|
@@ -1476,9 +1476,15 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1476
1476
|
var _useState6 = React.useState(participant === null || participant === void 0 ? void 0 : participant.micOn),
|
|
1477
1477
|
micOn = _useState6[0],
|
|
1478
1478
|
setMicOn = _useState6[1];
|
|
1479
|
-
var _useState7 = React.useState(participant === null || participant === void 0 ? void 0 : participant.
|
|
1480
|
-
|
|
1481
|
-
|
|
1479
|
+
var _useState7 = React.useState(participant === null || participant === void 0 ? void 0 : participant.screenShareOn),
|
|
1480
|
+
screenShareOn = _useState7[0],
|
|
1481
|
+
setScreenShareOn = _useState7[1];
|
|
1482
|
+
var _useState8 = React.useState(participant === null || participant === void 0 ? void 0 : participant.screenShareAudioOn),
|
|
1483
|
+
screenShareAudioOn = _useState8[0],
|
|
1484
|
+
setScreenShareAudioOn = _useState8[1];
|
|
1485
|
+
var _useState9 = React.useState(participant === null || participant === void 0 ? void 0 : participant.mode),
|
|
1486
|
+
mode = _useState9[0],
|
|
1487
|
+
setMode = _useState9[1];
|
|
1482
1488
|
var setTrack = function setTrack(stream) {
|
|
1483
1489
|
if (stream.track.readyState === 'live') {
|
|
1484
1490
|
switch (stream.kind) {
|
|
@@ -1562,6 +1568,10 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1562
1568
|
setMicOn(newStatus);
|
|
1563
1569
|
} else if (kind == 'video') {
|
|
1564
1570
|
setWebcamOn(newStatus);
|
|
1571
|
+
} else if (kind == 'share') {
|
|
1572
|
+
setScreenShareOn(newStatus);
|
|
1573
|
+
} else if (kind == 'shareAudio') {
|
|
1574
|
+
setScreenShareAudioOn(newStatus);
|
|
1565
1575
|
}
|
|
1566
1576
|
onMediaStatusChanged({
|
|
1567
1577
|
kind: kind,
|
|
@@ -1657,6 +1667,12 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1657
1667
|
if (participant !== null && participant !== void 0 && participant.webcamOn) {
|
|
1658
1668
|
setWebcamOn(webcamOn);
|
|
1659
1669
|
}
|
|
1670
|
+
if (participant !== null && participant !== void 0 && participant.screenShareOn) {
|
|
1671
|
+
setScreenShareOn(screenShareOn);
|
|
1672
|
+
}
|
|
1673
|
+
if (participant !== null && participant !== void 0 && participant.screenShareAudioOn) {
|
|
1674
|
+
setScreenShareAudioOn(screenShareAudioOn);
|
|
1675
|
+
}
|
|
1660
1676
|
participant === null || participant === void 0 ? void 0 : participant.on('stream-enabled', _handleStreamEnabled);
|
|
1661
1677
|
participant === null || participant === void 0 ? void 0 : participant.on('stream-disabled', _handleStreamDisabled);
|
|
1662
1678
|
participant === null || participant === void 0 ? void 0 : participant.on('stream-paused', _handleStreamPaused);
|
|
@@ -1693,7 +1709,8 @@ var useParticipant = function useParticipant(participantId, _temp) {
|
|
|
1693
1709
|
micOn: micOn || !!micStream,
|
|
1694
1710
|
mode: mode,
|
|
1695
1711
|
metaData: participant === null || participant === void 0 ? void 0 : participant.metaData,
|
|
1696
|
-
screenShareOn: !!screenShareStream,
|
|
1712
|
+
screenShareOn: screenShareOn || !!screenShareStream,
|
|
1713
|
+
screenShareAudioOn: screenShareAudioOn || !!screenShareAudioStream,
|
|
1697
1714
|
isLocal: (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.id) === participantId,
|
|
1698
1715
|
isActiveSpeaker: activeSpeakerId === participantId,
|
|
1699
1716
|
isMainParticipant: (mainParticipant === null || mainParticipant === void 0 ? void 0 : mainParticipant.id) === participantId,
|