@ai-matrx/meet 0.11.34 → 0.11.36

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.d.cts CHANGED
@@ -2,7 +2,7 @@ import { ReactNode, ComponentType } from 'react';
2
2
  import { MessagingSupabaseClient } from '@ai-matrx/messaging';
3
3
  import { MeetStore, RoomEngine, CallCenter, MeetingSession, InRoomClient, RecordingController, DeviceManager, MeetRepository, TokenClient, MeetAi, RoomDriverFactory, DeviceSnapshot, MeetSnapshot, ObservedPhase, MeetObservation, GuestRecordAccessSetting, GuestRecordAccessResolution, ModerationRequest, ModerationResult, MediaEffects, NoteTakerStatus, MeetAnswerCoverage, MeetingRecordBundle, MeetPhase, JoinRequest, MeetingRecordCache, LocalMediaState, ModerationNotice, Stage, CollabRequest, ConnectionRegion, ShareRegion } from './core.cjs';
4
4
  export { ATTENDANCE_CSV_HEADER, AnnounceResult, ApplyRoomEventArgs, AskArgs, AttendanceKind, AttendanceRow, AudioProcessing, BrowserFamily, CALL_INVITE_KIND, CALL_INVITE_VERSION, CONSENT_NOTICE_ATTRIBUTE, CallCenterOptions, CallInviteHandlerOptions, CallInvitePayload, CallOutcomePhase, CollabAction, CollabResult, CollabRuntime, CollabStoreLike, ConnectionPolicy, ConnectionSupervisor, ConnectionSupervisorOptions, CreateCallInviteInput, CreateMeetingInput, DATA_TOPICS, DEFAULT_CONNECTION_POLICY, DEFAULT_EFFECTS, DEFAULT_PAGE_SIZE, DataTopic, DeviceKind, DeviceManagerOptions, DeviceNotice, DeviceOffer, DeviceStorage, DeviceUnavailableReason, DriverConnectionState, DriverParticipant, DriverTrackKind, DriverTranscription, END_MEETING_NOT_SERVED, EffectsStorage, EndMeetingResult, ExitInput, ExitPhase, ExitResolution, ExitServerWord, FollowUpDraft, FollowUpRecipient, FollowUpSendResult, GUEST_RECORD_ACCESS_CHOICES, GUEST_RECORD_ACCESS_LEVELS, GUEST_RECORD_ACCESS_METADATA_KEY, GUEST_RECORD_NOT_SHARED, Ghost, GuestRecordAccess, IDLE_MEDIA, IDLE_MEDIA_REGION, IDLE_PHASES, IDLE_TRACK, InRoomClientOptions, JOIN_REFUSAL_REASONS, JoinRefusalReason, LISTEN_ONLY_NOTICE, LIVEKIT_BASE_DELAYS_MS, LIVE_PHASES, LibraryRecording, LiveKitDriverOptions, LocalTrackState, MEETING_INVITE_KIND, MEETING_INVITE_VERSION, MEETING_PASS_HEADER, MEETING_RECORD_GRACE_MS, MEET_ANSWER_CONTEXT_EVENT, MEET_ANSWER_EVENTS, MEET_EVENTS, MEET_REACTIONS, MEET_ROUTES, MEET_SCHEMA, MODERATION_ACTIONS, MediaDevicesLike, MediaKind, MediaPlatform, MediaRegionState, MediaSupervisor, MediaSupervisorOptions, MediaUnavailable, MeetAiAnswer, MeetAiOptions, MeetDevice, MeetError, MeetErrorCode, MeetEvent, MeetGrants, MeetPatch, MeetRoomDriver, MeetingChatHistory, MeetingInviteHandlerOptions, MeetingInvitePayload, MeetingRecordAnswer, MeetingRecordChange, MeetingRecordFailure, MeetingRecordParts, MeetingRecordRestriction, MeetingRecordRestrictionNotice, MeetingRecordState, MeetingSearchHit, MeetingSearchSource, MeetingSessionOptions, ModerationAction, NOTE_TAKER_IDENTITY_PREFIX, NOTE_TAKER_METADATA_KEY, NO_GRANTS, NO_SHARE, NameBook, NetworkPort, NoteTakerDispatch, NoteTakerRefusal, ObserveInput, ObservedConnection, OsFamily, PARTICIPANT_CAN_RECORD_ATTRIBUTE, PARTICIPANT_ROLE_ATTRIBUTE, PARTICIPANT_STANDING_ATTRIBUTE, PermissionReading, PhaseEvent, PhaseEventType, PlatformDevice, REACTION_TTL_MS, REFUSED_ABSENCE, RESUME_WINDOW_MS, ROOM_EVENTS, ROOM_EVENT_PREFIX, RPCS, ReconnectPolicyLike, ReconnectPolicyOptions, RecordingControllerOptions, RepositoryOptions, ResumeMarker, ResumeStorage, RoomChatMessage, RoomDriverHandlers, RoomEngineOptions, RoomEventOutcome, RoomEventTopic, RoomReaction, RoomToken, RoomTokenStorage, ScheduleMeetingInput, StageArgs, TABLES, TRANSCRIPTION_ATTRIBUTES, TRANSCRIPTION_TOPIC, TokenClientOptions, TokenRequest, TranscriptBlock, TranscriptFormat, TranscriptMatch, VideoEffect, WAITING_PHASES, WrapUpStatus, absenceSentence, activeWrapUpSummary, activityAttention, admissionPhase, announceMeeting, applyRoomEvent, assembleMeetingRecord, attendanceCsv, attendanceReport, attendanceTotals, attendeeKey, autoRejoinDelayMs, availableActivities, callInviteAction, callInviteText, callStateLabel, canModerate, canModerateParticipant, canTransition, captionSegment, changesPatch, classifyDeviceFailure, clockPosition, computeStage, connectionPolicyFrom, countLabel, createCallCenter, createCallInviteHandler, createConnectionSupervisor, createDeviceManager, createInRoomClient, createLiveKitDriver, createMediaSupervisor, createMeetAi, createMeetRepository, createMeetStore, createMeetingInviteHandler, createMeetingRecordCache, createMeetingSession, createMemoryDeviceStorage, createReachabilityProbe, createReconnectPolicy, createRecordingController, createRoomEngine, createTokenClient, createWebDeviceStorage, createWebEffectsStorage, createWebNetworkPort, createWebResumeStorage, createWebRoomTokenStorage, detectBrowser, detectOs, deviceChipLabel, deviceFixSteps, deviceNoticeCode, deviceUnavailableReason, displayNameFor, gridColumns, groupTranscript, guestRecordAccessExplanation, guestRecordAccessLabel, guestRecordAccessSetting, hasEnded, hostUserIds, httpUrlOf, invalidResponse, isGuestIdentity, isJoinRefusalReason, isListenOnly, isLivePhase, isNoteTaker, isRealName, isRefusedPhase, isRoomEventTopic, isUnannouncedDeparture, isWaitingPhase, learnName, learnNames, listenOnlyNotice, loadFollowUpDraft, loadGuestMeetingRecord, loadMeetingChat, loadMeetingRecord, loadMeetingRecordParts, mapConnectionState, mapQuality, meetingInviteAction, meetingLength, meetingLink, meetingPassHeaders, meetingPath, meetingSlug, meetingTopic, meetingWhen, mergeCaption, mergeGhosts, mergeRecord, microphoneNoticeCode, moveToRoom, nextPhase, nextTranslationBatch, normalizeDeviceError, normalizeMeetError, normalizeSpoken, noteTakerIdentity, noteTakerLabel, noteTakerParticipant, noteTakerStatus, notesDocument, observeMeeting, observedDevice, observedPhase, observedQuality, orderParticipants, parseRoomToken, participantAttributes, participantSummary, performCollab, playableRecordingFileId, projectInvitee, projectLibraryRecording, projectNote, projectOccurrence, projectOverride, projectParticipant, projectRsvpInvitation, projectSearchHit, projectSegment, projectUpcoming, pushMeetingToGoogleCalendar, readServerRefusal, readableTranscript, reasonOf, recordingLabel, recordingNotice, recordingOffsetMs, refusalPhase, rememberedMeetingPass, resolveExit, roleOf, roomTopic, rootAttributes, searchTranscript, sendFollowUp, setCaptionLanguage, setGuestRecordAccess, settingsPatch, snapshotParticipant, snippetRuns, staticObservation, summarizeMeetingRecordRestrictions, takeMoveRequest, takePanelRequest, transcriptDocument, unavailableFrom, uniqueAttendees, untranslatedLines, userTopic, wasRefused, webMediaPlatform, wrapUpStatus } from './core.cjs';
