@arbidocs/react 0.5.184 → 0.5.186
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/calls/actions.js +9 -1
- package/dist/calls/actions.js.map +2 -2
- package/dist/calls/livekit/call-media-player.js +88 -20
- package/dist/calls/livekit/call-media-player.js.map +2 -2
- package/dist/calls/livekit/call-timing.js +13 -0
- package/dist/calls/livekit/call-timing.js.map +2 -2
- package/dist/calls/livekit/index.cjs +202 -66
- package/dist/calls/livekit/index.cjs.map +1 -1
- package/dist/calls/livekit/index.d.ts +11 -4
- package/dist/calls/livekit/useCallMedia.js +66 -8
- package/dist/calls/livekit/useCallMedia.js.map +2 -2
- package/dist/{chunk-KQY2LP76.cjs → chunk-TKPBJCWQ.cjs} +10 -2
- package/dist/chunk-TKPBJCWQ.cjs.map +1 -0
- package/dist/index.cjs +342 -338
- package/dist/index.d.ts +7 -1
- package/package.json +3 -3
- package/dist/chunk-KQY2LP76.cjs.map +0 -1
|
@@ -309,7 +309,8 @@ interface CallMediaEnvelope {
|
|
|
309
309
|
participant: string;
|
|
310
310
|
utterance_id: string;
|
|
311
311
|
sequence: number;
|
|
312
|
-
type: 'start' | 'media' | 'end' | 'stop' | 'fallback';
|
|
312
|
+
type: 'start' | 'media' | 'audio' | 'animation' | 'video-stop' | 'end' | 'stop' | 'fallback';
|
|
313
|
+
independent?: boolean;
|
|
313
314
|
avatar?: string;
|
|
314
315
|
sample_rate?: number;
|
|
315
316
|
fps?: number;
|
|
@@ -323,9 +324,14 @@ declare class CallMediaPlayer {
|
|
|
323
324
|
private changed;
|
|
324
325
|
private measured;
|
|
325
326
|
private streaming;
|
|
327
|
+
private independent;
|
|
328
|
+
private motionRequested;
|
|
329
|
+
private motionCurrent;
|
|
330
|
+
private motionLag;
|
|
331
|
+
private motion;
|
|
326
332
|
private audible;
|
|
327
333
|
get active(): boolean;
|
|
328
|
-
/** Retain
|
|
334
|
+
/** Retain ownership between utterances; only explicit fallback may unmute RTC. */
|
|
329
335
|
suppressesTrack: boolean;
|
|
330
336
|
avatar: string;
|
|
331
337
|
names: string[];
|
|
@@ -352,9 +358,10 @@ declare class CallMediaPlayer {
|
|
|
352
358
|
private measure;
|
|
353
359
|
private outputTime;
|
|
354
360
|
private setAudible;
|
|
355
|
-
|
|
361
|
+
setMotionEnabled(enabled: boolean): void;
|
|
362
|
+
reset(releaseTrack?: boolean, preserveAudio?: boolean): void;
|
|
356
363
|
}
|
|
357
364
|
|
|
358
|
-
declare function useCallMedia(enabled: boolean, key: Uint8Array | null): ReadonlyMap<string, CallMediaPlayer>;
|
|
365
|
+
declare function useCallMedia(enabled: boolean, key: Uint8Array | null, animationEnabled?: boolean): ReadonlyMap<string, CallMediaPlayer>;
|
|
359
366
|
|
|
360
367
|
export { CALL_TIMING_PROTOCOL, CallMediaPlayer, type CallRecordingControl, type CallRoomState, type CallTimingMeasurement, type CallTranscription, DEMOTE_REJOIN_FALLBACK_MS, FINAL_SEGMENT_GRACE_MS, type InCallChatState, type PendingRecordingStart, type WebinarAttendeeRow, type WebinarControl, type WebinarHandRow, captureAllowed, createE2EEWorker, mayStillSend, storedSpeakerName, useCallMedia, useCallRecorder, useCallRoom, useCallTranscriber, useHostMuteNotice, useInCallChat, useMuteRequests, useTrackUploader, useWebinar };
|
|
@@ -1,37 +1,65 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { useRoomContext } from "@livekit/components-react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ConnectionState,
|
|
5
|
+
RoomEvent
|
|
6
|
+
} from "livekit-client";
|
|
4
7
|
import { CALL_MEDIA_PROTOCOL, decryptCallMedia } from "@arbidocs/client";
|
|
5
8
|
import { CallMediaPlayer, checkedCallMedia } from "./call-media-player.js";
|
|
6
9
|
import { CALL_TIMING_PROTOCOL, checkedCallTimings } from "./call-timing.js";
|
|
7
|
-
function useCallMedia(enabled, key) {
|
|
10
|
+
function useCallMedia(enabled, key, animationEnabled = true) {
|
|
8
11
|
const room = useRoomContext();
|
|
12
|
+
const animation = useRef(animationEnabled);
|
|
13
|
+
animation.current = animationEnabled;
|
|
14
|
+
const nativeAudio = useRef(null);
|
|
15
|
+
const advertiseRef = useRef(() => {
|
|
16
|
+
});
|
|
9
17
|
const [players, setPlayers] = useState(/* @__PURE__ */ new Map());
|
|
10
18
|
useEffect(() => {
|
|
11
19
|
if (!enabled || !key || typeof AudioContext === "undefined") return;
|
|
20
|
+
nativeAudio.current = null;
|
|
12
21
|
const context = new AudioContext();
|
|
13
22
|
const live = /* @__PURE__ */ new Map();
|
|
14
23
|
const chains = /* @__PURE__ */ new Map();
|
|
24
|
+
const failed = /* @__PURE__ */ new Set();
|
|
15
25
|
let disposed = false;
|
|
26
|
+
let motionFailed = false;
|
|
16
27
|
const advertise = () => {
|
|
17
28
|
if (!disposed && context.state === "running" && room.state === ConnectionState.Connected) {
|
|
18
|
-
|
|
29
|
+
nativeAudio.current ??= animation.current;
|
|
30
|
+
void room.localParticipant.setAttributes({
|
|
31
|
+
"arbi.call_media": animation.current && !motionFailed && !failed.size ? CALL_MEDIA_PROTOCOL : "",
|
|
32
|
+
"arbi.call_media_native": nativeAudio.current && !failed.size ? "arbi.call.media.independent.v1" : "rtc",
|
|
33
|
+
"arbi.call_avatar": animation.current && nativeAudio.current && !motionFailed && !failed.size ? "true" : ""
|
|
34
|
+
}).catch(() => void 0);
|
|
19
35
|
}
|
|
20
36
|
};
|
|
37
|
+
advertiseRef.current = advertise;
|
|
21
38
|
const changed = () => {
|
|
22
39
|
if (!disposed) setPlayers(new Map(live));
|
|
23
40
|
};
|
|
41
|
+
const fallback = (participant) => {
|
|
42
|
+
if (participant.attributes["arbi.call_assistant"] !== "true" || participant.attributes["arbi.call_media_fallback"] !== "rtc")
|
|
43
|
+
return;
|
|
44
|
+
failed.add(participant.identity);
|
|
45
|
+
live.get(participant.identity)?.reset(true);
|
|
46
|
+
advertise();
|
|
47
|
+
};
|
|
48
|
+
const attributesChanged = (_changed, participant) => fallback(participant);
|
|
24
49
|
const received = (bytes, from, _kind, topic) => {
|
|
25
50
|
if (topic !== CALL_MEDIA_PROTOCOL && topic !== CALL_TIMING_PROTOCOL || !from || from.attributes["arbi.call_assistant"] !== "true")
|
|
26
51
|
return;
|
|
52
|
+
fallback(from);
|
|
53
|
+
if (failed.has(from.identity)) return;
|
|
27
54
|
const receivedAt = performance.now();
|
|
28
55
|
const identity = from.identity;
|
|
29
56
|
const chain = chains.get(identity) ?? Promise.resolve();
|
|
30
57
|
chains.set(
|
|
31
58
|
identity,
|
|
32
59
|
chain.then(async () => {
|
|
33
|
-
if (disposed) return;
|
|
60
|
+
if (disposed || failed.has(identity)) return;
|
|
34
61
|
const plaintext = await decryptCallMedia(bytes, key);
|
|
62
|
+
if (disposed || failed.has(identity)) return;
|
|
35
63
|
let player = live.get(identity);
|
|
36
64
|
if (!player) {
|
|
37
65
|
player = new CallMediaPlayer(context, changed, (measurement) => {
|
|
@@ -48,14 +76,32 @@ function useCallMedia(enabled, key) {
|
|
|
48
76
|
for (const event of events) player.timing(event, receivedAt, events.length);
|
|
49
77
|
return;
|
|
50
78
|
}
|
|
51
|
-
|
|
79
|
+
let message;
|
|
80
|
+
try {
|
|
81
|
+
message = checkedCallMedia(plaintext, identity);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
if (!plaintext || typeof plaintext !== "object" || plaintext.type !== "animation")
|
|
84
|
+
throw error;
|
|
85
|
+
message = checkedCallMedia({ ...plaintext, type: "video-stop" }, identity);
|
|
86
|
+
motionFailed = true;
|
|
87
|
+
advertise();
|
|
88
|
+
}
|
|
89
|
+
if (message.type === "start" && (message.independent ? !nativeAudio.current : !animation.current))
|
|
90
|
+
return;
|
|
52
91
|
if (context.state !== "running") await context.resume();
|
|
53
92
|
if (context.state !== "running") throw new Error("Call audio is unavailable");
|
|
93
|
+
if (failed.has(identity)) return;
|
|
94
|
+
player.setMotionEnabled(animation.current && !motionFailed);
|
|
54
95
|
player.push(message, receivedAt);
|
|
55
96
|
}).catch(() => {
|
|
56
97
|
if (topic === CALL_TIMING_PROTOCOL) return;
|
|
98
|
+
failed.add(identity);
|
|
57
99
|
live.get(identity)?.reset(true);
|
|
58
|
-
void room.localParticipant.setAttributes({
|
|
100
|
+
void room.localParticipant.setAttributes({
|
|
101
|
+
"arbi.call_media": "",
|
|
102
|
+
"arbi.call_media_native": "",
|
|
103
|
+
"arbi.call_avatar": ""
|
|
104
|
+
}).catch(() => void 0);
|
|
59
105
|
})
|
|
60
106
|
);
|
|
61
107
|
};
|
|
@@ -65,6 +111,7 @@ function useCallMedia(enabled, key) {
|
|
|
65
111
|
changed();
|
|
66
112
|
};
|
|
67
113
|
room.on(RoomEvent.DataReceived, received);
|
|
114
|
+
room.on(RoomEvent.ParticipantAttributesChanged, attributesChanged);
|
|
68
115
|
room.on(RoomEvent.ParticipantDisconnected, removed);
|
|
69
116
|
room.on(RoomEvent.Connected, advertise);
|
|
70
117
|
room.on(RoomEvent.Reconnected, advertise);
|
|
@@ -73,18 +120,29 @@ function useCallMedia(enabled, key) {
|
|
|
73
120
|
}).catch(() => void 0);
|
|
74
121
|
return () => {
|
|
75
122
|
disposed = true;
|
|
123
|
+
advertiseRef.current = () => {
|
|
124
|
+
};
|
|
76
125
|
room.off(RoomEvent.DataReceived, received);
|
|
126
|
+
room.off(RoomEvent.ParticipantAttributesChanged, attributesChanged);
|
|
77
127
|
room.off(RoomEvent.ParticipantDisconnected, removed);
|
|
78
128
|
room.off(RoomEvent.Connected, advertise);
|
|
79
129
|
room.off(RoomEvent.Reconnected, advertise);
|
|
80
130
|
if (room.state === ConnectionState.Connected) {
|
|
81
|
-
void room.localParticipant.setAttributes({
|
|
131
|
+
void room.localParticipant.setAttributes({
|
|
132
|
+
"arbi.call_media": "",
|
|
133
|
+
"arbi.call_media_native": "",
|
|
134
|
+
"arbi.call_avatar": ""
|
|
135
|
+
}).catch(() => void 0);
|
|
82
136
|
}
|
|
83
137
|
for (const player of live.values()) player.reset();
|
|
84
138
|
void context.close();
|
|
85
139
|
setPlayers(/* @__PURE__ */ new Map());
|
|
86
140
|
};
|
|
87
141
|
}, [enabled, key, room]);
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
for (const player of players.values()) player.setMotionEnabled(animationEnabled);
|
|
144
|
+
advertiseRef.current();
|
|
145
|
+
}, [animationEnabled, players]);
|
|
88
146
|
return players;
|
|
89
147
|
}
|
|
90
148
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/calls/livekit/useCallMedia.ts"],
|
|
4
|
-
"sourcesContent": ["/** Separately encrypted data-channel media, played on one audio/control clock. */\nimport { useEffect, useState } from 'react'\nimport { useRoomContext } from '@livekit/components-react'\nimport {
|
|
5
|
-
"mappings": "AACA,SAAS,WAAW,gBAAgB;
|
|
4
|
+
"sourcesContent": ["/** Separately encrypted data-channel media, played on one audio/control clock. */\nimport { useEffect, useRef, useState } from 'react'\nimport { useRoomContext } from '@livekit/components-react'\nimport {\n ConnectionState,\n RoomEvent,\n type Participant,\n type RemoteParticipant,\n} from 'livekit-client'\nimport { CALL_MEDIA_PROTOCOL, decryptCallMedia } from '@arbidocs/client'\nimport { CallMediaPlayer, checkedCallMedia } from './call-media-player'\nimport { CALL_TIMING_PROTOCOL, checkedCallTimings } from './call-timing'\n\nexport function useCallMedia(enabled: boolean, key: Uint8Array | null, animationEnabled = true) {\n const room = useRoomContext()\n const animation = useRef(animationEnabled)\n animation.current = animationEnabled\n const nativeAudio = useRef<boolean | null>(null)\n const advertiseRef = useRef<() => void>(() => {})\n const [players, setPlayers] = useState<ReadonlyMap<string, CallMediaPlayer>>(new Map())\n useEffect(() => {\n if (!enabled || !key || typeof AudioContext === 'undefined') return\n nativeAudio.current = null\n const context = new AudioContext()\n const live = new Map<string, CallMediaPlayer>()\n const chains = new Map<string, Promise<void>>()\n const failed = new Set<string>()\n let disposed = false\n let motionFailed = false\n const advertise = () => {\n if (!disposed && context.state === 'running' && room.state === ConnectionState.Connected) {\n nativeAudio.current ??= animation.current\n void room.localParticipant\n .setAttributes({\n 'arbi.call_media':\n animation.current && !motionFailed && !failed.size ? CALL_MEDIA_PROTOCOL : '',\n 'arbi.call_media_native':\n nativeAudio.current && !failed.size ? 'arbi.call.media.independent.v1' : 'rtc',\n 'arbi.call_avatar':\n animation.current && nativeAudio.current && !motionFailed && !failed.size\n ? 'true'\n : '',\n })\n .catch(() => undefined)\n }\n }\n advertiseRef.current = advertise\n const changed = () => {\n if (!disposed) setPlayers(new Map(live))\n }\n const fallback = (participant: Participant) => {\n if (\n participant.attributes['arbi.call_assistant'] !== 'true' ||\n participant.attributes['arbi.call_media_fallback'] !== 'rtc'\n )\n return\n failed.add(participant.identity)\n // Stop native PCM before releasing the continuously advancing RTC track.\n live.get(participant.identity)?.reset(true)\n advertise()\n }\n const attributesChanged = (_changed: Record<string, string>, participant: Participant) =>\n fallback(participant)\n const received = (\n bytes: Uint8Array,\n from?: RemoteParticipant,\n _kind?: unknown,\n topic?: string\n ) => {\n if (\n (topic !== CALL_MEDIA_PROTOCOL && topic !== CALL_TIMING_PROTOCOL) ||\n !from ||\n from.attributes['arbi.call_assistant'] !== 'true'\n )\n return\n fallback(from)\n if (failed.has(from.identity)) return\n const receivedAt = performance.now()\n const identity = from.identity\n const chain = chains.get(identity) ?? Promise.resolve()\n chains.set(\n identity,\n chain\n .then(async () => {\n if (disposed || failed.has(identity)) return\n const plaintext = await decryptCallMedia(bytes, key)\n if (disposed || failed.has(identity)) return\n let player = live.get(identity)\n if (!player) {\n player = new CallMediaPlayer(context, changed, (measurement) => {\n window.dispatchEvent(\n new CustomEvent('arbi:call-timing', {\n detail: { participant: identity, ...measurement },\n })\n )\n })\n live.set(identity, player)\n }\n if (topic === CALL_TIMING_PROTOCOL) {\n const events = checkedCallTimings(plaintext, identity)\n for (const event of events) player.timing(event, receivedAt, events.length)\n return\n }\n let message\n try {\n message = checkedCallMedia(plaintext, identity)\n } catch (error) {\n if (\n !plaintext ||\n typeof plaintext !== 'object' ||\n (plaintext as Record<string, unknown>).type !== 'animation'\n )\n throw error\n // Authenticate and consume the optional packet's sequence, but\n // discard its bad controls. The following PCM remains usable.\n message = checkedCallMedia({ ...plaintext, type: 'video-stop' }, identity)\n motionFailed = true\n advertise()\n }\n if (\n message.type === 'start' &&\n (message.independent ? !nativeAudio.current : !animation.current)\n )\n return\n if (context.state !== 'running') await context.resume()\n if (context.state !== 'running') throw new Error('Call audio is unavailable')\n if (failed.has(identity)) return\n player.setMotionEnabled(animation.current && !motionFailed)\n player.push(message, receivedAt)\n })\n .catch(() => {\n // Optional diagnostic packets must never interrupt otherwise healthy speech.\n if (topic === CALL_TIMING_PROTOCOL) return\n failed.add(identity)\n live.get(identity)?.reset(true)\n // A browser unable to play synchronized media keeps its ordinary LiveKit audio.\n void room.localParticipant\n .setAttributes({\n 'arbi.call_media': '',\n 'arbi.call_media_native': '',\n 'arbi.call_avatar': '',\n })\n .catch(() => undefined)\n })\n )\n }\n const removed = (participant: RemoteParticipant) => {\n live.get(participant.identity)?.reset()\n live.delete(participant.identity)\n changed()\n }\n room.on(RoomEvent.DataReceived, received)\n room.on(RoomEvent.ParticipantAttributesChanged, attributesChanged)\n room.on(RoomEvent.ParticipantDisconnected, removed)\n room.on(RoomEvent.Connected, advertise)\n room.on(RoomEvent.Reconnected, advertise)\n void context\n .resume()\n .then(() => {\n advertise()\n })\n .catch(() => undefined)\n return () => {\n disposed = true\n advertiseRef.current = () => {}\n room.off(RoomEvent.DataReceived, received)\n room.off(RoomEvent.ParticipantAttributesChanged, attributesChanged)\n room.off(RoomEvent.ParticipantDisconnected, removed)\n room.off(RoomEvent.Connected, advertise)\n room.off(RoomEvent.Reconnected, advertise)\n if (room.state === ConnectionState.Connected) {\n void room.localParticipant\n .setAttributes({\n 'arbi.call_media': '',\n 'arbi.call_media_native': '',\n 'arbi.call_avatar': '',\n })\n .catch(() => undefined)\n }\n for (const player of live.values()) player.reset()\n void context.close()\n setPlayers(new Map())\n }\n }, [enabled, key, room])\n useEffect(() => {\n for (const player of players.values()) player.setMotionEnabled(animationEnabled)\n advertiseRef.current()\n }, [animationEnabled, players])\n return players\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,qBAAqB,wBAAwB;AACtD,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,sBAAsB,0BAA0B;AAElD,SAAS,aAAa,SAAkB,KAAwB,mBAAmB,MAAM;AAC9F,QAAM,OAAO,eAAe;AAC5B,QAAM,YAAY,OAAO,gBAAgB;AACzC,YAAU,UAAU;AACpB,QAAM,cAAc,OAAuB,IAAI;AAC/C,QAAM,eAAe,OAAmB,MAAM;AAAA,EAAC,CAAC;AAChD,QAAM,CAAC,SAAS,UAAU,IAAI,SAA+C,oBAAI,IAAI,CAAC;AACtF,YAAU,MAAM;AACd,QAAI,CAAC,WAAW,CAAC,OAAO,OAAO,iBAAiB,YAAa;AAC7D,gBAAY,UAAU;AACtB,UAAM,UAAU,IAAI,aAAa;AACjC,UAAM,OAAO,oBAAI,IAA6B;AAC9C,UAAM,SAAS,oBAAI,IAA2B;AAC9C,UAAM,SAAS,oBAAI,IAAY;AAC/B,QAAI,WAAW;AACf,QAAI,eAAe;AACnB,UAAM,YAAY,MAAM;AACtB,UAAI,CAAC,YAAY,QAAQ,UAAU,aAAa,KAAK,UAAU,gBAAgB,WAAW;AACxF,oBAAY,YAAY,UAAU;AAClC,aAAK,KAAK,iBACP,cAAc;AAAA,UACb,mBACE,UAAU,WAAW,CAAC,gBAAgB,CAAC,OAAO,OAAO,sBAAsB;AAAA,UAC7E,0BACE,YAAY,WAAW,CAAC,OAAO,OAAO,mCAAmC;AAAA,UAC3E,oBACE,UAAU,WAAW,YAAY,WAAW,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AA8B,iBAAiB;AACjE,SAAK,GAAG,UAAU,yBAAyB,OAAO;AAClD,SAAK,GAAG,UAAU,WAAW,SAAS;AACtC,SAAK,GAAG,UAAU,aAAa,SAAS;AACxC,SAAK,QACF,OAAO,EACP,KAAK,MAAM;AACV,gBAAU;AAAA,IACZ,CAAC,EACA,MAAM,MAAM,MAAS;AACxB,WAAO,MAAM;AACX,iBAAW;AACX,mBAAa,UAAU,MAAM;AAAA,MAAC;AAC9B,WAAK,IAAI,UAAU,cAAc,QAAQ;AACzC,WAAK,IAAI,UAAU,8BAA8B,iBAAiB;AAClE,WAAK,IAAI,UAAU,yBAAyB,OAAO;AACnD,WAAK,IAAI,UAAU,WAAW,SAAS;AACvC,WAAK,IAAI,UAAU,aAAa,SAAS;AACzC,UAAI,KAAK,UAAU,gBAAgB,WAAW;AAC5C,aAAK,KAAK,iBACP,cAAc;AAAA,UACb,mBAAmB;AAAA,UACnB,0BAA0B;AAAA,UAC1B,oBAAoB;AAAA,QACtB,CAAC,EACA,MAAM,MAAM,MAAS;AAAA,MAC1B;AACA,iBAAW,UAAU,KAAK,OAAO,EAAG,QAAO,MAAM;AACjD,WAAK,QAAQ,MAAM;AACnB,iBAAW,oBAAI,IAAI,CAAC;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,SAAS,KAAK,IAAI,CAAC;AACvB,YAAU,MAAM;AACd,eAAW,UAAU,QAAQ,OAAO,EAAG,QAAO,iBAAiB,gBAAgB;AAC/E,iBAAa,QAAQ;AAAA,EACvB,GAAG,CAAC,kBAAkB,OAAO,CAAC;AAC9B,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2494,6 +2494,13 @@ async function startDmCall(arbi, peer) {
|
|
|
2494
2494
|
}
|
|
2495
2495
|
return startChatCall(arbi, { chatExtId, title: peer.name ?? null, ring: [peer] });
|
|
2496
2496
|
}
|
|
2497
|
+
function startWorkspaceCall(arbi, opts) {
|
|
2498
|
+
return startCall(arbi, {
|
|
2499
|
+
context: { workspaceExtId: opts.workspaceExtId },
|
|
2500
|
+
title: opts.title,
|
|
2501
|
+
ring: opts.ring
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2497
2504
|
function startContactsCall(arbi, opts) {
|
|
2498
2505
|
return startCall(arbi, { context: {}, title: opts.title, ring: opts.ring, invites: opts.invites });
|
|
2499
2506
|
}
|
|
@@ -2878,6 +2885,7 @@ exports.startChatCall = startChatCall;
|
|
|
2878
2885
|
exports.startContactsCall = startContactsCall;
|
|
2879
2886
|
exports.startDmCall = startDmCall;
|
|
2880
2887
|
exports.startThreadCall = startThreadCall;
|
|
2888
|
+
exports.startWorkspaceCall = startWorkspaceCall;
|
|
2881
2889
|
exports.startsMediaFile = startsMediaFile;
|
|
2882
2890
|
exports.storeTranscriptSegment = storeTranscriptSegment;
|
|
2883
2891
|
exports.stripSpeakerPrefix = stripSpeakerPrefix;
|
|
@@ -2932,5 +2940,5 @@ exports.useUserSettings = useUserSettings;
|
|
|
2932
2940
|
exports.wipeOfflineMail = wipeOfflineMail;
|
|
2933
2941
|
exports.wrapTrackKey = wrapTrackKey;
|
|
2934
2942
|
exports.writeSamples = writeSamples;
|
|
2935
|
-
//# sourceMappingURL=chunk-
|
|
2936
|
-
//# sourceMappingURL=chunk-
|
|
2943
|
+
//# sourceMappingURL=chunk-TKPBJCWQ.cjs.map
|
|
2944
|
+
//# sourceMappingURL=chunk-TKPBJCWQ.cjs.map
|