@naviedu/room-platform-react 0.0.37 → 0.0.39
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/index.esm.js +20 -7
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -14471,9 +14471,9 @@ function RoomPlatformProvider(param) {
|
|
|
14471
14471
|
case 1:
|
|
14472
14472
|
_state.trys.push([
|
|
14473
14473
|
1,
|
|
14474
|
-
|
|
14474
|
+
6,
|
|
14475
14475
|
,
|
|
14476
|
-
|
|
14476
|
+
7
|
|
14477
14477
|
]);
|
|
14478
14478
|
if (!wasPublished) return [
|
|
14479
14479
|
3,
|
|
@@ -14487,11 +14487,23 @@ function RoomPlatformProvider(param) {
|
|
|
14487
14487
|
_state.sent();
|
|
14488
14488
|
_state.label = 3;
|
|
14489
14489
|
case 3:
|
|
14490
|
-
return [
|
|
14490
|
+
if (!(wasPublished && retainForPreview)) return [
|
|
14491
14491
|
3,
|
|
14492
14492
|
5
|
|
14493
14493
|
];
|
|
14494
|
+
return [
|
|
14495
|
+
4,
|
|
14496
|
+
track.restartTrack()
|
|
14497
|
+
];
|
|
14494
14498
|
case 4:
|
|
14499
|
+
_state.sent();
|
|
14500
|
+
_state.label = 5;
|
|
14501
|
+
case 5:
|
|
14502
|
+
return [
|
|
14503
|
+
3,
|
|
14504
|
+
7
|
|
14505
|
+
];
|
|
14506
|
+
case 6:
|
|
14495
14507
|
unpublishError = _state.sent();
|
|
14496
14508
|
if (!retainForPreview) removeCanonicalCameraTrack(track, true);
|
|
14497
14509
|
reportError(unpublishError, {
|
|
@@ -14501,7 +14513,7 @@ function RoomPlatformProvider(param) {
|
|
|
14501
14513
|
return [
|
|
14502
14514
|
2
|
|
14503
14515
|
];
|
|
14504
|
-
case
|
|
14516
|
+
case 7:
|
|
14505
14517
|
if (!retainForPreview) removeCanonicalCameraTrack(track, !wasPublished);
|
|
14506
14518
|
else if (isMountedRef.current) setLocalMedia(function(current) {
|
|
14507
14519
|
return _object_spread_props$b(_object_spread$d({}, current), {
|
|
@@ -16795,7 +16807,7 @@ function RoomParticipantActions(param) {
|
|
|
16795
16807
|
var resolvedParticipantIdentity = participantIdentity !== null && participantIdentity !== void 0 ? participantIdentity : mappedPresence === null || mappedPresence === void 0 ? void 0 : mappedPresence.participantIdentity;
|
|
16796
16808
|
var resolvedIsLocal = (_ref = isLocal !== null && isLocal !== void 0 ? isLocal : mappedPresence === null || mappedPresence === void 0 ? void 0 : mappedPresence.isLocal) !== null && _ref !== void 0 ? _ref : false;
|
|
16797
16809
|
var resolvedIsOnline = isOnline !== null && isOnline !== void 0 ? isOnline : Boolean(mappedPresence);
|
|
16798
|
-
var
|
|
16810
|
+
var canUsePrivateRoom = (controlState === null || controlState === void 0 ? void 0 : controlState.mode) && (controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== 'live';
|
|
16799
16811
|
var _useRoomPlatformPrivateRoom = useRoomPlatformPrivateRoom(), cancelPrivateRoom = _useRoomPlatformPrivateRoom.cancelPrivateRoom, currentPrivateRoomOperation = _useRoomPlatformPrivateRoom.currentPrivateRoomOperation;
|
|
16800
16812
|
var roomPlatformToast = useRoomPlatformToast();
|
|
16801
16813
|
var _useState = _sliced_to_array$l(useState(false), 2), privateCallHovered = _useState[0], setPrivateCallHovered = _useState[1];
|
|
@@ -16804,10 +16816,11 @@ function RoomParticipantActions(param) {
|
|
|
16804
16816
|
} : undefined;
|
|
16805
16817
|
var isSettingActiveSpeaker = Boolean(actionPayload && isActionPending(RoomPlatformAction.SPEAKER_SET, actionPayload));
|
|
16806
16818
|
var isSettingActiveSpeakerPending = isActionPending(RoomPlatformAction.SPEAKER_SET);
|
|
16807
|
-
var isPrivateRoomRinging =
|
|
16819
|
+
var isPrivateRoomRinging = canUsePrivateRoom && !resolvedIsLocal && (currentPrivateRoomOperation === null || currentPrivateRoomOperation === void 0 ? void 0 : currentPrivateRoomOperation.status) === 'ringing' && currentPrivateRoomOperation.studentExternalActorId === participant.externalActorId;
|
|
16808
16820
|
var isInvitingPrivateRoom = Boolean(actionPayload && isActionPending(RoomPlatformAction.PRIVATE_ROOM_INVITE, actionPayload));
|
|
16809
16821
|
var isCancelingPrivateRoom = isActionPending(RoomPlatformAction.PRIVATE_ROOM_CLOSE);
|
|
16810
|
-
var canInvitePrivateRoom = Boolean(
|
|
16822
|
+
var canInvitePrivateRoom = Boolean(canUsePrivateRoom && !resolvedIsLocal && resolvedIsOnline && actionPayload && hasCapability('private_room:invite') && !currentPrivateRoomOperation);
|
|
16823
|
+
console.log('canInvitePrivateRoom', canInvitePrivateRoom);
|
|
16811
16824
|
var canCancelPrivateRoom = Boolean(isPrivateRoomRinging && hasCapability('private_room:close') && !isCancelingPrivateRoom);
|
|
16812
16825
|
var setActiveSpeaker = function() {
|
|
16813
16826
|
if (!actionPayload || isSettingActiveSpeakerPending) return;
|