5
- import { b as MeetApi, c as MeetIdentity, A as AccessTokenSource, d as CallInvite, U as UserId, e as ParticipantRole, M as MeetingRecord, P as ParticipantIdentity, T as TranscriptSource, f as CallMode, a as MeetParticipant, L as LobbyEntry, g as MeetingNote, W as WrapUpAnnouncement, S as StageLayout, h as MeetingId, O as OrganizationId, R as RoomName, i as MeetingAppPanel, j as CollabSnapshot, C as CollabPanel } from './collab-XY6Xj1dG.cjs';
5
+ import { b as MeetApi, c as MeetIdentity, A as AccessTokenSource, d as CallInvite, U as UserId, e as ParticipantRole, M as MeetingRecord, P as ParticipantIdentity, T as TranscriptSource, f as CallMode, a as MeetParticipant, L as LobbyEntry, g as MeetingNote, W as WrapUpAnnouncement, R as RoomName, S as StageLayout, h as MeetingId, O as OrganizationId, i as MeetingAppPanel, j as CollabSnapshot, C as CollabPanel } from './collab-XY6Xj1dG.cjs';
6
6
  export { k as AdmissionState, l as CAPTION_LANGUAGES, m as CallId, n as CallState, o as CallablePerson, p as ConnectionQuality, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, I as InviteeInput, q as InviteeRole, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, V as MeetingAttendee, X as MeetingChanges, Y as MeetingInvitee, Z as MeetingKind, _ as MeetingNoteKind, $ as MeetingOccurrence, a0 as MeetingSettings, a1 as NoteTakerState, a2 as ORGANIZATION_HEADER, a3 as ObserversVisibleTo, a4 as OccurrenceOverride, a5 as OccurrenceState, a6 as ParticipantStanding, a7 as ROLE_RANK, a8 as RecordingPolicy, a9 as RecordingRecord, aa as RecordingState, ab as RsvpAnswer, ac as RsvpInvitation, ad as RsvpState, ae as TranscriptSegment, af as UpcomingOccurrence, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-XY6Xj1dG.cjs';
7
7
  export { G as GuestRecordAccessControl } from './components-4f9Mf8fz.cjs';
8
8
  import '@ai-matrx/realtime';
@@ -191,6 +191,8 @@ interface UseRoomResult {
191
191
  readonly rule: string;
192
192
  } | null;
193
193
  join: (request: JoinRequest) => Promise<void>;
194
+ /** S7: offer Switch here / Join here too BEFORE Join when another tab of this browser has the person live. */
195
+ checkElsewhere: (roomName: RoomName) => Promise<boolean>;
194
196
  leave: () => Promise<void>;
195
197
  toggleMicrophone: () => Promise<void>;
196
198
  toggleCamera: () => Promise<void>;
package/dist/react.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ReactNode, ComponentType } from 'react';
2
2
  import { MessagingSupabaseClient } from '@ai-matrx/messaging';
