@naviedu/room-platform-react 0.0.38 → 0.0.40

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.
Files changed (2) hide show
  1. package/index.esm.js +23 -5
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -14471,10 +14471,16 @@ function RoomPlatformProvider(param) {
14471
14471
  case 1:
14472
14472
  _state.trys.push([
14473
14473
  1,
14474
- 4,
14474
+ 6,
14475
14475
  ,
14476
- 5
14476
+ 7
14477
14477
  ]);
14478
+ console.log('RoomPlatformProvider.unpublishCanonicalCamera', {
14479
+ publicationTrack: publication === null || publication === void 0 ? void 0 : publication.track,
14480
+ track: track,
14481
+ wasPublished: wasPublished,
14482
+ retainForPreview: retainForPreview
14483
+ });
14478
14484
  if (!wasPublished) return [
14479
14485
  3,
14480
14486
  3
@@ -14487,11 +14493,23 @@ function RoomPlatformProvider(param) {
14487
14493
  _state.sent();
14488
14494
  _state.label = 3;
14489
14495
  case 3:
14490
- return [
14496
+ if (!(wasPublished && retainForPreview)) return [
14491
14497
  3,
14492
14498
  5
14493
14499
  ];
14500
+ return [
14501
+ 4,
14502
+ track.restartTrack()
14503
+ ];
14494
14504
  case 4:
14505
+ _state.sent();
14506
+ _state.label = 5;
14507
+ case 5:
14508
+ return [
14509
+ 3,
14510
+ 7
14511
+ ];
14512
+ case 6:
14495
14513
  unpublishError = _state.sent();
14496
14514
  if (!retainForPreview) removeCanonicalCameraTrack(track, true);
14497
14515
  reportError(unpublishError, {
@@ -14501,7 +14519,7 @@ function RoomPlatformProvider(param) {
14501
14519
  return [
14502
14520
  2
14503
14521
  ];
14504
- case 5:
14522
+ case 7:
14505
14523
  if (!retainForPreview) removeCanonicalCameraTrack(track, !wasPublished);
14506
14524
  else if (isMountedRef.current) setLocalMedia(function(current) {
14507
14525
  return _object_spread_props$b(_object_spread$d({}, current), {
@@ -16795,7 +16813,7 @@ function RoomParticipantActions(param) {
16795
16813
  var resolvedParticipantIdentity = participantIdentity !== null && participantIdentity !== void 0 ? participantIdentity : mappedPresence === null || mappedPresence === void 0 ? void 0 : mappedPresence.participantIdentity;
16796
16814
  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
16815
  var resolvedIsOnline = isOnline !== null && isOnline !== void 0 ? isOnline : Boolean(mappedPresence);
16798
- var canUsePrivateRoom = (controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== 'live';
16816
+ var canUsePrivateRoom = (controlState === null || controlState === void 0 ? void 0 : controlState.mode) && (controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== 'live';
16799
16817
  var _useRoomPlatformPrivateRoom = useRoomPlatformPrivateRoom(), cancelPrivateRoom = _useRoomPlatformPrivateRoom.cancelPrivateRoom, currentPrivateRoomOperation = _useRoomPlatformPrivateRoom.currentPrivateRoomOperation;
16800
16818
  var roomPlatformToast = useRoomPlatformToast();
16801
16819
  var _useState = _sliced_to_array$l(useState(false), 2), privateCallHovered = _useState[0], setPrivateCallHovered = _useState[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naviedu/room-platform-react",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "type": "module",
5
5
  "main": "./index.esm.js",
6
6
  "module": "./index.esm.js",