@vouchfor/embeds 0.0.0-experiment.1cdaf7d → 0.0.0-experiment.1edf9a0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/embeds.js +983 -1436
- 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 +75 -0
- package/dist/es/src/components/PlayerEmbed/tests/data.d.ts +4 -0
- package/dist/es/src/components/PlayerEmbed/tests/media-data.d.ts +19 -0
- package/dist/es/src/index.d.ts +2 -1
- package/dist/iife/dialog-embed/embed.iife.js +4042 -0
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -0
- package/dist/iife/embeds.iife.js +3059 -451
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/embed.iife.js +3904 -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} +53 -121
- package/src/components/PlayerEmbed/controllers/tracking/utils.ts +95 -0
- package/src/components/{Embed → PlayerEmbed}/index.ts +99 -43
- package/src/components/PlayerEmbed/tests/PlayerEmbed.spec.ts +87 -0
- package/src/components/PlayerEmbed/tests/data.ts +227 -0
- package/src/components/PlayerEmbed/tests/media-data.ts +22 -0
- package/src/index.ts +2 -1
- package/dist/es/src/components/Embed/index.d.ts +0 -67
@@ -0,0 +1,75 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
3
|
+
import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
|
4
|
+
import type { Vouch } from '@vouchfor/video-utils';
|
5
|
+
import type { PropertyValueMap } from 'lit';
|
6
|
+
import type { Environment } from '../../utils/env';
|
7
|
+
import '@vouchfor/media-player';
|
8
|
+
type PlayerEmbedProps = Pick<MediaPlayerProps, 'aspectRatio' | 'language' | 'preload' | 'autoplay' | 'controls'> & {
|
9
|
+
data?: Vouch;
|
10
|
+
env: Environment;
|
11
|
+
apiKey: string;
|
12
|
+
disableTracking?: boolean;
|
13
|
+
trackingSource?: string;
|
14
|
+
vouchId?: string;
|
15
|
+
templateId?: string;
|
16
|
+
questions?: number[];
|
17
|
+
};
|
18
|
+
declare class PlayerEmbed extends LitElement {
|
19
|
+
static styles: import("lit").CSSResult[];
|
20
|
+
data: PlayerEmbedProps['data'];
|
21
|
+
vouchId: PlayerEmbedProps['vouchId'];
|
22
|
+
templateId: PlayerEmbedProps['templateId'];
|
23
|
+
questions: PlayerEmbedProps['questions'];
|
24
|
+
env: PlayerEmbedProps['env'];
|
25
|
+
apiKey: PlayerEmbedProps['apiKey'];
|
26
|
+
disableTracking: PlayerEmbedProps['disableTracking'];
|
27
|
+
trackingSource: PlayerEmbedProps['trackingSource'];
|
28
|
+
controls: PlayerEmbedProps['controls'];
|
29
|
+
preload: PlayerEmbedProps['preload'];
|
30
|
+
autoplay: PlayerEmbedProps['autoplay'];
|
31
|
+
aspectRatio: PlayerEmbedProps['aspectRatio'];
|
32
|
+
language?: MediaPlayerProps['language'];
|
33
|
+
private eventController;
|
34
|
+
private _fetcherController;
|
35
|
+
private _trackingController;
|
36
|
+
vouch: PlayerEmbedProps['data'];
|
37
|
+
template: TemplateInstance | undefined;
|
38
|
+
get fetching(): boolean;
|
39
|
+
private _mediaPlayerRef;
|
40
|
+
get waiting(): boolean | undefined;
|
41
|
+
get initialised(): Promise<boolean> | undefined;
|
42
|
+
get seeking(): boolean | undefined;
|
43
|
+
get paused(): boolean | undefined;
|
44
|
+
get captions(): boolean | undefined;
|
45
|
+
get fullscreen(): boolean | undefined;
|
46
|
+
get duration(): number | undefined;
|
47
|
+
set currentTime(value: number);
|
48
|
+
get currentTime(): number;
|
49
|
+
set playbackRate(value: number);
|
50
|
+
get playbackRate(): number;
|
51
|
+
set volume(value: number);
|
52
|
+
get volume(): number;
|
53
|
+
set muted(value: boolean);
|
54
|
+
get muted(): boolean;
|
55
|
+
get mediaState(): import("@vouchfor/media-player").MediaStateMap | undefined;
|
56
|
+
get mediaPlayer(): MediaPlayer | undefined;
|
57
|
+
play(): void;
|
58
|
+
pause(): void;
|
59
|
+
reset(time?: number, play?: boolean): void;
|
60
|
+
private _renderStyles;
|
61
|
+
protected willUpdate(changedProperties: PropertyValueMap<PlayerEmbedProps>): void;
|
62
|
+
render(): import("lit-html").TemplateResult<1>;
|
63
|
+
}
|
64
|
+
declare global {
|
65
|
+
interface HTMLElementTagNameMap {
|
66
|
+
'vouch-embed-player': PlayerEmbed;
|
67
|
+
}
|
68
|
+
namespace JSX {
|
69
|
+
interface IntrinsicElements {
|
70
|
+
'vouch-embed-player': PlayerEmbed;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
export { PlayerEmbed };
|
75
|
+
export type { PlayerEmbedProps };
|
@@ -0,0 +1,19 @@
|
|
1
|
+
declare const VIDEOA: {
|
2
|
+
mp4: string;
|
3
|
+
m3u8: string;
|
4
|
+
jpg: string;
|
5
|
+
duration: number;
|
6
|
+
};
|
7
|
+
declare const VIDEOB: {
|
8
|
+
mp4: string;
|
9
|
+
m3u8: string;
|
10
|
+
jpg: string;
|
11
|
+
duration: number;
|
12
|
+
};
|
13
|
+
declare const VIDEOC: {
|
14
|
+
mp4: string;
|
15
|
+
m3u8: string;
|
16
|
+
jpg: string;
|
17
|
+
duration: number;
|
18
|
+
};
|
19
|
+
export { VIDEOA, VIDEOB, VIDEOC };
|
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';
|