@vouchfor/embeds 0.0.0-experiment.bb1a5cf → 0.0.0-experiment.de04f63

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+ import type { Embed } from '..';
2
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
+ type EmbedHost = ReactiveControllerHost & Embed;
4
+ declare class EventForwardController implements ReactiveController {
5
+ host: EmbedHost;
6
+ private _events;
7
+ private _cleanup;
8
+ private _forwardElementRef;
9
+ constructor(host: EmbedHost, events: string[]);
10
+ register(): import("lit-html/directive.js").DirectiveResult<typeof import("lit-html/directives/ref.js").RefDirective>;
11
+ hostConnected(): void;
12
+ hostDisconnected(): void;
13
+ }
14
+ export { EventForwardController };
@@ -0,0 +1,8 @@
1
+ import type { Embed } from '..';
2
+ import type { ReactiveControllerHost } from 'lit';
3
+ type EmbedHost = ReactiveControllerHost & Embed;
4
+ declare class FetcherController {
5
+ host: EmbedHost;
6
+ constructor(host: EmbedHost);
7
+ }
8
+ export { FetcherController };
@@ -0,0 +1,28 @@
1
+ import type { Embed } from '..';
2
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
+ type EmbedHost = ReactiveControllerHost & Embed;
4
+ declare class TrackingController implements ReactiveController {
5
+ host: EmbedHost;
6
+ private _tabId;
7
+ private _clientId;
8
+ private _visitorId;
9
+ private _hasPlayed;
10
+ private _hasLoaded;
11
+ private _answersViewed;
12
+ private _streamedTime;
13
+ private _streamedPrevTimestamp;
14
+ constructor(host: EmbedHost);
15
+ private _findVouchId;
16
+ private _createVisitor;
17
+ private _getUids;
18
+ private _getReportingMetadata;
19
+ private _sendTrackingEvent;
20
+ private _handleVouchLoaded;
21
+ private _handlePlay;
22
+ private _handleVideoPlay;
23
+ private _handleVideoTimeUpdate;
24
+ private _handleVideoPause;
25
+ hostConnected(): void;
26
+ hostDisconnected(): void;
27
+ }
28
+ export { TrackingController };
@@ -0,0 +1,65 @@
1
+ import { LitElement } from 'lit';
2
+ import type { Scene } from '@vouchfor/canvas-video';
3
+ import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
4
+ import type { Environment } from '../../utils/env';
5
+ type EmbedProps = Pick<MediaPlayerProps, 'data' | 'resolution' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
6
+ env: Environment;
7
+ apiKey: string;
8
+ vouchHashId?: string;
9
+ enableTracking?: boolean;
10
+ trackingSource?: string;
11
+ };
12
+ declare class Embed extends LitElement {
13
+ private _mediaPlayerRef;
14
+ propData: EmbedProps['data'];
15
+ vouchHashId: EmbedProps['vouchHashId'];
16
+ env: EmbedProps['env'];
17
+ apiKey: EmbedProps['apiKey'];
18
+ preload: EmbedProps['preload'];
19
+ autoplay: EmbedProps['autoplay'];
20
+ enableTracking: EmbedProps['enableTracking'];
21
+ trackingSource: EmbedProps['trackingSource'];
22
+ resolution: EmbedProps['resolution'];
23
+ aspectRatio: EmbedProps['aspectRatio'];
24
+ controls: EmbedProps['controls'];
25
+ data: MediaPlayerProps['data'];
26
+ instance: MediaPlayerProps['instance'];
27
+ fetching: boolean;
28
+ private eventController;
29
+ private trackingController;
30
+ private fetcherController;
31
+ get waiting(): boolean | undefined;
32
+ get seeking(): boolean | undefined;
33
+ get paused(): boolean | undefined;
34
+ get captions(): boolean | undefined;
35
+ get fullscreen(): boolean | undefined;
36
+ get duration(): number | undefined;
37
+ set currentTime(value: number);
38
+ get currentTime(): number;
39
+ set playbackRate(value: number);
40
+ get playbackRate(): number;
41
+ set volume(value: number);
42
+ get volume(): number;
43
+ set muted(value: boolean);
44
+ get muted(): boolean;
45
+ get scene(): Scene | null;
46
+ get scenes(): Scene[];
47
+ get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
48
+ get mediaPlayer(): MediaPlayer | undefined;
49
+ play(): void;
50
+ pause(): void;
51
+ setScene(index: number): void;
52
+ render(): import("lit-html").TemplateResult<1>;
53
+ }
54
+ declare global {
55
+ interface HTMLElementTagNameMap {
56
+ 'vouch-embed': Embed;
57
+ }
58
+ namespace JSX {
59
+ interface IntrinsicElements {
60
+ 'vouch-embed': Embed;
61
+ }
62
+ }
63
+ }
64
+ export { Embed };
65
+ export type { EmbedProps };