@ai-matrx/meet 0.11.49 → 0.11.50

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.
@@ -1756,6 +1756,7 @@ function useMediaSupervisor() {
1756
1756
  acceptOffer: (0, import_react5.useCallback)(async () => engine?.acceptDeviceOffer(), [engine]),
1757
1757
  dismissOffer: (0, import_react5.useCallback)(() => engine?.dismissDeviceOffer(), [engine]),
1758
1758
  dismissNotice: (0, import_react5.useCallback)(() => engine?.dismissDeviceNotice(), [engine]),
1759
+ undoNotice: (0, import_react5.useCallback)(async () => engine?.undoDeviceNotice(), [engine]),
1759
1760
  retry: (0, import_react5.useCallback)(
1760
1761
  async (kind) => kind === "microphone" ? engine?.setMicrophoneEnabled(true) : engine?.setCameraEnabled(true),
1761
1762
  [engine]
@@ -2009,19 +2010,19 @@ function useLivePolicy() {
2009
2010
  const host = useMeetHost();
2010
2011
  const pending = consentPending(policy, role, snapshot?.recording === "recording", snapshot?.recordingConsentGiven === true);
2011
2012
  const viewOnly = pending && policy.recordingConsent === "view_only_until_agree";
2012
- const idle = snapshot !== null && snapshot.recording !== "recording" && snapshot.recording !== "starting" && snapshot.recording !== "stopping";
2013
- const given = snapshot?.recordingConsentGiven === true;
2014
2013
  const store = host?.store ?? null;
2015
- (0, import_react5.useEffect)(() => {
2016
- if (idle && given) store?.patch({ recordingConsentGiven: false });
2017
- }, [idle, given, store]);
2018
2014
  return {
2019
2015
  canChat: canChat(policy, role),
2020
2016
  chatMode: policy.chatMode,
2021
2017
  micLocked: isLockedFor(policy, role, "microphone") || viewOnly,
2022
2018
  cameraLocked: isLockedFor(policy, role, "camera") || viewOnly,
2023
2019
  consent: pending ? policy.recordingConsent === "ok_or_leave" ? "ok_or_leave" : "view_only_until_agree" : null,
2024
- agree: () => store?.patch({ recordingConsentGiven: true }),
2020
+ // The person's agreement is recorded by the SERVER (per run); the screen follows at once and
2021
+ // takes it back if the server did not save it.
2022
+ agree: () => {
2023
+ store?.patch({ recordingConsentGiven: true });
2024
+ void host?.meetings.acknowledgeConsent().catch(() => store?.patch({ recordingConsentGiven: false }));
2025
+ },
2025
2026
  minutesLeft: left,
2026
2027
  timeWarning: left !== null && left <= policy.timeLimitWarningMinutes
2027
2028
  };
@@ -4276,7 +4277,7 @@ function SpeakingWhileMutedNudge() {
4276
4277
  }
4277
4278
  function MediaNotices() {
4278
4279
  const media = useLocalMedia();
4279
- const { region, where, enableAudio, acceptOffer, dismissOffer, dismissNotice, retry } = useMediaSupervisor();
4280
+ const { region, where, enableAudio, acceptOffer, dismissOffer, dismissNotice, undoNotice, retry } = useMediaSupervisor();
4280
4281
  const [fixing, setFixing] = (0, import_react10.useState)(null);
4281
4282
  const chips = ["microphone", "camera"].flatMap((kind) => {
4282
4283
  const reason = deviceUnavailableReason(media[kind], region.permission[kind]);
@@ -4341,9 +4342,10 @@ function MediaNotices() {
4341
4342
  {
4342
4343
  className: "mx-meet__media-pill",
4343
4344
  role: "status",
4344
- ...notice.outcome === "lost" ? { "data-meet-notice": "device-lost" } : {},
4345
+ "data-meet-notice": notice.outcome === "lost" ? "device-lost" : "device-switched",
4345
4346
  children: [
4346
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: notice.outcome === "switched" ? `${notice.from || name(notice.kind)} disconnected \xB7 now using ${notice.to || "the default"}` : `${notice.from || name(notice.kind)} disconnected` }),
4347
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: notice.outcome === "switched" ? `${notice.from || name(notice.kind)} disconnected \xB7 switched to ${notice.to || "the default"}` : `${notice.from || name(notice.kind)} disconnected` }),
4348
+ notice.outcome === "switched" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "mx-meet__link", onClick: () => void undoNotice(), children: "Undo" }) : null,
4347
4349
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "mx-meet__toast-close", "aria-label": "Dismiss", onClick: dismissNotice, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CloseIcon, { width: 14, height: 14 }) })
4348
4350
  ]
4349
4351
  }
@@ -4396,7 +4398,7 @@ function MeetingOverlays() {
4396
4398
  live.minutesLeft,
4397
4399
  " ",
4398
4400
  live.minutesLeft === 1 ? "minute" : "minutes",
4399
- " (time limit)."
4401
+ "."
4400
4402
  ] }) : null,
4401
4403
  notice !== null && notice.kind !== "removed" ? (
4402
4404
  // A host's request ("the host is asking you to unmute"), not an error: