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