@ai-matrx/meet 0.7.5 → 0.7.6

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/dist/react.cjs CHANGED
@@ -1810,6 +1810,7 @@ var EMPTY = {
1810
1810
  recordingId: null,
1811
1811
  chat: [],
1812
1812
  chatLoaded: false,
1813
+ chatHistoryError: null,
1813
1814
  reactions: [],
1814
1815
  spotlight: null,
1815
1816
  moderationNotice: null,
@@ -1919,7 +1920,7 @@ function createMeetStore(initial = {}) {
1919
1920
  state.names,
1920
1921
  messages.map((message) => ({ identity: message.identity, displayName: message.displayName }))
1921
1922
  );
1922
- commit({ ...state, chat: merged.slice(-CHAT_LIMIT), chatLoaded: true, names });
1923
+ commit({ ...state, chat: merged.slice(-CHAT_LIMIT), chatLoaded: true, chatHistoryError: null, names });
1923
1924
  },
1924
1925
  settleChat(localId, next) {
1925
1926
  const index = state.chat.findIndex((message) => message.id === localId);
@@ -4815,6 +4816,10 @@ function MeetRuntime(props) {
4815
4816
  chatReadFor = snapshot.meeting.id;
4816
4817
  void inRoom.loadChat().catch((error) => {
4817
4818
  const normalized = error;
4819
+ store.patch({
4820
+ chatLoaded: true,
4821
+ chatHistoryError: normalized.remedy ?? "Messages sent before you joined could not be read. New messages still arrive."
4822
+ });
4818
4823
  report({
4819
4824
  level: "warn",
4820
4825
  message: normalized.message ?? "meet: the saved chat could not be read",
@@ -7006,7 +7011,8 @@ function ChatPanel({
7006
7011
  };
7007
7012
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PanelShell, { title: "Chat", onClose, children: [
7008
7013
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("ul", { className: "mx-meet__chat", ref: listRef, children: [
7009
- snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "mx-meet__panel-note", children: "No messages yet. Messages to everyone stay with the meeting, so people who join later see them." }) : null,
7014
+ snapshot?.chatHistoryError != null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "mx-meet__panel-note", children: snapshot.chatHistoryError }) : null,
7015
+ snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 && snapshot?.chatHistoryError == null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: "mx-meet__panel-note", children: "No messages yet. Messages to everyone stay with the meeting, so people who join later see them." }) : null,
7010
7016
  messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChatLine, { message, local, people }, message.id))
7011
7017
  ] }),
7012
7018
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
@@ -7472,7 +7478,7 @@ function EffectsSettings({ preview }) {
7472
7478
  const effects = useMediaEffects();
7473
7479
  const [error, setError] = (0, import_react4.useState)(null);
7474
7480
  const fileRef = (0, import_react4.useRef)(null);
7475
- const supported = effects.backgroundsSupported || preview != null;
7481
+ const supported = effects.backgroundsSupported || preview != null || videoEffectsSupported();
7476
7482
  const apply = (next) => {
7477
7483
  setError(null);
7478
7484
  void effects.set(next);
@@ -7867,7 +7873,7 @@ function PreJoinBody({
7867
7873
  }
7868
7874
  ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mx-meet__tile-placeholder", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { name: host.identity.displayName, url: host.identity.avatarUrl, size: 96 }) }),
7869
7875
  mode === "video" && preview.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__preview-note", children: preview.error }) : null,
7870
- microphone ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mx-meet__meter mx-meet__meter--preview", role: "meter", "aria-label": "Microphone level", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(level * 100), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { width: `${Math.min(100, Math.round(level * 160))}%` } }) }) : null
7876
+ microphone && micStream !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mx-meet__meter mx-meet__meter--preview", role: "meter", "aria-label": "Microphone level", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(level * 100), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { width: `${Math.min(100, Math.round(level * 160))}%` } }) }) : null
7871
7877
  ] }),
7872
7878
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__prejoin-panel", children: [
7873
7879
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "mx-meet__prejoin-title", children: "Ready to join?" }),
@@ -7983,7 +7989,9 @@ function useCameraPreview(deviceId2, effects) {
7983
7989
  }).catch((thrown) => {
7984
7990
  if (!live) return;
7985
7991
  const failure = thrown;
7986
- setError([failure.message, failure.remedy].filter(Boolean).join(". ") || "The camera did not start.");
7992
+ const message = (failure.message ?? "").replace(/^meet\.[A-Za-z.()]+:\s*/, "");
7993
+ const sentence = message.length > 0 ? message.charAt(0).toUpperCase() + message.slice(1) : "";
7994
+ setError([sentence, failure.remedy].filter(Boolean).join(". ") || "The camera did not start.");
7987
7995
  });
7988
7996
  return () => {
7989
7997
  live = false;