@vouchfor/embeds 0.0.0-experiment.f4df018 → 0.0.0-experiment.f69517b
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/embeds.js +1003 -1363
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/src/components/DialogEmbed/DialogOverlay.d.ts +20 -0
- package/dist/es/src/components/DialogEmbed/DialogPortal.d.ts +36 -0
- package/dist/es/src/components/DialogEmbed/index.d.ts +38 -0
- package/dist/es/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +15 -0
- package/dist/es/{components/Embed → src/components/PlayerEmbed}/controllers/fetcher.d.ts +5 -4
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/index.d.ts +36 -0
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +17 -0
- package/dist/es/src/components/PlayerEmbed/index.d.ts +74 -0
- package/dist/es/src/components/PlayerEmbed/tests/data.d.ts +3 -0
- package/dist/es/src/index.d.ts +2 -0
- package/dist/iife/dialog-embed/embed.iife.js +1750 -0
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -0
- package/dist/iife/embeds.iife.js +762 -442
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/embed.iife.js +1612 -0
- package/dist/iife/player-embed/embed.iife.js.map +1 -0
- package/package.json +43 -31
- package/src/components/DialogEmbed/Dialog.stories.ts +91 -0
- package/src/components/DialogEmbed/DialogOverlay.ts +131 -0
- package/src/components/DialogEmbed/DialogPortal.ts +126 -0
- package/src/components/DialogEmbed/index.ts +97 -0
- package/src/components/{Embed/Embed.stories.ts → PlayerEmbed/PlayerEmbed.stories.ts} +27 -14
- package/src/components/{Embed → PlayerEmbed}/controllers/event-forwarder.ts +6 -5
- package/src/components/PlayerEmbed/controllers/fetcher.ts +152 -0
- package/src/components/PlayerEmbed/controllers/tracking/index.ts +224 -0
- package/src/components/PlayerEmbed/controllers/tracking/utils.ts +95 -0
- package/src/components/{Embed → PlayerEmbed}/index.ts +78 -27
- package/src/components/PlayerEmbed/tests/PlayerEmbed.spec.ts +80 -0
- package/src/components/PlayerEmbed/tests/data.ts +183 -0
- package/src/index.ts +2 -1
- package/dist/es/components/Embed/controllers/tracking.d.ts +0 -28
- package/dist/es/components/Embed/index.d.ts +0 -64
- package/dist/es/index.d.ts +0 -1
- package/src/components/Embed/controllers/fetcher.ts +0 -113
- package/src/components/Embed/controllers/tracking.ts +0 -261
- /package/dist/es/{utils → src/utils}/env.d.ts +0 -0
- /package/dist/es/{utils → src/utils}/events.d.ts +0 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
|
3
|
+
import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
|
4
|
+
import type { Environment } from '../../utils/env';
|
5
|
+
import '@vouchfor/media-player';
|
6
|
+
type PlayerEmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
|
7
|
+
env: Environment;
|
8
|
+
apiKey: string;
|
9
|
+
disableTracking?: boolean;
|
10
|
+
trackingSource?: string;
|
11
|
+
vouchId?: string;
|
12
|
+
templateId?: string;
|
13
|
+
questions?: number[];
|
14
|
+
};
|
15
|
+
declare class PlayerEmbed extends LitElement {
|
16
|
+
static styles: import("lit").CSSResult[];
|
17
|
+
data: PlayerEmbedProps['data'];
|
18
|
+
vouchId: PlayerEmbedProps['vouchId'];
|
19
|
+
templateId: PlayerEmbedProps['templateId'];
|
20
|
+
questions: PlayerEmbedProps['questions'];
|
21
|
+
env: PlayerEmbedProps['env'];
|
22
|
+
apiKey: PlayerEmbedProps['apiKey'];
|
23
|
+
disableTracking: PlayerEmbedProps['disableTracking'];
|
24
|
+
trackingSource: PlayerEmbedProps['trackingSource'];
|
25
|
+
controls: PlayerEmbedProps['controls'];
|
26
|
+
preload: PlayerEmbedProps['preload'];
|
27
|
+
autoplay: PlayerEmbedProps['autoplay'];
|
28
|
+
aspectRatio: PlayerEmbedProps['aspectRatio'];
|
29
|
+
private eventController;
|
30
|
+
private _fetcherController;
|
31
|
+
private _trackingController;
|
32
|
+
vouch: PlayerEmbedProps['data'];
|
33
|
+
template: TemplateInstance | undefined;
|
34
|
+
get fetching(): boolean;
|
35
|
+
private _mediaPlayerRef;
|
36
|
+
get waiting(): boolean | undefined;
|
37
|
+
get initialised(): Promise<boolean> | undefined;
|
38
|
+
get seeking(): boolean | undefined;
|
39
|
+
get paused(): boolean | undefined;
|
40
|
+
get captions(): boolean | undefined;
|
41
|
+
get fullscreen(): boolean | undefined;
|
42
|
+
get duration(): number | undefined;
|
43
|
+
set currentTime(value: number);
|
44
|
+
get currentTime(): number;
|
45
|
+
set playbackRate(value: number);
|
46
|
+
get playbackRate(): number;
|
47
|
+
set volume(value: number);
|
48
|
+
get volume(): number;
|
49
|
+
set muted(value: boolean);
|
50
|
+
get muted(): boolean;
|
51
|
+
get scene(): Scene | null;
|
52
|
+
get scenes(): Scene[];
|
53
|
+
get sceneConfig(): Scenes | null;
|
54
|
+
get videoState(): import("@vouchfor/media-player").VideoStateMap | undefined;
|
55
|
+
get mediaPlayer(): MediaPlayer | undefined;
|
56
|
+
play(): void;
|
57
|
+
pause(): void;
|
58
|
+
reset(time?: number, play?: boolean): void;
|
59
|
+
setScene(index: number): void;
|
60
|
+
private _renderStyles;
|
61
|
+
render(): import("lit-html").TemplateResult<1>;
|
62
|
+
}
|
63
|
+
declare global {
|
64
|
+
interface HTMLElementTagNameMap {
|
65
|
+
'vouch-embed-player': PlayerEmbed;
|
66
|
+
}
|
67
|
+
namespace JSX {
|
68
|
+
interface IntrinsicElements {
|
69
|
+
'vouch-embed-player': PlayerEmbed;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
export { PlayerEmbed };
|
74
|
+
export type { PlayerEmbedProps };
|