@vouchfor/embeds 0.0.0-experiment.af36011 → 0.0.0-experiment.b393461
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/browser-e4ee4939.js +433 -0
- package/dist/es/browser-e4ee4939.js.map +1 -0
- package/dist/es/embeds.js +7 -1521
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/index-358857aa.js +9952 -0
- package/dist/es/index-358857aa.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 +6 -3
- package/dist/es/{components → src/components}/Embed/index.d.ts +5 -1
- package/dist/iife/embeds.iife.js +437 -309
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +5 -3
- package/src/components/Embed/Embed.spec.ts +17 -0
- package/src/components/Embed/Embed.stories.ts +14 -1
- package/src/components/Embed/controllers/fetcher.ts +27 -8
- package/src/components/Embed/controllers/tracking.ts +90 -101
- package/src/components/Embed/index.ts +21 -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,21 +9,24 @@ declare class TrackingController implements ReactiveController {
|
|
9
9
|
private _hasPlayed;
|
10
10
|
private _hasLoaded;
|
11
11
|
private _answersViewed;
|
12
|
-
private
|
12
|
+
private _streamStartTime;
|
13
13
|
private _streamLatestTime;
|
14
|
-
private
|
14
|
+
private _currentlyPlayingVideo;
|
15
15
|
constructor(host: EmbedHost);
|
16
16
|
private _findVouchId;
|
17
17
|
private _createVisitor;
|
18
18
|
private _getUids;
|
19
19
|
private _getReportingMetadata;
|
20
20
|
private _sendTrackingEvent;
|
21
|
+
private _streamEnded;
|
21
22
|
private _handleVouchLoaded;
|
22
23
|
private _handlePlay;
|
23
24
|
private _handleVideoPlay;
|
24
|
-
private _handleVideoSeeking;
|
25
25
|
private _handleVideoTimeUpdate;
|
26
26
|
private _handleVideoPause;
|
27
|
+
private _pageUnloading;
|
28
|
+
private _handleVisibilityChange;
|
29
|
+
private _handlePageHide;
|
27
30
|
hostConnected(): void;
|
28
31
|
hostDisconnected(): void;
|
29
32
|
}
|
@@ -1,5 +1,5 @@
|
|
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'> & {
|
@@ -9,12 +9,15 @@ type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'a
|
|
9
9
|
trackingSource?: string;
|
10
10
|
vouchId?: string;
|
11
11
|
templateId?: string;
|
12
|
+
questions?: number[];
|
12
13
|
};
|
13
14
|
declare class Embed extends LitElement {
|
15
|
+
static styles: import("lit").CSSResult[];
|
14
16
|
private _mediaPlayerRef;
|
15
17
|
data: EmbedProps['data'];
|
16
18
|
vouchId: EmbedProps['vouchId'];
|
17
19
|
templateId: EmbedProps['templateId'];
|
20
|
+
questions: EmbedProps['questions'];
|
18
21
|
env: EmbedProps['env'];
|
19
22
|
apiKey: EmbedProps['apiKey'];
|
20
23
|
disableTracking: EmbedProps['disableTracking'];
|
@@ -45,6 +48,7 @@ declare class Embed extends LitElement {
|
|
45
48
|
get muted(): boolean;
|
46
49
|
get scene(): Scene | null;
|
47
50
|
get scenes(): Scene[];
|
51
|
+
get sceneConfig(): Scenes | null;
|
48
52
|
get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
|
49
53
|
get mediaPlayer(): MediaPlayer | undefined;
|
50
54
|
play(): void;
|