3
3
  import { MeetStore, RoomEngine, CallCenter, MeetingSession, InRoomClient, RecordingController, DeviceManager, MeetRepository, TokenClient, MeetAi, RoomDriverFactory, DeviceSnapshot, MeetSnapshot, ObservedPhase, MeetObservation, GuestRecordAccessSetting, GuestRecordAccessResolution, ModerationRequest, ModerationResult, MediaEffects, NoteTakerStatus, MeetAnswerCoverage, MeetingRecordBundle, MeetPhase, JoinRequest, MeetingRecordCache, LocalMediaState, ModerationNotice, Stage, CollabRequest, ConnectionRegion, ShareRegion } from './core.js';
4
4
  export { ATTENDANCE_CSV_HEADER, AnnounceResult, ApplyRoomEventArgs, AskArgs, AttendanceKind, AttendanceRow, AudioProcessing, BrowserFamily, CALL_INVITE_KIND, CALL_INVITE_VERSION, CONSENT_NOTICE_ATTRIBUTE, CallCenterOptions, CallInviteHandlerOptions, CallInvitePayload, CallOutcomePhase, CollabAction, CollabResult, CollabRuntime, CollabStoreLike, ConnectionPolicy, ConnectionSupervisor, ConnectionSupervisorOptions, CreateCallInviteInput, CreateMeetingInput, DATA_TOPICS, DEFAULT_CONNECTION_POLICY, DEFAULT_EFFECTS, DEFAULT_PAGE_SIZE, DataTopic, DeviceKind, DeviceManagerOptions, DeviceNotice, DeviceOffer, DeviceStorage, DeviceUnavailableReason, DriverConnectionState, DriverParticipant, DriverTrackKind, DriverTranscription, END_MEETING_NOT_SERVED, EffectsStorage, EndMeetingResult, ExitInput, ExitPhase, ExitResolution, ExitServerWord, FollowUpDraft, FollowUpRecipient, FollowUpSendResult, GUEST_RECORD_ACCESS_CHOICES, GUEST_RECORD_ACCESS_LEVELS, GUEST_RECORD_ACCESS_METADATA_KEY, GUEST_RECORD_NOT_SHARED, Ghost, GuestRecordAccess, IDLE_MEDIA, IDLE_MEDIA_REGION, IDLE_PHASES, IDLE_TRACK, InRoomClientOptions, JOIN_REFUSAL_REASONS, JoinRefusalReason, LISTEN_ONLY_NOTICE, LIVEKIT_BASE_DELAYS_MS, LIVE_PHASES, LibraryRecording, LiveKitDriverOptions, LocalTrackState, MEETING_INVITE_KIND, MEETING_INVITE_VERSION, MEETING_PASS_HEADER, MEETING_RECORD_GRACE_MS, MEET_ANSWER_CONTEXT_EVENT, MEET_ANSWER_EVENTS, MEET_EVENTS, MEET_REACTIONS, MEET_ROUTES, MEET_SCHEMA, MODERATION_ACTIONS, MediaDevicesLike, MediaKind, MediaPlatform, MediaRegionState, MediaSupervisor, MediaSupervisorOptions, MediaUnavailable, MeetAiAnswer, MeetAiOptions, MeetDevice, MeetError, MeetErrorCode, MeetEvent, MeetGrants, MeetPatch, MeetRoomDriver, MeetingChatHistory, MeetingInviteHandlerOptions, MeetingInvitePayload, MeetingRecordAnswer, MeetingRecordChange, MeetingRecordFailure, MeetingRecordParts, MeetingRecordRestriction, MeetingRecordRestrictionNotice, MeetingRecordState, MeetingSearchHit, MeetingSearchSource, MeetingSessionOptions, ModerationAction, NOTE_TAKER_IDENTITY_PREFIX, NOTE_TAKER_METADATA_KEY, NO_GRANTS, NO_SHARE, NameBook, NetworkPort, NoteTakerDispatch, NoteTakerRefusal, ObserveInput, ObservedConnection, OsFamily, PARTICIPANT_CAN_RECORD_ATTRIBUTE, PARTICIPANT_ROLE_ATTRIBUTE, PARTICIPANT_STANDING_ATTRIBUTE, PermissionReading, PhaseEvent, PhaseEventType, PlatformDevice, REACTION_TTL_MS, REFUSED_ABSENCE, RESUME_WINDOW_MS, ROOM_EVENTS, ROOM_EVENT_PREFIX, RPCS, ReconnectPolicyLike, ReconnectPolicyOptions, RecordingControllerOptions, RepositoryOptions, ResumeMarker, ResumeStorage, RoomChatMessage, RoomDriverHandlers, RoomEngineOptions, RoomEventOutcome, RoomEventTopic, RoomReaction, RoomToken, RoomTokenStorage, ScheduleMeetingInput, StageArgs, TABLES, TRANSCRIPTION_ATTRIBUTES, TRANSCRIPTION_TOPIC, TokenClientOptions, TokenRequest, TranscriptBlock, TranscriptFormat, TranscriptMatch, VideoEffect, WAITING_PHASES, WrapUpStatus, absenceSentence, activeWrapUpSummary, activityAttention, admissionPhase, announceMeeting, applyRoomEvent, assembleMeetingRecord, attendanceCsv, attendanceReport, attendanceTotals, attendeeKey, autoRejoinDelayMs, availableActivities, callInviteAction, callInviteText, callStateLabel, canModerate, canModerateParticipant, canTransition, captionSegment, changesPatch, classifyDeviceFailure, clockPosition, computeStage, connectionPolicyFrom, countLabel, createCallCenter, createCallInviteHandler, createConnectionSupervisor, createDeviceManager, createInRoomClient, createLiveKitDriver, createMediaSupervisor, createMeetAi, createMeetRepository, createMeetStore, createMeetingInviteHandler, createMeetingRecordCache, createMeetingSession, createMemoryDeviceStorage, createReachabilityProbe, createReconnectPolicy, createRecordingController, createRoomEngine, createTokenClient, createWebDeviceStorage, createWebEffectsStorage, createWebNetworkPort, createWebResumeStorage, createWebRoomTokenStorage, detectBrowser, detectOs, deviceChipLabel, deviceFixSteps, deviceNoticeCode, deviceUnavailableReason, displayNameFor, gridColumns, groupTranscript, guestRecordAccessExplanation, guestRecordAccessLabel, guestRecordAccessSetting, hasEnded, hostUserIds, httpUrlOf, invalidResponse, isGuestIdentity, isJoinRefusalReason, isListenOnly, isLivePhase, isNoteTaker, isRealName, isRefusedPhase, isRoomEventTopic, isUnannouncedDeparture, isWaitingPhase, learnName, learnNames, listenOnlyNotice, loadFollowUpDraft, loadGuestMeetingRecord, loadMeetingChat, loadMeetingRecord, loadMeetingRecordParts, mapConnectionState, mapQuality, meetingInviteAction, meetingLength, meetingLink, meetingPassHeaders, meetingPath, meetingSlug, meetingTopic, meetingWhen, mergeCaption, mergeGhosts, mergeRecord, microphoneNoticeCode, moveToRoom, nextPhase, nextTranslationBatch, normalizeDeviceError, normalizeMeetError, normalizeSpoken, noteTakerIdentity, noteTakerLabel, noteTakerParticipant, noteTakerStatus, notesDocument, observeMeeting, observedDevice, observedPhase, observedQuality, orderParticipants, parseRoomToken, participantAttributes, participantSummary, performCollab, playableRecordingFileId, projectInvitee, projectLibraryRecording, projectNote, projectOccurrence, projectOverride, projectParticipant, projectRsvpInvitation, projectSearchHit, projectSegment, projectUpcoming, pushMeetingToGoogleCalendar, readServerRefusal, readableTranscript, reasonOf, recordingLabel, recordingNotice, recordingOffsetMs, refusalPhase, rememberedMeetingPass, resolveExit, roleOf, roomTopic, rootAttributes, searchTranscript, sendFollowUp, setCaptionLanguage, setGuestRecordAccess, settingsPatch, snapshotParticipant, snippetRuns, staticObservation, summarizeMeetingRecordRestrictions, takeMoveRequest, takePanelRequest, transcriptDocument, unavailableFrom, uniqueAttendees, untranslatedLines, userTopic, wasRefused, webMediaPlatform, wrapUpStatus } from './core.js';
