@avaturn-live/web-sdk 0.1.0 → 0.1.2

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/main.d.ts CHANGED
@@ -5,6 +5,8 @@ export declare class AvaturnHead implements IAvaturnHead {
5
5
  inited: boolean;
6
6
  mediaStream: MediaStream;
7
7
  session_id: string;
8
+ protected frameHandle: ReturnType<typeof requestAnimationFrame>;
9
+ protected rootElement?: HTMLElement;
8
10
  protected abortController: AbortController;
9
11
  protected timeout: ReturnType<typeof setTimeout> | 0;
10
12
  protected keepAlive: boolean;
@@ -14,14 +16,25 @@ export declare class AvaturnHead implements IAvaturnHead {
14
16
  [K in AvaturnHeadEvent]?: AvaturnEventCallback<K>[];
15
17
  };
16
18
  /**
17
- * AvaturnHead main class
18
- *
19
+ * Creates an instance of AvaturnHead using API options.
19
20
  * @constructor
20
- * @param {AvaturnHeadConfig} config - The configuration object for Avaturn Head.
21
+ * @param options Configuration options.
21
22
  */
22
- constructor({ apiHost, sessionToken, preloadBundle, preconnect, keepAlive, }: AvaturnHeadConfig);
23
+ constructor(options: AvaturnHeadConfig);
24
+ /**
25
+ * Creates an instance of AvaturnHead using a DOM element.
26
+ * @constructor
27
+ * @param rootElement A reference to the DOM element.
28
+ * @param options Configuration options.
29
+ */
30
+ constructor(rootElement: HTMLElement, options: AvaturnHeadConfig);
31
+ private parseConfig;
32
+ protected drawUI(options?: {
33
+ transparent: boolean;
34
+ }): void;
23
35
  protected startIdleTimeout(): void;
24
36
  protected restartIdleTimeout(): void;
37
+ cancelAllTasks(): Promise<void>;
25
38
  init(config?: {
26
39
  timeout?: number;
27
40
  }): Promise<unknown>;