@vouchfor/embeds 0.0.0-experiment.a913709 → 0.0.0-experiment.a91d11e
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 +0 -7
- package/dist/es/components/Embed/controllers/tracking.d.ts +3 -2
- package/dist/es/components/Embed/index.d.ts +9 -6
- package/dist/es/embeds.js +894 -617
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/utils/env.d.ts +5 -11
- package/dist/iife/embeds.iife.js +310 -366
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Embed/Embed.stories.ts +7 -20
- package/src/components/Embed/controllers/fetcher.ts +63 -45
- package/src/components/Embed/controllers/tracking.ts +64 -57
- package/src/components/Embed/index.ts +12 -18
- package/src/utils/env.ts +18 -32
- package/dist/es/components/Embed/controllers/event-forwarder.d.ts +0 -14
@@ -1,18 +1,11 @@
|
|
1
1
|
import type { Embed } from '..';
|
2
|
-
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
3
2
|
import type { ReactiveControllerHost } from 'lit';
|
4
3
|
type EmbedHost = ReactiveControllerHost & Embed;
|
5
4
|
declare class FetcherController {
|
6
5
|
host: EmbedHost;
|
7
6
|
private _fetching;
|
8
|
-
private _vouch;
|
9
|
-
private _template;
|
10
7
|
set fetching(value: boolean);
|
11
8
|
get fetching(): boolean;
|
12
|
-
set vouch(value: import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined);
|
13
|
-
get vouch(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined;
|
14
|
-
set template(value: TemplateInstance | null);
|
15
|
-
get template(): TemplateInstance | null;
|
16
9
|
private getVouch;
|
17
10
|
private getTemplate;
|
18
11
|
constructor(host: EmbedHost);
|
@@ -9,8 +9,9 @@ declare class TrackingController implements ReactiveController {
|
|
9
9
|
private _hasPlayed;
|
10
10
|
private _hasLoaded;
|
11
11
|
private _answersViewed;
|
12
|
-
private
|
13
|
-
private
|
12
|
+
private _streamStartTime;
|
13
|
+
private _streamLatestTime;
|
14
|
+
private _currentlyPlayingVideo;
|
14
15
|
constructor(host: EmbedHost);
|
15
16
|
private _findVouchId;
|
16
17
|
private _createVisitor;
|
@@ -2,9 +2,11 @@ import { LitElement } from 'lit';
|
|
2
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
|
+
disableTracking?: boolean;
|
9
|
+
trackingSource?: string;
|
8
10
|
vouchId?: string;
|
9
11
|
templateId?: string;
|
10
12
|
};
|
@@ -15,16 +17,17 @@ declare class Embed extends LitElement {
|
|
15
17
|
templateId: EmbedProps['templateId'];
|
16
18
|
env: EmbedProps['env'];
|
17
19
|
apiKey: EmbedProps['apiKey'];
|
20
|
+
disableTracking: EmbedProps['disableTracking'];
|
21
|
+
trackingSource: EmbedProps['trackingSource'];
|
22
|
+
controls: EmbedProps['controls'];
|
18
23
|
preload: EmbedProps['preload'];
|
19
24
|
autoplay: EmbedProps['autoplay'];
|
20
|
-
resolution: EmbedProps['resolution'];
|
21
25
|
aspectRatio: EmbedProps['aspectRatio'];
|
22
|
-
controls: EmbedProps['controls'];
|
23
26
|
private eventController;
|
24
27
|
private _fetcherController;
|
25
28
|
private _trackingController;
|
26
|
-
|
27
|
-
|
29
|
+
vouch: EmbedProps['data'];
|
30
|
+
template: TemplateInstance | undefined;
|
28
31
|
get fetching(): boolean;
|
29
32
|
get waiting(): boolean | undefined;
|
30
33
|
get seeking(): boolean | undefined;
|
@@ -47,7 +50,7 @@ declare class Embed extends LitElement {
|
|
47
50
|
play(): void;
|
48
51
|
pause(): void;
|
49
52
|
setScene(index: number): void;
|
50
|
-
render(): import("lit
|
53
|
+
render(): import("lit").TemplateResult<1>;
|
51
54
|
}
|
52
55
|
declare global {
|
53
56
|
interface HTMLElementTagNameMap {
|