5
- import { b as MeetApi, c as MeetIdentity, A as AccessTokenSource, d as CallInvite, U as UserId, e as ParticipantRole, M as MeetingRecord, P as ParticipantIdentity, T as TranscriptSource, f as CallMode, a as MeetParticipant, L as LobbyEntry, g as MeetingNote, W as WrapUpAnnouncement, S as StageLayout, h as MeetingId, O as OrganizationId, R as RoomName, i as MeetingAppPanel, j as CollabSnapshot, C as CollabPanel } from './collab-XY6Xj1dG.js';
5
+ import { b as MeetApi, c as MeetIdentity, A as AccessTokenSource, d as CallInvite, U as UserId, e as ParticipantRole, M as MeetingRecord, P as ParticipantIdentity, T as TranscriptSource, f as CallMode, a as MeetParticipant, L as LobbyEntry, g as MeetingNote, W as WrapUpAnnouncement, R as RoomName, S as StageLayout, h as MeetingId, O as OrganizationId, i as MeetingAppPanel, j as CollabSnapshot, C as CollabPanel } from './collab-XY6Xj1dG.js';
6
6
  export { k as AdmissionState, l as CAPTION_LANGUAGES, m as CallId, n as CallState, o as CallablePerson, p as ConnectionQuality, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, I as InviteeInput, q as InviteeRole, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, V as MeetingAttendee, X as MeetingChanges, Y as MeetingInvitee, Z as MeetingKind, _ as MeetingNoteKind, $ as MeetingOccurrence, a0 as MeetingSettings, a1 as NoteTakerState, a2 as ORGANIZATION_HEADER, a3 as ObserversVisibleTo, a4 as OccurrenceOverride, a5 as OccurrenceState, a6 as ParticipantStanding, a7 as ROLE_RANK, a8 as RecordingPolicy, a9 as RecordingRecord, aa as RecordingState, ab as RsvpAnswer, ac as RsvpInvitation, ad as RsvpState, ae as TranscriptSegment, af as UpcomingOccurrence, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-XY6Xj1dG.js';
7
7
  export { G as GuestRecordAccessControl } from './components-Cwep2NYU.js';
8
8
  import '@ai-matrx/realtime';
@@ -191,6 +191,8 @@ interface UseRoomResult {
191
191
  readonly rule: string;
192
192
  } | null;
193
193
  join: (request: JoinRequest) => Promise<void>;
194
+ /** S7: offer Switch here / Join here too BEFORE Join when another tab of this browser has the person live. */
195
+ checkElsewhere: (roomName: RoomName) => Promise<boolean>;
194
196
  leave: () => Promise<void>;
195
197
  toggleMicrophone: () => Promise<void>;
196
198
  toggleCamera: () => Promise<void>;
package/dist/react.js CHANGED
@@ -5797,6 +5797,7 @@ function createRoomEngine(options) {
5797
5797
  return;
5798
5798
  }
5799
5799
  driver = created;
5800
+ if (token.connectionKind === "companion") created.setRemoteAudioPlayback?.(false);
5800
5801
  await created.connect(token.serverUrl, token.token);
5801
5802
  store.patch({ failure: null, connection: "stable" });
5802
5803
  store.dispatch({ type: "connected" });
@@ -6058,6 +6059,19 @@ function createRoomEngine(options) {
6058
6059
  }
6059
6060
  },
