@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.
@@ -456,7 +456,7 @@ var MeetingConsumer = function MeetingConsumer(_ref2) {
456
456
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeetingProviderContex.Consumer, null, children));
457
457
  };
458
458
 
459
- var version = "0.6.5";
459
+ var version = "0.6.6";
460
460
 
461
461
  var MeetingProvider = function MeetingProvider(_ref) {
462
462
  var children = _ref.children,
@@ -1474,9 +1474,15 @@ var useParticipant = function useParticipant(participantId, _temp) {
1474
1474
  var _useState6 = useState(participant === null || participant === void 0 ? void 0 : participant.micOn),
1475
1475
  micOn = _useState6[0],
1476
1476
  setMicOn = _useState6[1];
1477
- var _useState7 = useState(participant === null || participant === void 0 ? void 0 : participant.mode),
1478
- mode = _useState7[0],
1479
- setMode = _useState7[1];
1477
+ var _useState7 = useState(participant === null || participant === void 0 ? void 0 : participant.screenShareOn),
1478
+ screenShareOn = _useState7[0],
1479
+ setScreenShareOn = _useState7[1];
1480
+ var _useState8 = useState(participant === null || participant === void 0 ? void 0 : participant.screenShareAudioOn),
1481
+ screenShareAudioOn = _useState8[0],
1482
+ setScreenShareAudioOn = _useState8[1];
1483
+ var _useState9 = useState(participant === null || participant === void 0 ? void 0 : participant.mode),
1484
+ mode = _useState9[0],
1485
+ setMode = _useState9[1];
1480
1486
  var setTrack = function setTrack(stream) {
1481
1487
  if (stream.track.readyState === 'live') {
1482
1488
  switch (stream.kind) {
@@ -1560,6 +1566,10 @@ var useParticipant = function useParticipant(participantId, _temp) {
1560
1566
  setMicOn(newStatus);
1561
1567
  } else if (kind == 'video') {
1562
1568
  setWebcamOn(newStatus);
1569
+ } else if (kind == 'share') {
1570
+ setScreenShareOn(newStatus);
1571
+ } else if (kind == 'shareAudio') {
1572
+ setScreenShareAudioOn(newStatus);
1563
1573
  }
1564
1574
  onMediaStatusChanged({
1565
1575
  kind: kind,
@@ -1655,6 +1665,12 @@ var useParticipant = function useParticipant(participantId, _temp) {
1655
1665
  if (participant !== null && participant !== void 0 && participant.webcamOn) {
1656
1666
  setWebcamOn(webcamOn);
1657
1667
  }
1668
+ if (participant !== null && participant !== void 0 && participant.screenShareOn) {
1669
+ setScreenShareOn(screenShareOn);
1670
+ }
1671
+ if (participant !== null && participant !== void 0 && participant.screenShareAudioOn) {
1672
+ setScreenShareAudioOn(screenShareAudioOn);
1673
+ }
1658
1674
  participant === null || participant === void 0 ? void 0 : participant.on('stream-enabled', _handleStreamEnabled);
1659
1675
  participant === null || participant === void 0 ? void 0 : participant.on('stream-disabled', _handleStreamDisabled);
1660
1676
  participant === null || participant === void 0 ? void 0 : participant.on('stream-paused', _handleStreamPaused);
@@ -1691,7 +1707,8 @@ var useParticipant = function useParticipant(participantId, _temp) {
1691
1707
  micOn: micOn || !!micStream,
1692
1708
  mode: mode,
1693
1709
  metaData: participant === null || participant === void 0 ? void 0 : participant.metaData,
1694
- screenShareOn: !!screenShareStream,
1710
+ screenShareOn: screenShareOn || !!screenShareStream,
1711
+ screenShareAudioOn: screenShareAudioOn || !!screenShareAudioStream,
1695
1712
  isLocal: (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.id) === participantId,
1696
1713
  isActiveSpeaker: activeSpeakerId === participantId,
1697
1714
  isMainParticipant: (mainParticipant === null || mainParticipant === void 0 ? void 0 : mainParticipant.id) === participantId,