@absolutejs/voice 0.0.22-beta.515 → 0.0.22-beta.517

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.
@@ -245,6 +245,7 @@ var serverMessageToAction = (message) => {
245
245
  };
246
246
 
247
247
  // node_modules/@absolutejs/media/dist/index.js
248
+ var TAU = Math.PI * 2;
248
249
  var pushIssue = (issues, severity, code, message) => {
249
250
  issues.push({ code, message, severity });
250
251
  };
@@ -0,0 +1,38 @@
1
+ import { createVoiceController } from "../client/controller";
2
+ import { type VoiceWidgetLabels, type VoiceWidgetTheme } from "../client/voiceWidgetView";
3
+ import type { VoiceControllerOptions } from "../types";
4
+ export type VoiceEmbedMountOptions = {
5
+ /** WebSocket route the voice runtime is mounted at. Defaults to "/voice". */
6
+ path?: string;
7
+ title?: string;
8
+ theme?: VoiceWidgetTheme;
9
+ labels?: VoiceWidgetLabels;
10
+ controllerOptions?: VoiceControllerOptions;
11
+ /** Auto-start the call as soon as the widget mounts. Defaults to false. */
12
+ autoStart?: boolean;
13
+ onError?: (error: string) => void;
14
+ onStatusChange?: (status: string) => void;
15
+ };
16
+ export type VoiceEmbedHandle = {
17
+ /** Begin recording / open the call. */
18
+ start: () => Promise<void>;
19
+ /** Stop recording (mute). */
20
+ mute: () => void;
21
+ /** End the call and tear down. */
22
+ end: () => Promise<void>;
23
+ /** Remove the widget from the DOM and release all resources. */
24
+ unmount: () => void;
25
+ /** The underlying framework-agnostic controller, for advanced use. */
26
+ controller: ReturnType<typeof createVoiceController>;
27
+ };
28
+ export declare const mount: (target: string | HTMLElement, options?: VoiceEmbedMountOptions) => VoiceEmbedHandle;
29
+ export type VoiceEmbedGlobal = {
30
+ mount: typeof mount;
31
+ version: string;
32
+ };
33
+ export declare const VOICE_EMBED_VERSION = "0.0.22-beta.516";
34
+ declare const globalApi: VoiceEmbedGlobal;
35
+ declare global {
36
+ var AbsoluteVoice: VoiceEmbedGlobal | undefined;
37
+ }
38
+ export default globalApi;