@vouchfor/embeds 0.0.0-experiment.eb79200 → 0.0.0-experiment.f4df018
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/components/Embed/controllers/fetcher.d.ts +5 -0
- package/dist/es/components/Embed/index.d.ts +15 -16
- package/dist/es/embeds.js +950 -653
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/utils/env.d.ts +5 -11
- package/dist/iife/embeds.iife.js +339 -390
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Embed/Embed.stories.ts +10 -26
- package/src/components/Embed/controllers/fetcher.ts +84 -14
- package/src/components/Embed/controllers/tracking.ts +26 -33
- package/src/components/Embed/index.ts +23 -28
- package/src/utils/env.ts +18 -32
- package/dist/es/components/Embed/controllers/event-forwarder.d.ts +0 -14
@@ -3,6 +3,11 @@ import type { ReactiveControllerHost } from 'lit';
|
|
3
3
|
type EmbedHost = ReactiveControllerHost & Embed;
|
4
4
|
declare class FetcherController {
|
5
5
|
host: EmbedHost;
|
6
|
+
private _fetching;
|
7
|
+
set fetching(value: boolean);
|
8
|
+
get fetching(): boolean;
|
9
|
+
private getVouch;
|
10
|
+
private getTemplate;
|
6
11
|
constructor(host: EmbedHost);
|
7
12
|
}
|
8
13
|
export { FetcherController };
|
@@ -1,33 +1,32 @@
|
|
1
1
|
import { LitElement } from 'lit';
|
2
|
-
import type { Scene } from '@vouchfor/canvas-video';
|
2
|
+
import type { Scene, 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' | '
|
5
|
+
type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
|
6
6
|
env: Environment;
|
7
7
|
apiKey: string;
|
8
|
-
vouchHashId?: string;
|
9
|
-
enableTracking?: boolean;
|
10
8
|
trackingSource?: string;
|
9
|
+
vouchId?: string;
|
10
|
+
templateId?: string;
|
11
11
|
};
|
12
12
|
declare class Embed extends LitElement {
|
13
13
|
private _mediaPlayerRef;
|
14
|
-
|
15
|
-
|
14
|
+
data: EmbedProps['data'];
|
15
|
+
vouchId: EmbedProps['vouchId'];
|
16
|
+
templateId: EmbedProps['templateId'];
|
16
17
|
env: EmbedProps['env'];
|
17
18
|
apiKey: EmbedProps['apiKey'];
|
19
|
+
trackingSource: EmbedProps['trackingSource'];
|
20
|
+
controls: EmbedProps['controls'];
|
18
21
|
preload: EmbedProps['preload'];
|
19
22
|
autoplay: EmbedProps['autoplay'];
|
20
|
-
enableTracking: EmbedProps['enableTracking'];
|
21
|
-
trackingSource: EmbedProps['trackingSource'];
|
22
|
-
resolution: EmbedProps['resolution'];
|
23
23
|
aspectRatio: EmbedProps['aspectRatio'];
|
24
|
-
controls: EmbedProps['controls'];
|
25
|
-
data: MediaPlayerProps['data'];
|
26
|
-
instance: MediaPlayerProps['instance'];
|
27
|
-
fetching: boolean;
|
28
24
|
private eventController;
|
29
|
-
private
|
30
|
-
private
|
25
|
+
private _fetcherController;
|
26
|
+
private _trackingController;
|
27
|
+
vouch: EmbedProps['data'];
|
28
|
+
template: TemplateInstance | undefined;
|
29
|
+
get fetching(): boolean;
|
31
30
|
get waiting(): boolean | undefined;
|
32
31
|
get seeking(): boolean | undefined;
|
33
32
|
get paused(): boolean | undefined;
|
@@ -49,7 +48,7 @@ declare class Embed extends LitElement {
|
|
49
48
|
play(): void;
|
50
49
|
pause(): void;
|
51
50
|
setScene(index: number): void;
|
52
|
-
render(): import("lit
|
51
|
+
render(): import("lit").TemplateResult<1>;
|
53
52
|
}
|
54
53
|
declare global {
|
55
54
|
interface HTMLElementTagNameMap {
|