@vouchfor/embeds 0.0.0-experiment.799d4c6 → 0.0.0-experiment.7ccd27e

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,33 +1,36 @@
1
1
  import { LitElement } from 'lit';
2
- import type { Scene } from '@vouchfor/canvas-video';
2
+ import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
3
3
  import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
4
4
  import type { Environment } from '../../utils/env';
5
- type EmbedProps = Pick<MediaPlayerProps, 'data' | 'resolution' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
5
+ type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
6
6
  env: Environment;
7
7
  apiKey: string;
8
- vouchHashId?: string;
9
- enableTracking?: boolean;
8
+ disableTracking?: boolean;
10
9
  trackingSource?: string;
10
+ vouchId?: string;
11
+ templateId?: string;
12
+ questions?: number[];
11
13
  };
12
14
  declare class Embed extends LitElement {
13
15
  private _mediaPlayerRef;
14
- propData: EmbedProps['data'];
15
- vouchHashId: EmbedProps['vouchHashId'];
16
+ data: EmbedProps['data'];
17
+ vouchId: EmbedProps['vouchId'];
18
+ templateId: EmbedProps['templateId'];
19
+ questions: EmbedProps['questions'];
16
20
  env: EmbedProps['env'];
17
21
  apiKey: EmbedProps['apiKey'];
22
+ disableTracking: EmbedProps['disableTracking'];
23
+ trackingSource: EmbedProps['trackingSource'];
24
+ controls: EmbedProps['controls'];
18
25
  preload: EmbedProps['preload'];
19
26
  autoplay: EmbedProps['autoplay'];
20
- enableTracking: EmbedProps['enableTracking'];
21
- trackingSource: EmbedProps['trackingSource'];
22
- resolution: EmbedProps['resolution'];
23
27
  aspectRatio: EmbedProps['aspectRatio'];
24
- controls: EmbedProps['controls'];
25
- data: MediaPlayerProps['data'];
26
- instance: MediaPlayerProps['instance'];
27
- fetching: boolean;
28
28
  private eventController;
29
- private trackingController;
30
- private fetcherController;
29
+ private _fetcherController;
30
+ private _trackingController;
31
+ vouch: EmbedProps['data'];
32
+ template: TemplateInstance | undefined;
33
+ get fetching(): boolean;
31
34
  get waiting(): boolean | undefined;
32
35
  get seeking(): boolean | undefined;
33
36
  get paused(): boolean | undefined;
@@ -44,12 +47,13 @@ declare class Embed extends LitElement {
44
47
  get muted(): boolean;
45
48
  get scene(): Scene | null;
46
49
  get scenes(): Scene[];
50
+ get sceneConfig(): Scenes | null;
47
51
  get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
48
52
  get mediaPlayer(): MediaPlayer | undefined;
49
53
  play(): void;
50
54
  pause(): void;
51
55
  setScene(index: number): void;
52
- render(): import("lit-html").TemplateResult<1>;
56
+ render(): import("lit").TemplateResult<1>;
53
57
  }
54
58
  declare global {
55
59
  interface HTMLElementTagNameMap {
@@ -0,0 +1,12 @@
1
+ type Environment = 'local' | 'dev' | 'staging' | 'prod';
2
+ type GetEnvUrlsReturn = {
3
+ videoUrl: string;
4
+ publicApiUrl: string;
5
+ embedApiUrl: string;
6
+ };
7
+ declare const devEmbedApiUrl = "https://embed-dev.vouchfor.com/v2";
8
+ declare const stagingEmbedApiUrl = "https://embed-staging.vouchfor.com/v2";
9
+ declare const prodEmbedApiUrl = "https://embed.vouchfor.com/v2";
10
+ declare function getEnvUrls(env: Environment): GetEnvUrlsReturn;
11
+ export { devEmbedApiUrl, stagingEmbedApiUrl, prodEmbedApiUrl, getEnvUrls };
12
+ export type { Environment };