@naviedu/room-platform-react 0.0.34 → 0.0.35

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.d.ts CHANGED
@@ -72,6 +72,7 @@ declare interface RoomControlState {
72
72
  mode: string;
73
73
  raisedHandParticipantIdentities: string[];
74
74
  activeSpeakerParticipantIdentity?: string;
75
+ activeSpeakerTurnId?: string;
75
76
  monitorActive: boolean;
76
77
  monitorViewerCount: number;
77
78
  }
package/index.esm.js CHANGED
@@ -260,7 +260,7 @@ var isRoomControlState = function(value) {
260
260
  var monitorViewerCount = state['monitorViewerCount'];
261
261
  return typeof state['revision'] === 'string' && /^\d+$/.test(state['revision']) && typeof state['mode'] === 'string' && state['mode'].trim().length > 0 && state['mode'].length <= 64 && Array.isArray(state['raisedHandParticipantIdentities']) && state['raisedHandParticipantIdentities'].every(function(identity) {
262
262
  return typeof identity === 'string';
263
- }) && (state['activeSpeakerParticipantIdentity'] === undefined || typeof state['activeSpeakerParticipantIdentity'] === 'string') && typeof state['monitorActive'] === 'boolean' && typeof monitorViewerCount === 'number' && Number.isInteger(monitorViewerCount) && monitorViewerCount >= 0 && state['monitorActive'] === monitorViewerCount > 0 && state['monitorViewers'] === undefined && state['storageRevision'] === undefined;
263
+ }) && (state['activeSpeakerParticipantIdentity'] === undefined || typeof state['activeSpeakerParticipantIdentity'] === 'string') && (state['activeSpeakerTurnId'] === undefined || typeof state['activeSpeakerTurnId'] === 'string' && state['activeSpeakerTurnId'].trim().length > 0) && (state['activeSpeakerTurnId'] === undefined || state['activeSpeakerParticipantIdentity'] !== undefined) && typeof state['monitorActive'] === 'boolean' && typeof monitorViewerCount === 'number' && Number.isInteger(monitorViewerCount) && monitorViewerCount >= 0 && state['monitorActive'] === monitorViewerCount > 0 && state['monitorViewers'] === undefined && state['storageRevision'] === undefined && state['recentActiveSpeakerTurn'] === undefined;
264
264
  };
265
265
 
266
266
  function _type_of$c(obj) {
@@ -16217,7 +16217,7 @@ function RoomParticipantActions(param) {
16217
16217
  var _param_isActiveSpeaker = param.isActiveSpeaker, isActiveSpeaker = _param_isActiveSpeaker === void 0 ? false : _param_isActiveSpeaker, isLocal = param.isLocal, isOnline = param.isOnline, participant = param.participant, participantIdentity = param.participantIdentity;
16218
16218
  var _ref;
16219
16219
  var presence = useRoomPresence();
16220
- var _useRoomPlatform = useRoomPlatform(), hasCapability = _useRoomPlatform.hasCapability, isActionPending = _useRoomPlatform.isActionPending, performAction = _useRoomPlatform.performAction;
16220
+ var _useRoomPlatform = useRoomPlatform(), controlState = _useRoomPlatform.controlState, hasCapability = _useRoomPlatform.hasCapability, isActionPending = _useRoomPlatform.isActionPending, performAction = _useRoomPlatform.performAction;
16221
16221
  var mappedPresence = presence.find(function(entry) {
16222
16222
  return entry.externalActorId === participant.externalActorId;
16223
16223
  });
@@ -16294,7 +16294,7 @@ function RoomParticipantActions(param) {
16294
16294
  "aria-label": isInvitingPrivateRoom ? "Đang gọi ri\xeang ".concat(participant.displayName) : "Gọi ri\xeang ".concat(participant.displayName),
16295
16295
  className: "h-9 w-9 shrink-0 rounded-lg",
16296
16296
  onClick: startPrivateRoom,
16297
- disabled: isInvitingPrivateRoom,
16297
+ disabled: isInvitingPrivateRoom || isSettingActiveSpeakerPending || Boolean(controlState === null || controlState === void 0 ? void 0 : controlState.activeSpeakerParticipantIdentity),
16298
16298
  children: isInvitingPrivateRoom ? /*#__PURE__*/ jsx(Spinner, {
16299
16299
  className: "size-4"
16300
16300
  }) : /*#__PURE__*/ jsx(PhoneCall, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naviedu/room-platform-react",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "type": "module",
5
5
  "main": "./index.esm.js",
6
6
  "module": "./index.esm.js",