@vouchfor/embeds 0.0.0-experiment.eb79200 → 0.0.0-experiment.f97b5b2
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 +16 -15
- package/dist/es/embeds.js +966 -656
- 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 +104 -14
- package/src/components/Embed/controllers/tracking.ts +36 -33
- package/src/components/Embed/index.ts +24 -27
- 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,34 @@
|
|
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
8
|
enableTracking?: boolean;
|
10
9
|
trackingSource?: string;
|
10
|
+
vouchId?: string;
|
11
|
+
templateId?: string;
|
11
12
|
};
|
12
13
|
declare class Embed extends LitElement {
|
13
14
|
private _mediaPlayerRef;
|
14
|
-
|
15
|
-
|
15
|
+
data: EmbedProps['data'];
|
16
|
+
vouchId: EmbedProps['vouchId'];
|
17
|
+
templateId: EmbedProps['templateId'];
|
16
18
|
env: EmbedProps['env'];
|
17
19
|
apiKey: EmbedProps['apiKey'];
|
18
|
-
preload: EmbedProps['preload'];
|
19
|
-
autoplay: EmbedProps['autoplay'];
|
20
20
|
enableTracking: EmbedProps['enableTracking'];
|
21
21
|
trackingSource: EmbedProps['trackingSource'];
|
22
|
-
resolution: EmbedProps['resolution'];
|
23
|
-
aspectRatio: EmbedProps['aspectRatio'];
|
24
22
|
controls: EmbedProps['controls'];
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
preload: EmbedProps['preload'];
|
24
|
+
autoplay: EmbedProps['autoplay'];
|
25
|
+
aspectRatio: EmbedProps['aspectRatio'];
|
28
26
|
private eventController;
|
29
|
-
private
|
30
|
-
private
|
27
|
+
private _fetcherController;
|
28
|
+
private _trackingController;
|
29
|
+
vouch: EmbedProps['data'];
|
30
|
+
template: TemplateInstance | undefined;
|
31
|
+
get fetching(): boolean;
|
31
32
|
get waiting(): boolean | undefined;
|
32
33
|
get seeking(): boolean | undefined;
|
33
34
|
get paused(): boolean | undefined;
|
@@ -49,7 +50,7 @@ declare class Embed extends LitElement {
|
|
49
50
|
play(): void;
|
50
51
|
pause(): void;
|
51
52
|
setScene(index: number): void;
|
52
|
-
render(): import("lit
|
53
|
+
render(): import("lit").TemplateResult<1>;
|
53
54
|
}
|
54
55
|
declare global {
|
55
56
|
interface HTMLElementTagNameMap {
|