@vouchfor/embeds 0.0.0-experiment.5d16720 → 0.0.0-experiment.5e5848e

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,11 @@
1
1
  import type { Embed } from '..';
2
- import type { TemplateInstance } from '@vouchfor/canvas-video';
3
2
  import type { ReactiveControllerHost } from 'lit';
4
3
  type EmbedHost = ReactiveControllerHost & Embed;
5
4
  declare class FetcherController {
6
5
  host: EmbedHost;
7
6
  private _fetching;
8
- private _vouch;
9
- private _template;
10
7
  set fetching(value: boolean);
11
8
  get fetching(): boolean;
12
- set vouch(value: import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined);
13
- get vouch(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined;
14
- set template(value: TemplateInstance | null);
15
- get template(): TemplateInstance | null;
16
9
  private getVouch;
17
10
  private getTemplate;
18
11
  constructor(host: EmbedHost);
@@ -0,0 +1,64 @@
1
+ import { LitElement } from 'lit';
2
+ import type { Scene, TemplateInstance } from '@vouchfor/canvas-video';
3
+ import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
4
+ import type { Environment } from '../../utils/env';
5
+ type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
6
+ env: Environment;
7
+ apiKey: string;
8
+ trackingSource?: string;
9
+ vouchId?: string;
10
+ templateId?: string;
11
+ };
12
+ declare class Embed extends LitElement {
13
+ private _mediaPlayerRef;
14
+ data: EmbedProps['data'];
15
+ vouchId: EmbedProps['vouchId'];
16
+ templateId: EmbedProps['templateId'];
17
+ env: EmbedProps['env'];
18
+ apiKey: EmbedProps['apiKey'];
19
+ trackingSource: EmbedProps['trackingSource'];
20
+ controls: EmbedProps['controls'];
21
+ preload: EmbedProps['preload'];
22
+ autoplay: EmbedProps['autoplay'];
23
+ aspectRatio: EmbedProps['aspectRatio'];
24
+ private eventController;
25
+ private _fetcherController;
26
+ private _trackingController;
27
+ vouch: EmbedProps['data'];
28
+ template: TemplateInstance | undefined;
29
+ get fetching(): boolean;
30
+ get waiting(): boolean | undefined;
31
+ get seeking(): boolean | undefined;
32
+ get paused(): boolean | undefined;
33
+ get captions(): boolean | undefined;
34
+ get fullscreen(): boolean | undefined;
35
+ get duration(): number | undefined;
36
+ set currentTime(value: number);
37
+ get currentTime(): number;
38
+ set playbackRate(value: number);
39
+ get playbackRate(): number;
40
+ set volume(value: number);
41
+ get volume(): number;
42
+ set muted(value: boolean);
43
+ get muted(): boolean;
44
+ get scene(): Scene | null;
45
+ get scenes(): Scene[];
46
+ get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
47
+ get mediaPlayer(): MediaPlayer | undefined;
48
+ play(): void;
49
+ pause(): void;
50
+ setScene(index: number): void;
51
+ render(): import("lit").TemplateResult<1>;
52
+ }
53
+ declare global {
54
+ interface HTMLElementTagNameMap {
55
+ 'vouch-embed': Embed;
56
+ }
57
+ namespace JSX {
58
+ interface IntrinsicElements {
59
+ 'vouch-embed': Embed;
60
+ }
61
+ }
62
+ }
63
+ export { Embed };
64
+ export type { EmbedProps };