6060
6061
  leave: leaveRoom,
6062
+ async checkElsewhere(roomName) {
6063
+ const claim = options.tabClaim;
6064
+ const userId = identity.userId;
6065
+ if (claim === void 0 || userId === null) return false;
6066
+ const before = store.snapshot();
6067
+ if (before.phase !== "prejoin" || before.secondDevice !== null) return false;
6068
+ if (!await claim.presentElsewhere(String(roomName), `user:${String(userId)}`)) return false;
6069
+ const now2 = store.snapshot();
6070
+ if (now2.phase !== "prejoin" || now2.secondDevice !== null) return false;
6071
+ store.patch({ secondDevice: { rule: "ask_switch_or_join" } });
6072
+ report("info", "meet: this browser already has you in this meeting \u2014 offering the choice before Join");
6073
+ return true;
6074
+ },
6061
6075
  backToPrejoin() {
6062
6076
  store.dispatch({ type: "back_to_prejoin", click: true });
6063
6077
  },
@@ -6607,6 +6621,7 @@ function createLiveKitDriver(handlers, options = {}) {
6607
6621
  projectRoster = roster;
6608
6622
  created.on(RoomEvent.TrackSubscribed, (track) => {
6609
6623
  if (track.kind !== Track.Kind.Audio || typeof document === "undefined") return;
6624
+ if (!remoteAudioPlayback) return;
6610
6625
  const element = track.attach();
6611
6626
  element.setAttribute("data-mx-meet-audio", "");
6612
6627
  audioSink().appendChild(element);
@@ -6691,6 +6706,7 @@ function createLiveKitDriver(handlers, options = {}) {
6691
6706
  let sources = null;
6692
6707
  let trackEvents = null;
6693
6708
  let audioContainer = null;
6709
+ let remoteAudioPlayback = true;
6694
6710
  function audioSink() {
6695
6711
  if (audioContainer !== null && audioContainer.isConnected) return audioContainer;
6696
6712
  const container = document.createElement("div");
@@ -6849,6 +6865,14 @@ function createLiveKitDriver(handlers, options = {}) {
6849
6865
  throw normalizeDeviceError(error, "meet.switchDevice");
6850
6866
  }
6851
6867
  },
6868
+ setRemoteAudioPlayback(enabled) {
6869
+ remoteAudioPlayback = enabled;
6870
+ if (enabled || audioContainer === null) return;
6871
+ for (const element of Array.from(audioContainer.querySelectorAll("[data-mx-meet-audio]"))) {
6872
+ if (element instanceof HTMLMediaElement) element.srcObject = null;
6873
+ element.remove();
6874
+ }
6875
+ },
6852
6876
  async startAudio() {
6853
6877
  const target = room;
6854
6878
  if (target === null) return;
@@ -8120,6 +8144,10 @@ function useRoom() {
8120
8144
  async (request) => requireEngine(engine, "join").join(request),
8121
8145
  [engine]
8122
8146
  ),
8147
+ checkElsewhere: useCallback2(
8148
+ async (roomName) => engine === null ? false : engine.checkElsewhere(roomName),
8149
+ [engine]
8150
+ ),
8123
8151
  leave: useCallback2(async () => requireEngine(engine, "leave").leave(), [engine]),
8124
8152
  toggleMicrophone: useCallback2(
8125
8153
  async () => requireEngine(engine, "toggleMicrophone").setMicrophoneEnabled(
@@ -12531,6 +12559,10 @@ function PreJoinBody({
12531
12559
  useEffect6(() => {
12532
12560
  void host.devices.refresh();
12533
12561
  }, [host]);
12562
+ const { checkElsewhere } = room;
12563
+ useEffect6(() => {
12564
+ void checkElsewhere(roomName);
12565
+ }, [checkElsewhere, roomName]);
12534
12566
  const joinWith = (secondDevice) => {
12535
12567
  setJoining(true);
12536
12568
  preview.release();