@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.
@@ -1661,6 +1661,7 @@ function useMediaSupervisor() {
1661
1661
  acceptOffer: useCallback2(async () => engine?.acceptDeviceOffer(), [engine]),
1662
1662
  dismissOffer: useCallback2(() => engine?.dismissDeviceOffer(), [engine]),
1663
1663
  dismissNotice: useCallback2(() => engine?.dismissDeviceNotice(), [engine]),
1664
+ undoNotice: useCallback2(async () => engine?.undoDeviceNotice(), [engine]),
1664
1665
  retry: useCallback2(
1665
1666
  async (kind) => kind === "microphone" ? engine?.setMicrophoneEnabled(true) : engine?.setCameraEnabled(true),
1666
1667
  [engine]
@@ -1914,19 +1915,19 @@ function useLivePolicy() {
1914
1915
  const host = useMeetHost();
1915
1916
  const pending = consentPending(policy, role, snapshot?.recording === "recording", snapshot?.recordingConsentGiven === true);
1916
1917
  const viewOnly = pending && policy.recordingConsent === "view_only_until_agree";
1917
- const idle = snapshot !== null && snapshot.recording !== "recording" && snapshot.recording !== "starting" && snapshot.recording !== "stopping";
1918
- const given = snapshot?.recordingConsentGiven === true;
1919
1918
  const store = host?.store ?? null;
1920
- useEffect3(() => {
1921
- if (idle && given) store?.patch({ recordingConsentGiven: false });
1922
- }, [idle, given, store]);
1923
1919
  return {
1924
1920
  canChat: canChat(policy, role),
1925
1921
  chatMode: policy.chatMode,
1926
1922
  micLocked: isLockedFor(policy, role, "microphone") || viewOnly,
1927
1923
  cameraLocked: isLockedFor(policy, role, "camera") || viewOnly,
1928
1924
  consent: pending ? policy.recordingConsent === "ok_or_leave" ? "ok_or_leave" : "view_only_until_agree" : null,
1929
- agree: () => store?.patch({ recordingConsentGiven: true }),
1925
+ // The person's agreement is recorded by the SERVER (per run); the screen follows at once and
1926
+ // takes it back if the server did not save it.
1927
+ agree: () => {
1928
+ store?.patch({ recordingConsentGiven: true });
1929
+ void host?.meetings.acknowledgeConsent().catch(() => store?.patch({ recordingConsentGiven: false }));
1930
+ },
1930
1931
  minutesLeft: left,
1931
1932
  timeWarning: left !== null && left <= policy.timeLimitWarningMinutes
1932
1933
  };
@@ -4181,7 +4182,7 @@ function SpeakingWhileMutedNudge() {
4181
4182
  }
4182
4183
  function MediaNotices() {
4183
4184
  const media = useLocalMedia();
4184
- const { region, where, enableAudio, acceptOffer, dismissOffer, dismissNotice, retry } = useMediaSupervisor();
4185
+ const { region, where, enableAudio, acceptOffer, dismissOffer, dismissNotice, undoNotice, retry } = useMediaSupervisor();
4185
4186
  const [fixing, setFixing] = useState5(null);
4186
4187
  const chips = ["microphone", "camera"].flatMap((kind) => {
4187
4188
  const reason = deviceUnavailableReason(media[kind], region.permission[kind]);
@@ -4246,9 +4247,10 @@ function MediaNotices() {
4246
4247
  {
4247
4248
  className: "mx-meet__media-pill",
4248
4249
  role: "status",
4249
- ...notice.outcome === "lost" ? { "data-meet-notice": "device-lost" } : {},
4250
+ "data-meet-notice": notice.outcome === "lost" ? "device-lost" : "device-switched",
4250
4251
  children: [
4251
- /* @__PURE__ */ jsx6("span", { children: notice.outcome === "switched" ? `${notice.from || name(notice.kind)} disconnected \xB7 now using ${notice.to || "the default"}` : `${notice.from || name(notice.kind)} disconnected` }),
4252
+ /* @__PURE__ */ jsx6("span", { children: notice.outcome === "switched" ? `${notice.from || name(notice.kind)} disconnected \xB7 switched to ${notice.to || "the default"}` : `${notice.from || name(notice.kind)} disconnected` }),
4253
+ notice.outcome === "switched" ? /* @__PURE__ */ jsx6("button", { type: "button", className: "mx-meet__link", onClick: () => void undoNotice(), children: "Undo" }) : null,
4252
4254
  /* @__PURE__ */ jsx6("button", { type: "button", className: "mx-meet__toast-close", "aria-label": "Dismiss", onClick: dismissNotice, children: /* @__PURE__ */ jsx6(CloseIcon, { width: 14, height: 14 }) })
4253
4255
  ]
4254
4256
  }
@@ -4301,7 +4303,7 @@ function MeetingOverlays() {
4301
4303
  live.minutesLeft,
4302
4304
  " ",
4303
4305
  live.minutesLeft === 1 ? "minute" : "minutes",
4304
- " (time limit)."
4306
+ "."
4305
4307
  ] }) : null,
4306
4308
  notice !== null && notice.kind !== "removed" ? (
4307
4309
  // A host's request ("the host is asking you to unmute"), not an error: