@ai-matrx/meet 0.10.7 → 0.11.1
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/CHANGELOG.md +6 -0
- package/dist/{collab-ytIzjceh.d.cts → collab-CIyXdQ5l.d.cts} +1 -2
- package/dist/{collab-ytIzjceh.d.ts → collab-CIyXdQ5l.d.ts} +1 -2
- package/dist/{components-CnnefQn-.d.cts → components-DUvy3BQf.d.cts} +1 -1
- package/dist/{components-DjzH3u_c.d.ts → components-DiGxfKXI.d.ts} +1 -1
- package/dist/core.cjs +417 -100
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +254 -24
- package/dist/core.d.ts +254 -24
- package/dist/core.js +417 -100
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +417 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +417 -100
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +710 -118
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +68 -7
- package/dist/react.d.ts +68 -7
- package/dist/react.js +711 -119
- package/dist/react.js.map +1 -1
- package/dist/skins/meet.cjs +265 -50
- package/dist/skins/meet.cjs.map +1 -1
- package/dist/skins/meet.d.cts +2 -2
- package/dist/skins/meet.d.ts +2 -2
- package/dist/skins/meet.js +265 -50
- package/dist/skins/meet.js.map +1 -1
- package/dist/styles.css +20 -0
- package/package.json +6 -6
package/dist/skins/meet.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AiPanel, a as AttendanceNotice, b as Avatar, C as Captions, c as ChatPanel, d as ConnectionDot, e as ConsentNotice, f as ControlBar, g as ControlButton, H as HostMenu, L as LobbyPanel, M as MeetSkinRoom, h as MeetingOverlays, i as MenuItem, P as PanelShell, j as ParticipantTile, k as PeoplePanel, l as PersonMenu, m as Popover, n as PreJoin, Q as QualityBars, R as ReactionOverlay, o as RecordingIndicator, S as SettingsPanel, p as ShortcutsSheet, q as Stage, T as Toast } from '../components-
|
|
1
|
+
export { A as AiPanel, a as AttendanceNotice, b as Avatar, C as Captions, c as ChatPanel, d as ConnectionDot, e as ConsentNotice, f as ControlBar, g as ControlButton, H as HostMenu, L as LobbyPanel, M as MeetSkinRoom, h as MeetingOverlays, i as MenuItem, P as PanelShell, j as ParticipantTile, k as PeoplePanel, l as PersonMenu, m as Popover, n as PreJoin, Q as QualityBars, R as ReactionOverlay, o as RecordingIndicator, S as SettingsPanel, p as ShortcutsSheet, q as Stage, T as Toast } from '../components-DUvy3BQf.cjs';
|
|
2
2
|
import { ReactNode, SVGProps } from 'react';
|
|
3
|
-
import { C as CollabPanel } from '../collab-
|
|
3
|
+
import { C as CollabPanel } from '../collab-CIyXdQ5l.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* POLLS, Q&A, THE SHARED WHITEBOARD AND BREAKOUT ROOMS — the in-room surfaces (Meet wave 5).
|
package/dist/skins/meet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AiPanel, a as AttendanceNotice, b as Avatar, C as Captions, c as ChatPanel, d as ConnectionDot, e as ConsentNotice, f as ControlBar, g as ControlButton, H as HostMenu, L as LobbyPanel, M as MeetSkinRoom, h as MeetingOverlays, i as MenuItem, P as PanelShell, j as ParticipantTile, k as PeoplePanel, l as PersonMenu, m as Popover, n as PreJoin, Q as QualityBars, R as ReactionOverlay, o as RecordingIndicator, S as SettingsPanel, p as ShortcutsSheet, q as Stage, T as Toast } from '../components-
|
|
1
|
+
export { A as AiPanel, a as AttendanceNotice, b as Avatar, C as Captions, c as ChatPanel, d as ConnectionDot, e as ConsentNotice, f as ControlBar, g as ControlButton, H as HostMenu, L as LobbyPanel, M as MeetSkinRoom, h as MeetingOverlays, i as MenuItem, P as PanelShell, j as ParticipantTile, k as PeoplePanel, l as PersonMenu, m as Popover, n as PreJoin, Q as QualityBars, R as ReactionOverlay, o as RecordingIndicator, S as SettingsPanel, p as ShortcutsSheet, q as Stage, T as Toast } from '../components-DiGxfKXI.js';
|
|
2
2
|
import { ReactNode, SVGProps } from 'react';
|
|
3
|
-
import { C as CollabPanel } from '../collab-
|
|
3
|
+
import { C as CollabPanel } from '../collab-CIyXdQ5l.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* POLLS, Q&A, THE SHARED WHITEBOARD AND BREAKOUT ROOMS — the in-room surfaces (Meet wave 5).
|
package/dist/skins/meet.js
CHANGED
|
@@ -7,9 +7,6 @@ import { useEffect as useEffect6, useLayoutEffect, useRef as useRef6, useState a
|
|
|
7
7
|
// src/react/facade.ts
|
|
8
8
|
import { useMemo as useMemo5 } from "react";
|
|
9
9
|
|
|
10
|
-
// src/react/root.tsx
|
|
11
|
-
import { useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
12
|
-
|
|
13
10
|
// src/core/names.ts
|
|
14
11
|
function isGuestIdentity(identity) {
|
|
15
12
|
return String(identity).startsWith("guest:");
|
|
@@ -259,6 +256,27 @@ function isObserverRole(role) {
|
|
|
259
256
|
return role === "viewer";
|
|
260
257
|
}
|
|
261
258
|
|
|
259
|
+
// src/core/phase.ts
|
|
260
|
+
var LIVE_PHASES = /* @__PURE__ */ new Set(["joining", "in_call"]);
|
|
261
|
+
var WAITING_PHASES = /* @__PURE__ */ new Set([
|
|
262
|
+
"waiting:host_not_started",
|
|
263
|
+
"waiting:knocking",
|
|
264
|
+
"denied",
|
|
265
|
+
"knock_expired"
|
|
266
|
+
]);
|
|
267
|
+
function isLivePhase(phase) {
|
|
268
|
+
return LIVE_PHASES.has(phase);
|
|
269
|
+
}
|
|
270
|
+
function isWaitingPhase(phase) {
|
|
271
|
+
return WAITING_PHASES.has(phase);
|
|
272
|
+
}
|
|
273
|
+
function isRefusedPhase(phase) {
|
|
274
|
+
return phase.startsWith("refused:");
|
|
275
|
+
}
|
|
276
|
+
function reasonOf(phase) {
|
|
277
|
+
return isRefusedPhase(phase) ? phase.slice("refused:".length) : null;
|
|
278
|
+
}
|
|
279
|
+
|
|
262
280
|
// src/core/app-panel.ts
|
|
263
281
|
function appPanelOf(meeting) {
|
|
264
282
|
const raw = meeting?.metadata?.["app_panel"];
|
|
@@ -339,6 +357,7 @@ var DEFAULT_EFFECTS = {
|
|
|
339
357
|
background: "none",
|
|
340
358
|
backgroundImage: null
|
|
341
359
|
};
|
|
360
|
+
var NO_SHARE = { state: "none", reason: null, remedy: null, at: 0 };
|
|
342
361
|
function effectiveRole(snapshot) {
|
|
343
362
|
const me = snapshot.participants.find(
|
|
344
363
|
(participant) => participant.identity === snapshot.localIdentity
|
|
@@ -354,6 +373,9 @@ function effectiveStanding(snapshot) {
|
|
|
354
373
|
}
|
|
355
374
|
var REACTION_TTL_MS = 5e3;
|
|
356
375
|
|
|
376
|
+
// src/react/root.tsx
|
|
377
|
+
import { useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
378
|
+
|
|
357
379
|
// src/core/observation.ts
|
|
358
380
|
function observedRole(role, standing) {
|
|
359
381
|
if (role === "host" || role === "cohost") return role;
|
|
@@ -383,43 +405,12 @@ function endedRecord(snapshot, given) {
|
|
|
383
405
|
function observedPhase(input) {
|
|
384
406
|
const { snapshot } = input;
|
|
385
407
|
if (snapshot === null) return "resolving";
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const reason = raw === "failed" ? snapshot.failure?.reason ?? null : null;
|
|
390
|
-
if (reason !== null) return reason === "ended" ? "ended" : `refused:${reason}`;
|
|
391
|
-
switch (raw) {
|
|
392
|
-
case "idle":
|
|
393
|
-
case "failed":
|
|
394
|
-
case "left":
|
|
395
|
-
return "prejoin";
|
|
396
|
-
case "lobby":
|
|
397
|
-
return waitingPhase(snapshot);
|
|
398
|
-
case "requesting-token":
|
|
399
|
-
case "connecting":
|
|
400
|
-
return "joining";
|
|
401
|
-
case "connected":
|
|
402
|
-
case "reconnecting":
|
|
403
|
-
return "in_call";
|
|
404
|
-
}
|
|
408
|
+
const phase = snapshot.phase;
|
|
409
|
+
if (endedRecord(snapshot, input.meeting ?? null) && !isLivePhase(phase) && !isCallPhase(phase)) return "ended";
|
|
410
|
+
return phase;
|
|
405
411
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
case "waiting_host":
|
|
409
|
-
return "waiting:host_not_started";
|
|
410
|
-
case "denied":
|
|
411
|
-
return "denied";
|
|
412
|
-
case "expired":
|
|
413
|
-
return "knock_expired";
|
|
414
|
-
case "withdrawn":
|
|
415
|
-
return "left";
|
|
416
|
-
case "ended":
|
|
417
|
-
return "ended";
|
|
418
|
-
case "removed":
|
|
419
|
-
return "refused:removed";
|
|
420
|
-
default:
|
|
421
|
-
return "waiting:knocking";
|
|
422
|
-
}
|
|
412
|
+
function isCallPhase(phase) {
|
|
413
|
+
return phase.startsWith("ringing_") || phase.startsWith("call_") || phase === "answered_elsewhere";
|
|
423
414
|
}
|
|
424
415
|
var ADMITTER_ROLES = /* @__PURE__ */ new Set(["host", "cohost"]);
|
|
425
416
|
function observe(input) {
|
|
@@ -432,10 +423,10 @@ function observe(input) {
|
|
|
432
423
|
const deviceInPlay = phase === "joining" || inCall;
|
|
433
424
|
return {
|
|
434
425
|
phase,
|
|
435
|
-
reason: phase
|
|
426
|
+
reason: phase === "ended" ? snapshot?.reason ?? null : snapshot?.reason ?? reasonOf(phase),
|
|
436
427
|
role,
|
|
437
|
-
connection: snapshot?.
|
|
438
|
-
hostPresent: inCall && snapshot !== null ? snapshot.participants.some((p) => ADMITTER_ROLES.has(p.role)) : snapshot
|
|
428
|
+
connection: snapshot?.connection ?? "stable",
|
|
429
|
+
hostPresent: inCall && snapshot !== null ? snapshot.participants.some((p) => ADMITTER_ROLES.has(p.role)) : snapshot !== null && isWaitingPhase(snapshot.phase) ? snapshot.waiting?.admittersPresent ?? null : null,
|
|
439
430
|
lobbyCount: canAdmit && snapshot !== null ? snapshot.lobby.filter((entry) => entry.state === "knocking").length : 0,
|
|
440
431
|
recording: snapshot?.recording === "recording" || snapshot?.recording === "stopping",
|
|
441
432
|
audioBlocked: null,
|
|
@@ -962,7 +953,7 @@ function useRoom() {
|
|
|
962
953
|
(participant) => participant.identity === snapshot.localIdentity
|
|
963
954
|
) ?? null;
|
|
964
955
|
return {
|
|
965
|
-
phase: snapshot?.phase ?? "
|
|
956
|
+
phase: snapshot?.phase ?? "resolving",
|
|
966
957
|
participants: snapshot?.participants ?? [],
|
|
967
958
|
failure: snapshot?.failure ?? null,
|
|
968
959
|
local,
|
|
@@ -1561,6 +1552,36 @@ function useCollabPanelRequest(onRequest) {
|
|
|
1561
1552
|
var MEET_REACTIONS = ["\u{1F496}", "\u{1F44D}", "\u{1F389}", "\u{1F44F}", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F914}", "\u{1F44E}"];
|
|
1562
1553
|
|
|
1563
1554
|
// src/react/facade.ts
|
|
1555
|
+
var NO_ACTIONS = {
|
|
1556
|
+
join: async () => void 0,
|
|
1557
|
+
rejoin: async () => void 0,
|
|
1558
|
+
leave: async () => void 0,
|
|
1559
|
+
backToPrejoin: () => void 0,
|
|
1560
|
+
retry: () => void 0,
|
|
1561
|
+
resolved: () => void 0,
|
|
1562
|
+
dismissShareNotice: () => void 0,
|
|
1563
|
+
dismissCall: () => void 0
|
|
1564
|
+
};
|
|
1565
|
+
function actionsFor(host) {
|
|
1566
|
+
if (host === null) return NO_ACTIONS;
|
|
1567
|
+
const { engine, store } = host;
|
|
1568
|
+
return {
|
|
1569
|
+
join: (request) => engine.join(request),
|
|
1570
|
+
rejoin: () => engine.rejoin(),
|
|
1571
|
+
leave: () => engine.leave(),
|
|
1572
|
+
backToPrejoin: () => engine.backToPrejoin(),
|
|
1573
|
+
retry: () => {
|
|
1574
|
+
store.dispatch({ type: "retry", click: true });
|
|
1575
|
+
},
|
|
1576
|
+
resolved: () => {
|
|
1577
|
+
store.dispatch({ type: "resolved" });
|
|
1578
|
+
},
|
|
1579
|
+
dismissShareNotice: () => engine.dismissShareNotice(),
|
|
1580
|
+
dismissCall: () => {
|
|
1581
|
+
if (store.dispatch({ type: "reset" })) store.patch({ call: null });
|
|
1582
|
+
}
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1564
1585
|
function useMeetCore() {
|
|
1565
1586
|
const host = useMeetHost();
|
|
1566
1587
|
const snapshot = useMeetSnapshot();
|
|
@@ -1568,9 +1589,24 @@ function useMeetCore() {
|
|
|
1568
1589
|
const role = useRole();
|
|
1569
1590
|
const isHost = useIsHost();
|
|
1570
1591
|
const observation = useCoreObservation();
|
|
1592
|
+
const actions = useMemo5(() => actionsFor(host), [host]);
|
|
1571
1593
|
return useMemo5(
|
|
1572
|
-
() => ({
|
|
1573
|
-
|
|
1594
|
+
() => ({
|
|
1595
|
+
host,
|
|
1596
|
+
snapshot,
|
|
1597
|
+
devices,
|
|
1598
|
+
role,
|
|
1599
|
+
isHost,
|
|
1600
|
+
observation,
|
|
1601
|
+
phase: snapshot?.phase ?? "resolving",
|
|
1602
|
+
reason: snapshot?.reason ?? null,
|
|
1603
|
+
phaseNotice: snapshot?.phaseNotice ?? null,
|
|
1604
|
+
connection: snapshot?.connection ?? "stable",
|
|
1605
|
+
share: snapshot?.share ?? NO_SHARE,
|
|
1606
|
+
call: snapshot?.call ?? null,
|
|
1607
|
+
actions
|
|
1608
|
+
}),
|
|
1609
|
+
[host, snapshot, devices, role, isHost, observation, actions]
|
|
1574
1610
|
);
|
|
1575
1611
|
}
|
|
1576
1612
|
|
|
@@ -4517,11 +4553,52 @@ function MeetSkinRoom({
|
|
|
4517
4553
|
headerControls,
|
|
4518
4554
|
observe: observe2 = false
|
|
4519
4555
|
}) {
|
|
4520
|
-
const
|
|
4556
|
+
const core = useMeetCore();
|
|
4557
|
+
const { host, snapshot, isHost, phase } = core;
|
|
4521
4558
|
const elapsed = useElapsed(snapshot?.meeting?.startedAt ?? null);
|
|
4522
|
-
const phase = snapshot?.phase ?? "idle";
|
|
4523
4559
|
if (host === null) return null;
|
|
4524
|
-
|
|
4560
|
+
const screen = (() => {
|
|
4561
|
+
if (isRefusedPhase(phase)) return "refused";
|
|
4562
|
+
switch (phase) {
|
|
4563
|
+
case "resolving":
|
|
4564
|
+
return "resolving";
|
|
4565
|
+
case "prejoin":
|
|
4566
|
+
case "guest_name":
|
|
4567
|
+
return "prejoin";
|
|
4568
|
+
case "joining":
|
|
4569
|
+
case "in_call":
|
|
4570
|
+
return "room";
|
|
4571
|
+
case "waiting:host_not_started":
|
|
4572
|
+
case "waiting:knocking":
|
|
4573
|
+
case "denied":
|
|
4574
|
+
case "knock_expired":
|
|
4575
|
+
return "waiting";
|
|
4576
|
+
case "left":
|
|
4577
|
+
return snapshot?.waiting?.admission === "withdrawn" ? "waiting" : "exit";
|
|
4578
|
+
case "disconnected":
|
|
4579
|
+
case "removed":
|
|
4580
|
+
case "superseded":
|
|
4581
|
+
case "inactive":
|
|
4582
|
+
case "unsupported":
|
|
4583
|
+
case "ended":
|
|
4584
|
+
case "record":
|
|
4585
|
+
case "ringing_out":
|
|
4586
|
+
case "ringing_in":
|
|
4587
|
+
case "call_declined":
|
|
4588
|
+
case "call_missed":
|
|
4589
|
+
case "call_busy":
|
|
4590
|
+
case "answered_elsewhere":
|
|
4591
|
+
return "exit";
|
|
4592
|
+
default: {
|
|
4593
|
+
const unhandled = phase;
|
|
4594
|
+
return unhandled;
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
})();
|
|
4598
|
+
if (screen === "resolving") {
|
|
4599
|
+
return /* @__PURE__ */ jsx6("div", { className: "mx-meet", children: /* @__PURE__ */ jsx6("p", { className: "mx-meet__empty-body", role: "status", children: "Getting the meeting ready\u2026" }) });
|
|
4600
|
+
}
|
|
4601
|
+
if (screen === "prejoin") {
|
|
4525
4602
|
return /* @__PURE__ */ jsx6("div", { className: "mx-meet", children: /* @__PURE__ */ jsx6(
|
|
4526
4603
|
PreJoin,
|
|
4527
4604
|
{
|
|
@@ -4532,9 +4609,12 @@ function MeetSkinRoom({
|
|
|
4532
4609
|
}
|
|
4533
4610
|
) });
|
|
4534
4611
|
}
|
|
4535
|
-
if (
|
|
4612
|
+
if (screen === "waiting") {
|
|
4536
4613
|
return /* @__PURE__ */ jsx6("div", { className: "mx-meet mx-meet--lobby", children: /* @__PURE__ */ jsx6(WaitingRoom, { host, ...onLeave !== void 0 ? { onLeave } : {} }) });
|
|
4537
4614
|
}
|
|
4615
|
+
if (screen === "refused" || screen === "exit") {
|
|
4616
|
+
return /* @__PURE__ */ jsx6("div", { className: "mx-meet mx-meet--lobby", children: /* @__PURE__ */ jsx6(ExitScreen, { ...onLeave !== void 0 ? { onLeave } : {} }) });
|
|
4617
|
+
}
|
|
4538
4618
|
return /* @__PURE__ */ jsxs3("div", { className: "mx-meet", children: [
|
|
4539
4619
|
/* @__PURE__ */ jsx6(ConsentNotice, {}),
|
|
4540
4620
|
/* @__PURE__ */ jsx6(AttendanceNotice, {}),
|
|
@@ -4554,14 +4634,148 @@ function MeetSkinRoom({
|
|
|
4554
4634
|
headerControls !== void 0 && headerControls !== null ? /* @__PURE__ */ jsx6("span", { className: "mx-meet__header-controls", "data-meet-header-controls": "", children: headerControls }) : null,
|
|
4555
4635
|
isHost ? /* @__PURE__ */ jsx6(HostMenu, {}) : null
|
|
4556
4636
|
] }),
|
|
4557
|
-
|
|
4637
|
+
core.connection !== "stable" ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__banner", role: "status", children: "Reconnecting\u2026" }) : null,
|
|
4638
|
+
/* @__PURE__ */ jsx6(ShareNotice, {}),
|
|
4558
4639
|
/* @__PURE__ */ jsx6(Stage, {}),
|
|
4559
4640
|
/* @__PURE__ */ jsx6(Captions, {}),
|
|
4560
4641
|
/* @__PURE__ */ jsx6(ControlBar, { ...onLeave !== void 0 ? { onLeave } : {} })
|
|
4561
4642
|
] });
|
|
4562
4643
|
}
|
|
4644
|
+
function ShareNotice() {
|
|
4645
|
+
const { share, actions } = useMeetCore();
|
|
4646
|
+
if (share.state !== "refused") return null;
|
|
4647
|
+
const text = share.reason === "unsupported" ? "You can't share your screen from this browser" : share.reason === "blocked" ? "Screen sharing is blocked" : "Couldn't start sharing your screen";
|
|
4648
|
+
return /* @__PURE__ */ jsxs3("p", { className: "mx-meet__banner", role: "status", "data-meet-notice": "share-unavailable", children: [
|
|
4649
|
+
text,
|
|
4650
|
+
share.remedy !== null ? /* @__PURE__ */ jsx6("span", { className: "mx-meet__remedy", children: share.remedy }) : null,
|
|
4651
|
+
/* @__PURE__ */ jsx6("button", { type: "button", className: "mx-meet__link", onClick: actions.dismissShareNotice, children: "Dismiss" })
|
|
4652
|
+
] });
|
|
4653
|
+
}
|
|
4654
|
+
var REFUSED_TITLES = {
|
|
4655
|
+
not_found: "Check your meeting code",
|
|
4656
|
+
cancelled: "This meeting was cancelled",
|
|
4657
|
+
expired: "This meeting link has expired",
|
|
4658
|
+
too_early: "This meeting hasn't started yet",
|
|
4659
|
+
sign_in_required: "Sign in to join this meeting",
|
|
4660
|
+
wrong_account: "You're signed in with a different account",
|
|
4661
|
+
not_invited: "You aren't invited to this meeting",
|
|
4662
|
+
locked: "This meeting is locked",
|
|
4663
|
+
removed: "You can't rejoin this meeting",
|
|
4664
|
+
lobby_rejects: "You can't ask to join this meeting",
|
|
4665
|
+
meeting_full: "This meeting is full",
|
|
4666
|
+
platform_capacity: "Meetings are busy right now",
|
|
4667
|
+
verification_required: "Verify your account to join",
|
|
4668
|
+
registration_required: "Register to join this meeting"
|
|
4669
|
+
};
|
|
4670
|
+
function ExitScreen({ onLeave }) {
|
|
4671
|
+
const { phase, reason, host, snapshot, actions, call } = useMeetCore();
|
|
4672
|
+
const [busy, setBusy] = useState4(false);
|
|
4673
|
+
const failure = snapshot?.failure ?? null;
|
|
4674
|
+
const rejoin = /* @__PURE__ */ jsx6(
|
|
4675
|
+
Button,
|
|
4676
|
+
{
|
|
4677
|
+
type: "button",
|
|
4678
|
+
disabled: busy,
|
|
4679
|
+
onClick: () => {
|
|
4680
|
+
setBusy(true);
|
|
4681
|
+
void actions.rejoin().catch(() => void 0).finally(() => setBusy(false));
|
|
4682
|
+
},
|
|
4683
|
+
children: "Rejoin"
|
|
4684
|
+
}
|
|
4685
|
+
);
|
|
4686
|
+
const home = /* @__PURE__ */ jsx6(
|
|
4687
|
+
"a",
|
|
4688
|
+
{
|
|
4689
|
+
className: "mx-meet__link",
|
|
4690
|
+
href: "/",
|
|
4691
|
+
onClick: (event) => {
|
|
4692
|
+
if (call !== null) {
|
|
4693
|
+
event.preventDefault();
|
|
4694
|
+
actions.dismissCall();
|
|
4695
|
+
}
|
|
4696
|
+
if (onLeave !== void 0) {
|
|
4697
|
+
event.preventDefault();
|
|
4698
|
+
onLeave();
|
|
4699
|
+
}
|
|
4700
|
+
},
|
|
4701
|
+
children: "Go home"
|
|
4702
|
+
}
|
|
4703
|
+
);
|
|
4704
|
+
let title;
|
|
4705
|
+
let line = null;
|
|
4706
|
+
let notice = null;
|
|
4707
|
+
let actionsNode = home;
|
|
4708
|
+
if (phase.startsWith("refused:")) {
|
|
4709
|
+
const code = phase.slice("refused:".length);
|
|
4710
|
+
title = REFUSED_TITLES[code] ?? "You can't join this meeting";
|
|
4711
|
+
line = failure?.remedy ?? null;
|
|
4712
|
+
actionsNode = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4713
|
+
/* @__PURE__ */ jsx6(Button, { type: "button", variant: "outline", onClick: actions.retry, children: "Try again" }),
|
|
4714
|
+
home
|
|
4715
|
+
] });
|
|
4716
|
+
} else {
|
|
4717
|
+
switch (phase) {
|
|
4718
|
+
case "left":
|
|
4719
|
+
title = "You left the meeting";
|
|
4720
|
+
actionsNode = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4721
|
+
rejoin,
|
|
4722
|
+
home
|
|
4723
|
+
] });
|
|
4724
|
+
break;
|
|
4725
|
+
case "disconnected":
|
|
4726
|
+
title = "You lost your connection to the meeting";
|
|
4727
|
+
line = failure?.remedy ?? "Check your internet connection, then rejoin.";
|
|
4728
|
+
notice = "disconnected";
|
|
4729
|
+
actionsNode = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4730
|
+
rejoin,
|
|
4731
|
+
home
|
|
4732
|
+
] });
|
|
4733
|
+
break;
|
|
4734
|
+
case "removed":
|
|
4735
|
+
title = "You've been removed from the meeting";
|
|
4736
|
+
notice = "removed";
|
|
4737
|
+
break;
|
|
4738
|
+
case "superseded":
|
|
4739
|
+
title = "You joined from another tab or device";
|
|
4740
|
+
line = "This screen left the meeting so you aren't in it twice.";
|
|
4741
|
+
notice = "displaced";
|
|
4742
|
+
actionsNode = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4743
|
+
rejoin,
|
|
4744
|
+
home
|
|
4745
|
+
] });
|
|
4746
|
+
break;
|
|
4747
|
+
case "inactive":
|
|
4748
|
+
title = "You left the meeting because this tab was inactive";
|
|
4749
|
+
actionsNode = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4750
|
+
rejoin,
|
|
4751
|
+
home
|
|
4752
|
+
] });
|
|
4753
|
+
break;
|
|
4754
|
+
case "unsupported":
|
|
4755
|
+
title = "This browser can't join meetings";
|
|
4756
|
+
line = "Open the link in Chrome, Edge, Firefox or Safari.";
|
|
4757
|
+
break;
|
|
4758
|
+
case "ended":
|
|
4759
|
+
case "record":
|
|
4760
|
+
title = reason === "time_limit" ? "The meeting reached its time limit" : "The meeting has ended";
|
|
4761
|
+
notice = "meeting-ended";
|
|
4762
|
+
break;
|
|
4763
|
+
default:
|
|
4764
|
+
title = "The call has ended";
|
|
4765
|
+
break;
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
return /* @__PURE__ */ jsxs3("div", { className: "mx-meet__waiting", "data-meet-exit": phase, children: [
|
|
4769
|
+
/* @__PURE__ */ jsx6(Avatar, { name: host?.identity.displayName ?? "", url: host?.identity.avatarUrl ?? null, size: 72 }),
|
|
4770
|
+
/* @__PURE__ */ jsx6("h1", { className: "mx-meet__prejoin-title", children: title }),
|
|
4771
|
+
line !== null ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__empty-body", children: line }) : null,
|
|
4772
|
+
notice !== null ? /* @__PURE__ */ jsx6("span", { role: "status", "data-meet-notice": notice, className: "mx-meet__sr-only", children: title }) : null,
|
|
4773
|
+
/* @__PURE__ */ jsx6("div", { className: "mx-meet__waiting-actions", children: actionsNode })
|
|
4774
|
+
] });
|
|
4775
|
+
}
|
|
4563
4776
|
function WaitingRoom({ host, onLeave }) {
|
|
4564
4777
|
const { waiting, withdraw, askAgain } = useWaiting();
|
|
4778
|
+
const { phaseNotice } = useMeetCore();
|
|
4565
4779
|
const [busy, setBusy] = useState4(false);
|
|
4566
4780
|
const admission = waiting?.admission ?? "knocking";
|
|
4567
4781
|
const run = (action) => () => {
|
|
@@ -4610,6 +4824,7 @@ function WaitingRoom({ host, onLeave }) {
|
|
|
4610
4824
|
return /* @__PURE__ */ jsxs3("div", { className: "mx-meet__waiting", children: [
|
|
4611
4825
|
/* @__PURE__ */ jsx6(Avatar, { name: host.identity.displayName, url: host.identity.avatarUrl, size: 72 }),
|
|
4612
4826
|
/* @__PURE__ */ jsx6("h1", { className: "mx-meet__prejoin-title", children: title }),
|
|
4827
|
+
phaseNotice === "sent-to-waiting" ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__empty-body", role: "status", "data-meet-notice": "sent-to-waiting", children: "The host moved you back to the waiting room" }) : null,
|
|
4613
4828
|
line !== null ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__empty-body", role: "status", "data-meet-notice": "host-absent", children: line }) : null,
|
|
4614
4829
|
/* @__PURE__ */ jsx6("div", { className: "mx-meet__waiting-actions", children: actions })
|
|
4615
4830
|
] });
|