@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.js CHANGED
@@ -1553,6 +1553,7 @@ var EMPTY = {
1553
1553
  recordingId: null,
1554
1554
  chat: [],
1555
1555
  chatLoaded: false,
1556
+ chatHistoryError: null,
1556
1557
  reactions: [],
1557
1558
  spotlight: null,
1558
1559
  moderationNotice: null,
@@ -1662,7 +1663,7 @@ function createMeetStore(initial = {}) {
1662
1663
  state.names,
1663
1664
  messages.map((message) => ({ identity: message.identity, displayName: message.displayName }))
1664
1665
  );
1665
- commit({ ...state, chat: merged.slice(-CHAT_LIMIT), chatLoaded: true, names });
1666
+ commit({ ...state, chat: merged.slice(-CHAT_LIMIT), chatLoaded: true, chatHistoryError: null, names });
1666
1667
  },
1667
1668
  settleChat(localId, next) {
1668
1669
  const index = state.chat.findIndex((message) => message.id === localId);
@@ -4558,6 +4559,10 @@ function MeetRuntime(props) {
4558
4559
  chatReadFor = snapshot.meeting.id;
4559
4560
  void inRoom.loadChat().catch((error) => {
4560
4561
  const normalized = error;
4562
+ store.patch({
4563
+ chatLoaded: true,
4564
+ chatHistoryError: normalized.remedy ?? "Messages sent before you joined could not be read. New messages still arrive."
4565
+ });
4561
4566
  report({
4562
4567
  level: "warn",
4563
4568
  message: normalized.message ?? "meet: the saved chat could not be read",
@@ -6749,7 +6754,8 @@ function ChatPanel({
6749
6754
  };
6750
6755
  return /* @__PURE__ */ jsxs2(PanelShell, { title: "Chat", onClose, children: [
6751
6756
  /* @__PURE__ */ jsxs2("ul", { className: "mx-meet__chat", ref: listRef, children: [
6752
- snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ jsx3("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 ? /* @__PURE__ */ jsx3("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,
6757
+ snapshot?.chatHistoryError != null ? /* @__PURE__ */ jsx3("li", { className: "mx-meet__panel-note", children: snapshot.chatHistoryError }) : null,
6758
+ snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ jsx3("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 && snapshot?.chatHistoryError == null ? /* @__PURE__ */ jsx3("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,
6753
6759
  messages.map((message) => /* @__PURE__ */ jsx3(ChatLine, { message, local, people }, message.id))
6754
6760
  ] }),
6755
6761
  /* @__PURE__ */ jsxs2(
@@ -7215,7 +7221,7 @@ function EffectsSettings({ preview }) {
7215
7221
  const effects = useMediaEffects();
7216
7222
  const [error, setError] = useState3(null);
7217
7223
  const fileRef = useRef3(null);
7218
- const supported = effects.backgroundsSupported || preview != null;
7224
+ const supported = effects.backgroundsSupported || preview != null || videoEffectsSupported();
7219
7225
  const apply = (next) => {
7220
7226
  setError(null);
7221
7227
  void effects.set(next);
@@ -7610,7 +7616,7 @@ function PreJoinBody({
7610
7616
  }
7611
7617
  ) : /* @__PURE__ */ jsx3("div", { className: "mx-meet__tile-placeholder", children: /* @__PURE__ */ jsx3(Avatar, { name: host.identity.displayName, url: host.identity.avatarUrl, size: 96 }) }),
7612
7618
  mode === "video" && preview.error !== null ? /* @__PURE__ */ jsx3("p", { className: "mx-meet__preview-note", children: preview.error }) : null,
7613
- microphone ? /* @__PURE__ */ jsx3("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__ */ jsx3("span", { style: { width: `${Math.min(100, Math.round(level * 160))}%` } }) }) : null
7619
+ microphone && micStream !== null ? /* @__PURE__ */ jsx3("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__ */ jsx3("span", { style: { width: `${Math.min(100, Math.round(level * 160))}%` } }) }) : null
7614
7620
  ] }),
7615
7621
  /* @__PURE__ */ jsxs2("div", { className: "mx-meet__prejoin-panel", children: [
7616
7622
  /* @__PURE__ */ jsx3("h1", { className: "mx-meet__prejoin-title", children: "Ready to join?" }),
@@ -7726,7 +7732,9 @@ function useCameraPreview(deviceId2, effects) {
7726
7732
  }).catch((thrown) => {
7727
7733
  if (!live) return;
7728
7734
  const failure = thrown;
7729
- setError([failure.message, failure.remedy].filter(Boolean).join(". ") || "The camera did not start.");
7735
+ const message = (failure.message ?? "").replace(/^meet\.[A-Za-z.()]+:\s*/, "");
7736
+ const sentence = message.length > 0 ? message.charAt(0).toUpperCase() + message.slice(1) : "";
7737
+ setError([sentence, failure.remedy].filter(Boolean).join(". ") || "The camera did not start.");
7730
7738
  });
7731
7739
  return () => {
7732
7740
  live = false;