@vouchfor/embeds 0.0.0-experiment.9eba968 → 0.0.0-experiment.a210804
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/browser-af8e1451.js +433 -0
- package/dist/es/browser-af8e1451.js.map +1 -0
- package/dist/es/embeds.js +7 -1499
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/index-34bf8334.js +9948 -0
- package/dist/es/index-34bf8334.js.map +1 -0
- package/dist/es/{components → src/components}/Embed/controllers/fetcher.d.ts +1 -0
- package/dist/es/{components → src/components}/Embed/controllers/tracking.d.ts +7 -2
- package/dist/es/{components → src/components}/Embed/index.d.ts +7 -1
- package/dist/iife/embeds.iife.js +405 -253
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Embed/Embed.stories.ts +14 -1
- package/src/components/Embed/controllers/fetcher.ts +63 -24
- package/src/components/Embed/controllers/tracking.ts +98 -64
- package/src/components/Embed/index.ts +24 -6
- /package/dist/es/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/es/{utils → src/utils}/env.d.ts +0 -0
- /package/dist/es/{utils → src/utils}/events.d.ts +0 -0
@@ -9,19 +9,24 @@ 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;
|
17
18
|
private _getUids;
|
18
19
|
private _getReportingMetadata;
|
19
20
|
private _sendTrackingEvent;
|
21
|
+
private _streamEnded;
|
20
22
|
private _handleVouchLoaded;
|
21
23
|
private _handlePlay;
|
22
24
|
private _handleVideoPlay;
|
23
25
|
private _handleVideoTimeUpdate;
|
24
26
|
private _handleVideoPause;
|
27
|
+
private _pageUnloading;
|
28
|
+
private _handleVisibilityChange;
|
29
|
+
private _handlePageHide;
|
25
30
|
hostConnected(): void;
|
26
31
|
hostDisconnected(): void;
|
27
32
|
}
|
@@ -1,21 +1,26 @@
|
|
1
1
|
import { LitElement } from 'lit';
|
2
|
-
import type { Scene, TemplateInstance } from '@vouchfor/canvas-video';
|
2
|
+
import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
|
3
3
|
import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
|
4
4
|
import type { Environment } from '../../utils/env';
|
5
5
|
type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
|
6
6
|
env: Environment;
|
7
7
|
apiKey: string;
|
8
|
+
disableTracking?: boolean;
|
8
9
|
trackingSource?: string;
|
9
10
|
vouchId?: string;
|
10
11
|
templateId?: string;
|
12
|
+
questions?: number[];
|
11
13
|
};
|
12
14
|
declare class Embed extends LitElement {
|
15
|
+
static styles: import("lit").CSSResult[];
|
13
16
|
private _mediaPlayerRef;
|
14
17
|
data: EmbedProps['data'];
|
15
18
|
vouchId: EmbedProps['vouchId'];
|
16
19
|
templateId: EmbedProps['templateId'];
|
20
|
+
questions: EmbedProps['questions'];
|
17
21
|
env: EmbedProps['env'];
|
18
22
|
apiKey: EmbedProps['apiKey'];
|
23
|
+
disableTracking: EmbedProps['disableTracking'];
|
19
24
|
trackingSource: EmbedProps['trackingSource'];
|
20
25
|
controls: EmbedProps['controls'];
|
21
26
|
preload: EmbedProps['preload'];
|
@@ -43,6 +48,7 @@ declare class Embed extends LitElement {
|
|
43
48
|
get muted(): boolean;
|
44
49
|
get scene(): Scene | null;
|
45
50
|
get scenes(): Scene[];
|
51
|
+
get sceneConfig(): Scenes | null;
|
46
52
|
get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
|
47
53
|
get mediaPlayer(): MediaPlayer | undefined;
|
48
54
|
play(): void;
|