@vouchfor/embeds 0.0.0-experiment.254513d → 0.0.0-experiment.25d0b5c
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/browser-1597e474.js +433 -0
- package/dist/es/browser-1597e474.js.map +1 -0
- package/dist/es/embeds.js +10 -1229
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/index-4eaa1a0f.js +10478 -0
- package/dist/es/index-4eaa1a0f.js.map +1 -0
- package/dist/es/src/components/DialogEmbed/DialogOverlay.d.ts +19 -0
- package/dist/es/src/components/DialogEmbed/DialogPortal.d.ts +35 -0
- package/dist/es/src/components/DialogEmbed/index.d.ts +35 -0
- package/dist/es/{components/Embed → src/components/PlayerEmbed}/controllers/event-forwarder.d.ts +6 -5
- package/dist/es/src/components/PlayerEmbed/controllers/fetcher.d.ts +14 -0
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/index.d.ts +36 -0
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +17 -0
- package/dist/es/src/components/PlayerEmbed/tests/data.d.ts +3 -0
- package/dist/es/src/index.d.ts +2 -0
- package/dist/es/src/utils/env.d.ts +12 -0
- package/dist/iife/dialog-embed/browser-e532bdb2.js +433 -0
- package/dist/iife/dialog-embed/browser-e532bdb2.js.map +1 -0
- package/dist/iife/dialog-embed/embed.iife.js +1721 -0
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -0
- package/dist/iife/dialog-embed/embed.js +5 -0
- package/dist/iife/dialog-embed/embed.js.map +1 -0
- package/dist/iife/dialog-embed/index-66dabc80.js +32929 -0
- package/dist/iife/dialog-embed/index-66dabc80.js.map +1 -0
- package/dist/iife/dialog-embed/src/components/DialogEmbed/DialogOverlay.d.ts +19 -0
- package/dist/iife/dialog-embed/src/components/DialogEmbed/DialogPortal.d.ts +35 -0
- package/dist/iife/dialog-embed/src/components/DialogEmbed/index.d.ts +35 -0
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +15 -0
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/fetcher.d.ts +14 -0
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/tracking/index.d.ts +36 -0
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +17 -0
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/tests/data.d.ts +3 -0
- package/dist/iife/dialog-embed/src/index.d.ts +2 -0
- package/dist/iife/dialog-embed/src/utils/env.d.ts +12 -0
- package/dist/iife/dialog-embed/src/utils/events.d.ts +2 -0
- package/dist/iife/embeds.iife.js +584 -350
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/browser-2462cc69.js +433 -0
- package/dist/iife/player-embed/browser-2462cc69.js.map +1 -0
- package/dist/iife/player-embed/embed.iife.js +1585 -0
- package/dist/iife/player-embed/embed.iife.js.map +1 -0
- package/dist/iife/player-embed/embed.js +5 -0
- package/dist/iife/player-embed/embed.js.map +1 -0
- package/dist/iife/player-embed/index-5a09e0ae.js +32486 -0
- package/dist/iife/player-embed/index-5a09e0ae.js.map +1 -0
- package/dist/iife/player-embed/src/components/DialogEmbed/DialogOverlay.d.ts +19 -0
- package/dist/iife/player-embed/src/components/DialogEmbed/DialogPortal.d.ts +35 -0
- package/dist/iife/player-embed/src/components/DialogEmbed/index.d.ts +35 -0
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +15 -0
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/fetcher.d.ts +14 -0
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/tracking/index.d.ts +36 -0
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +17 -0
- package/dist/iife/player-embed/src/components/PlayerEmbed/tests/data.d.ts +3 -0
- package/dist/iife/player-embed/src/index.d.ts +2 -0
- package/dist/iife/player-embed/src/utils/env.d.ts +12 -0
- package/dist/iife/player-embed/src/utils/events.d.ts +2 -0
- package/package.json +17 -9
- package/src/components/DialogEmbed/Dialog.stories.ts +79 -0
- package/src/components/DialogEmbed/DialogOverlay.ts +130 -0
- package/src/components/DialogEmbed/DialogPortal.ts +114 -0
- package/src/components/DialogEmbed/index.ts +93 -0
- package/src/components/{Embed/Embed.stories.ts → PlayerEmbed/PlayerEmbed.stories.ts} +28 -15
- package/src/components/{Embed → PlayerEmbed}/controllers/event-forwarder.ts +6 -5
- package/src/components/PlayerEmbed/controllers/fetcher.ts +152 -0
- package/src/components/PlayerEmbed/controllers/tracking/index.ts +224 -0
- package/src/components/PlayerEmbed/controllers/tracking/utils.ts +95 -0
- package/src/components/PlayerEmbed/index.ts +149 -0
- package/src/components/PlayerEmbed/tests/PlayerEmbed.spec.ts +80 -0
- package/src/components/PlayerEmbed/tests/data.ts +183 -0
- package/src/index.ts +2 -1
- package/src/mixins/media-player-proxy.ts +116 -0
- package/src/utils/env.ts +18 -32
- package/dist/es/components/Embed/controllers/fetcher.d.ts +0 -20
- package/dist/es/components/Embed/controllers/tracking.d.ts +0 -28
- package/dist/es/components/Embed/index.d.ts +0 -62
- package/dist/es/index.d.ts +0 -1
- package/dist/es/utils/env.d.ts +0 -18
- package/src/components/Embed/controllers/fetcher.ts +0 -115
- package/src/components/Embed/controllers/tracking.ts +0 -261
- package/src/components/Embed/index.ts +0 -202
- /package/dist/es/{utils → src/utils}/events.d.ts +0 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
3
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
4
|
+
import { ref } from 'lit/directives/ref.js';
|
5
|
+
|
6
|
+
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
7
|
+
import type { MediaPlayerProps } from '@vouchfor/media-player';
|
8
|
+
import type { Environment } from '~/utils/env';
|
9
|
+
|
10
|
+
import { EventForwardController } from './controllers/event-forwarder';
|
11
|
+
import { FetcherController } from './controllers/fetcher';
|
12
|
+
import { TrackingController } from './controllers/tracking';
|
13
|
+
import { MediaPlayerProxy } from '~/mixins/media-player-proxy';
|
14
|
+
|
15
|
+
import '@vouchfor/media-player';
|
16
|
+
|
17
|
+
type PlayerEmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
|
18
|
+
env: Environment;
|
19
|
+
apiKey: string;
|
20
|
+
disableTracking?: boolean;
|
21
|
+
trackingSource?: string;
|
22
|
+
vouchId?: string;
|
23
|
+
templateId?: string;
|
24
|
+
// Index of the questions to include starting from 1
|
25
|
+
questions?: number[];
|
26
|
+
};
|
27
|
+
|
28
|
+
@customElement('vouch-embed-player')
|
29
|
+
class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
30
|
+
static styles = [
|
31
|
+
css`
|
32
|
+
:host {
|
33
|
+
display: flex;
|
34
|
+
}
|
35
|
+
`
|
36
|
+
];
|
37
|
+
|
38
|
+
@property({ type: Object }) data: PlayerEmbedProps['data'];
|
39
|
+
@property({ type: String }) vouchId: PlayerEmbedProps['vouchId'];
|
40
|
+
@property({ type: String }) templateId: PlayerEmbedProps['templateId'];
|
41
|
+
@property({ type: Array }) questions: PlayerEmbedProps['questions'];
|
42
|
+
|
43
|
+
@property({ type: String }) env: PlayerEmbedProps['env'] = 'prod';
|
44
|
+
@property({ type: String }) apiKey: PlayerEmbedProps['apiKey'] = '';
|
45
|
+
@property({ type: Boolean }) disableTracking: PlayerEmbedProps['disableTracking'] = false;
|
46
|
+
@property({ type: String }) trackingSource: PlayerEmbedProps['trackingSource'] = 'embedded_player';
|
47
|
+
|
48
|
+
@property({ type: Array }) controls: PlayerEmbedProps['controls'];
|
49
|
+
@property({ type: String }) preload: PlayerEmbedProps['preload'] = 'auto';
|
50
|
+
@property({ type: Boolean }) autoplay: PlayerEmbedProps['autoplay'] = false;
|
51
|
+
@property({ type: Number }) aspectRatio: PlayerEmbedProps['aspectRatio'] = 0;
|
52
|
+
|
53
|
+
private eventController = new EventForwardController(this, [
|
54
|
+
'durationchange',
|
55
|
+
'ended',
|
56
|
+
'error',
|
57
|
+
'loadeddata',
|
58
|
+
'pause',
|
59
|
+
'stalled',
|
60
|
+
'play',
|
61
|
+
'playing',
|
62
|
+
'ratechange',
|
63
|
+
'scenechange',
|
64
|
+
'seeking',
|
65
|
+
'seeked',
|
66
|
+
'timeupdate',
|
67
|
+
'volumechange',
|
68
|
+
'waiting',
|
69
|
+
|
70
|
+
'video:loadeddata',
|
71
|
+
'video:seeking',
|
72
|
+
'video:seeked',
|
73
|
+
'video:play',
|
74
|
+
'video:playing',
|
75
|
+
'video:pause',
|
76
|
+
'video:stalled',
|
77
|
+
'video:timeupdate',
|
78
|
+
'video:ended',
|
79
|
+
'video:error'
|
80
|
+
]);
|
81
|
+
private _fetcherController = new FetcherController(this);
|
82
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
83
|
+
// @ts-ignore
|
84
|
+
private _trackingController = new TrackingController(this);
|
85
|
+
|
86
|
+
@state() vouch: PlayerEmbedProps['data'];
|
87
|
+
@state() template: TemplateInstance | undefined;
|
88
|
+
|
89
|
+
get fetching() {
|
90
|
+
return this._fetcherController.fetching;
|
91
|
+
}
|
92
|
+
|
93
|
+
private _renderStyles() {
|
94
|
+
if (!this.aspectRatio) {
|
95
|
+
return html`
|
96
|
+
<style>
|
97
|
+
:host {
|
98
|
+
width: 100%;
|
99
|
+
height: 100%;
|
100
|
+
}
|
101
|
+
</style>
|
102
|
+
`;
|
103
|
+
}
|
104
|
+
|
105
|
+
if (typeof this.aspectRatio === 'number') {
|
106
|
+
return html`
|
107
|
+
<style>
|
108
|
+
:host {
|
109
|
+
aspect-ratio: ${this.aspectRatio};
|
110
|
+
}
|
111
|
+
</style>
|
112
|
+
`;
|
113
|
+
}
|
114
|
+
|
115
|
+
return null;
|
116
|
+
}
|
117
|
+
|
118
|
+
render() {
|
119
|
+
return html`
|
120
|
+
${this._renderStyles()}
|
121
|
+
<vmp-media-player
|
122
|
+
${ref(this._mediaPlayerRef)}
|
123
|
+
${this.eventController.register()}
|
124
|
+
?autoplay=${this.autoplay}
|
125
|
+
?loading=${this.fetching}
|
126
|
+
.data=${this.vouch}
|
127
|
+
.template=${this.template}
|
128
|
+
aspectRatio=${ifDefined(this.aspectRatio)}
|
129
|
+
preload=${ifDefined(this.preload)}
|
130
|
+
.controls=${this.controls}
|
131
|
+
></vmp-media-player>
|
132
|
+
`;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
declare global {
|
137
|
+
interface HTMLElementTagNameMap {
|
138
|
+
'vouch-embed-player': PlayerEmbed;
|
139
|
+
}
|
140
|
+
|
141
|
+
namespace JSX {
|
142
|
+
interface IntrinsicElements {
|
143
|
+
'vouch-embed-player': PlayerEmbed;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
export { PlayerEmbed };
|
149
|
+
export type { PlayerEmbedProps };
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
2
|
+
import { expect, fixture, waitUntil } from '@open-wc/testing';
|
3
|
+
import { html } from 'lit';
|
4
|
+
import sinon from 'sinon';
|
5
|
+
|
6
|
+
import type { PlayerEmbed } from '../index.js';
|
7
|
+
import type { VideoMap } from '@vouchfor/media-player';
|
8
|
+
|
9
|
+
import { data } from './data.js';
|
10
|
+
|
11
|
+
// Can't use typescript aliases with esbuild file transforms apparently
|
12
|
+
// No idea what a good way to actually build before testing is, the examples give nothing
|
13
|
+
// https://modern-web.dev/guides/test-runner/typescript/
|
14
|
+
import '../../../test/lib/embeds.js';
|
15
|
+
|
16
|
+
function getVideo(videos: VideoMap) {
|
17
|
+
return Object.values(videos)[0];
|
18
|
+
}
|
19
|
+
|
20
|
+
function playerLoaded(player: PlayerEmbed) {
|
21
|
+
return waitUntil(
|
22
|
+
() => {
|
23
|
+
return player.mediaPlayer?.initialised;
|
24
|
+
},
|
25
|
+
'Player has not loaded video',
|
26
|
+
{ timeout: 20000 }
|
27
|
+
);
|
28
|
+
}
|
29
|
+
|
30
|
+
describe('Embeds', () => {
|
31
|
+
it('passes', async () => {
|
32
|
+
const player = await fixture<PlayerEmbed>(
|
33
|
+
html`<vouch-embed-player env="dev" .data=${data} aspectratio=${1}></vouch-embed-player>`
|
34
|
+
);
|
35
|
+
// @ts-ignore - accessing private property
|
36
|
+
const sendTrackingSpy = sinon.spy(player._trackingController, '_sendTrackingEvent');
|
37
|
+
// @ts-ignore - accessing private property
|
38
|
+
const createTrackingSpy = sinon.spy(player._trackingController, '_createTrackingEvent');
|
39
|
+
|
40
|
+
await playerLoaded(player);
|
41
|
+
// Have to mute the player because we can't programmatically play videos with sound
|
42
|
+
player.muted = true;
|
43
|
+
player.play();
|
44
|
+
expect(player.paused).eq(false);
|
45
|
+
await waitUntil(
|
46
|
+
() => {
|
47
|
+
// Video plays for 3 seconds
|
48
|
+
return (getVideo(player.mediaPlayer!.videos)?.node?.currentTime ?? 0) > 3;
|
49
|
+
},
|
50
|
+
'Video did not play for 3 seconds',
|
51
|
+
{ timeout: 20000 }
|
52
|
+
);
|
53
|
+
expect(getVideo(player.mediaPlayer!.videos)?.node?.paused).eq(false);
|
54
|
+
player.pause();
|
55
|
+
expect(getVideo(player.mediaPlayer!.videos)?.node?.paused).eq(true);
|
56
|
+
expect(sendTrackingSpy.callCount).to.be.eq(0);
|
57
|
+
// Destroy node because events are sent when node is removed from the document
|
58
|
+
player.remove();
|
59
|
+
expect(sendTrackingSpy.callCount).to.be.eq(1);
|
60
|
+
expect(createTrackingSpy.args[0]).to.eql([
|
61
|
+
'VIDEO_PLAYED',
|
62
|
+
{
|
63
|
+
streamStart: 0
|
64
|
+
}
|
65
|
+
]);
|
66
|
+
expect(createTrackingSpy.args[1]).to.eql([
|
67
|
+
'VOUCH_RESPONSE_VIEWED',
|
68
|
+
{
|
69
|
+
answerId: '5c66bb3a-ed68-41a0-a601-a49865104418'
|
70
|
+
}
|
71
|
+
]);
|
72
|
+
expect(createTrackingSpy.args[2][0]).to.eq('VIDEO_STREAMED');
|
73
|
+
// Remove streamStart and streamEnd as these are non-deterministic
|
74
|
+
expect({ ...createTrackingSpy.args[2][1], streamStart: undefined, streamEnd: undefined }).to.eql({
|
75
|
+
answerId: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
76
|
+
streamStart: undefined,
|
77
|
+
streamEnd: undefined
|
78
|
+
});
|
79
|
+
});
|
80
|
+
});
|
@@ -0,0 +1,183 @@
|
|
1
|
+
import type { Vouch } from '@vouchfor/media-player';
|
2
|
+
|
3
|
+
/* eslint-disable max-lines */
|
4
|
+
const data = {
|
5
|
+
id: '85a7f7fb-897c-41a4-be7b-2636cf991f2c',
|
6
|
+
hashId: '6JQEIPeStt',
|
7
|
+
questions: {
|
8
|
+
items: [
|
9
|
+
{
|
10
|
+
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
11
|
+
title: `"Emoji": 🇯🇵 🙏
|
12
|
+
Arabic: خَرَجَ الوَلَدُ.
|
13
|
+
Chinese: 简化字不讲理
|
14
|
+
Hebrew: עִבְרִית
|
15
|
+
Japanese Kanji: 漢字
|
16
|
+
Japanese Hiragana: 平仮名
|
17
|
+
Japanese Katakana: 片仮名
|
18
|
+
Devangari Hindi: ॳॴॶॷऎऒऔ
|
19
|
+
Korean Hangul: 정음/正音
|
20
|
+
Cyrillic: АБВГДЕЖЗИКЛМН
|
21
|
+
Greek: αβγδ`,
|
22
|
+
answer: {
|
23
|
+
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
24
|
+
label: null,
|
25
|
+
metadata: {
|
26
|
+
duration: 18.5
|
27
|
+
},
|
28
|
+
settings: {
|
29
|
+
endOffset: 0,
|
30
|
+
startOffset: 0
|
31
|
+
},
|
32
|
+
media: {
|
33
|
+
input:
|
34
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418_input.mp4?Policy=eyJTdGF0ZW1lbnQ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5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
37
|
+
playlist:
|
38
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
39
|
+
thumbnail:
|
40
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418_poster.0000001.jpg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTYzMjM0Mjl9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=SGA54MFpy4jaqKJHKEuxRfjk-~NBFAh1tdW9Y6uYJwc0LFjDDgX1sraerSyohmVhj~-QVIrglY5BvglDIhrFcLJWGTkgj4vhyLprk1a7EDckv0HBgp-k1ZKvoDtt3wBOzrL4GicfXBkuMpIu5jv5MY3xemlJj2a6V~h65XJuLO4u-xS~McH6rS3mRxoNl4GcYUVm4upre1DGQx-5Suy6Ateoxl6xxoF8kg5EL02KxkIGiRpwXJTvVmUuVF0rpBj-IE40MfmhLBQ1NNSXiqb3-HjpkKwhYPvB5APVh23mzGmqJ0P3jbr2F1cU4Jvlqsjb6GVP61wGOz9ITeWPZkOy8A__'
|
41
|
+
},
|
42
|
+
client: {
|
43
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
44
|
+
name: 'Not Supplied',
|
45
|
+
logoSrc: 'https://logo.clearbit.com/vouchfor.com?size=260'
|
46
|
+
},
|
47
|
+
contact: {
|
48
|
+
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
49
|
+
name: 'Aaron Williams'
|
50
|
+
},
|
51
|
+
captions: {
|
52
|
+
current:
|
53
|
+
'WEBVTT\n\n1\n00:00:01.549 --> 00:00:05.920\n🇯🇵 🙏 こんにちは 藤森 章 です 。 え ? 今 日本 の え ? 東京 に 住ん で\n\n2\n00:00:05.929 --> 00:00:11.359\nいる 高校 三 年 生 です 。 えっと 父親 が 日本 人 で 母親 が は\n\n3\n00:00:11.619 --> 00:00:13.130\nえー 中国 人 な ん です けれど も 。\n\n4\n00:00:13.939 --> 00:00:17.889\nえ ? 上海 に 行っ た 時 に 国際 学校 に 通っ て い た の で 。\n\n5\n00:00:17.899 --> 00:00:20.389\nえー 英語 を 日本 語 、 中国 語 、 三 語 を しゃ ます\n\n6\n00:00:21.030 --> 00:00:23.549\nえー で 、 その 中 で 経験 し た こと な ん です けれど も 、\n\n7\n00:00:24.040 --> 00:00:26.700\n日本 語 の 素晴らしい ところ って いう の は 、\n\n8\n00:00:27.260 --> 00:00:27.809\nやっぱり\n\n9\n00:00:28.489 --> 00:00:31.540\n和歌 に も 見 られる よう な 多彩 な 表現 力 と\n\n10\n00:00:32.349 --> 00:00:33.819\nえ 奥深い\n\n11\n00:00:34.770 --> 00:00:38.520\nえー 、 感情 表現 など に ある と 思い ます 。 えー これ を 見 て\n\n12\n00:00:38.759 --> 00:00:41.599\n日本 語 に 興味 を 持っ た 方 は 、 是非 その\n\n13\n00:00:43.180 --> 00:00:43.770\n奥深い\n\n14\n00:00:44.299 --> 00:00:45.630\n表現 など を え 、\n\n15\n00:00:46.299 --> 00:00:49.209\n見 て 、 感じ て えー 、 触れ て み て ください 。 ありがとう\n\n16\n00:00:49.220 --> 00:00:49.599\nござい まし た 。\n'
|
54
|
+
}
|
55
|
+
}
|
56
|
+
},
|
57
|
+
{
|
58
|
+
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
59
|
+
// title: "What is the business problem you're trying to solve?",
|
60
|
+
answer: {
|
61
|
+
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
62
|
+
label: 'Hello this label is overridden',
|
63
|
+
metadata: {
|
64
|
+
duration: 18.5
|
65
|
+
},
|
66
|
+
settings: {
|
67
|
+
endOffset: 0.385945945945946,
|
68
|
+
startOffset: 0.3037837837837838,
|
69
|
+
crop: {
|
70
|
+
x: 0.4,
|
71
|
+
y: 0.4,
|
72
|
+
width: 0.4,
|
73
|
+
height: 0.4
|
74
|
+
}
|
75
|
+
},
|
76
|
+
media: {
|
77
|
+
input:
|
78
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418_input.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
79
|
+
video:
|
80
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
81
|
+
playlist:
|
82
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
83
|
+
thumbnail:
|
84
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/5c66bb3a-ed68-41a0-a601-a49865104418/5c66bb3a-ed68-41a0-a601-a49865104418_poster.0000001.jpg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTYzMjM0Mjl9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=SGA54MFpy4jaqKJHKEuxRfjk-~NBFAh1tdW9Y6uYJwc0LFjDDgX1sraerSyohmVhj~-QVIrglY5BvglDIhrFcLJWGTkgj4vhyLprk1a7EDckv0HBgp-k1ZKvoDtt3wBOzrL4GicfXBkuMpIu5jv5MY3xemlJj2a6V~h65XJuLO4u-xS~McH6rS3mRxoNl4GcYUVm4upre1DGQx-5Suy6Ateoxl6xxoF8kg5EL02KxkIGiRpwXJTvVmUuVF0rpBj-IE40MfmhLBQ1NNSXiqb3-HjpkKwhYPvB5APVh23mzGmqJ0P3jbr2F1cU4Jvlqsjb6GVP61wGOz9ITeWPZkOy8A__'
|
85
|
+
},
|
86
|
+
client: {
|
87
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
88
|
+
logoSrc: 'https://logo.clearbit.com/vouchfor.com?size=260'
|
89
|
+
},
|
90
|
+
contact: {
|
91
|
+
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
92
|
+
name: 'Aaron Williams',
|
93
|
+
roleTitle: 'Software Engineer'
|
94
|
+
},
|
95
|
+
captions: {
|
96
|
+
current:
|
97
|
+
"WEBVTT\r\n\r\n1\r\n00:00:01.710 --> 00:00:05.250\r\nwe are trying to solve, uh, world hunger.\r\n\r\n2\r\n00:00:05.420 --> 00:00:08.369\r\nI think it's an important goal. Uh, we\r\n\r\n3\r\n00:00:08.380 --> 00:00:09.489\r\nalso would like to get rid of\r\n\r\n4\r\n00:00:09.500 --> 00:00:12.050\r\ntuberculosis. Um, in general. And\r\n\r\n5\r\n00:00:12.060 --> 00:00:15.329\r\nprobably malaria, too. Uh, it's gonna be\r\n\r\n6\r\n00:00:15.340 --> 00:00:17.180\r\na couple of weeks, but I think we can do\r\n\r\n7\r\n00:00:17.190 --> 00:00:17.319\r\nit.\r\n"
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
{
|
102
|
+
id: 'e77c81a7-f6ef-4eae-91fc-b620d092d8d6',
|
103
|
+
title: 'What are the priorities for your business/team this quarter?',
|
104
|
+
answer: {
|
105
|
+
id: 'e77c81a7-f6ef-4eae-91fc-b620d092d8d6',
|
106
|
+
label: null,
|
107
|
+
metadata: {
|
108
|
+
duration: 16.167
|
109
|
+
},
|
110
|
+
settings: {
|
111
|
+
endOffset: 0,
|
112
|
+
startOffset: 0
|
113
|
+
},
|
114
|
+
media: {
|
115
|
+
input:
|
116
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/e77c81a7-f6ef-4eae-91fc-b620d092d8d6/e77c81a7-f6ef-4eae-91fc-b620d092d8d6_input.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
117
|
+
video:
|
118
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/e77c81a7-f6ef-4eae-91fc-b620d092d8d6/e77c81a7-f6ef-4eae-91fc-b620d092d8d6.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
119
|
+
playlist:
|
120
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/e77c81a7-f6ef-4eae-91fc-b620d092d8d6/e77c81a7-f6ef-4eae-91fc-b620d092d8d6.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlr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xl6xxoF8kg5EL02KxkIGiRpwXJTvVmUuVF0rpBj-IE40MfmhLBQ1NNSXiqb3-HjpkKwhYPvB5APVh23mzGmqJ0P3jbr2F1cU4Jvlqsjb6GVP61wGOz9ITeWPZkOy8A__'
|
123
|
+
},
|
124
|
+
client: {
|
125
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
126
|
+
name: 'Vouch',
|
127
|
+
logoSrc: 'https://logo.clearbit.com/vouchfor.com?size=260'
|
128
|
+
},
|
129
|
+
contact: {
|
130
|
+
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
131
|
+
name: 'Aaron Williams',
|
132
|
+
roleTitle: 'Software Engineer'
|
133
|
+
},
|
134
|
+
captions: {
|
135
|
+
current:
|
136
|
+
'WEBVTT\r\n\r\n1\r\n00:00:00.709 --> 00:00:03.059\r\npriorities for this business. Uh, for\r\n\r\n2\r\n00:00:03.069 --> 00:00:06.010\r\nthis quarter, uh, to make more money,\r\n\r\n3\r\n00:00:06.019 --> 00:00:09.050\r\nmore profits, Uh, get everything, uh,\r\n\r\n4\r\n00:00:09.069 --> 00:00:13.439\r\nswept away. All our heuristics should be\r\n\r\n5\r\n00:00:13.529 --> 00:00:15.119\r\ntop of the line.\r\n'
|
137
|
+
}
|
138
|
+
}
|
139
|
+
},
|
140
|
+
{
|
141
|
+
id: '39fd188d-a4dc-43b9-bac8-32fd71bfbc90',
|
142
|
+
title: 'What are your biggest pain points?',
|
143
|
+
answer: {
|
144
|
+
id: '39fd188d-a4dc-43b9-bac8-32fd71bfbc90',
|
145
|
+
label: null,
|
146
|
+
metadata: {
|
147
|
+
duration: 13.792
|
148
|
+
},
|
149
|
+
settings: {
|
150
|
+
endOffset: 0,
|
151
|
+
startOffset: 0
|
152
|
+
},
|
153
|
+
media: {
|
154
|
+
input:
|
155
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/39fd188d-a4dc-43b9-bac8-32fd71bfbc90/39fd188d-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zHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
158
|
+
playlist:
|
159
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/39fd188d-a4dc-43b9-bac8-32fd71bfbc90/39fd188d-a4dc-43b9-bac8-32fd71bfbc90.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTQ1NDI2MzV9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=vh-ZjBnHDhIIKRe4vr8GHppegY2VIRwXvC~QdX8aV9b5eylmQ~I~EmQ2MKwLOWuQ14DHOF~GU8oAfjXTMWgmZdeu1YzHkDHpQzi1b~NLgipJmpYe9-9OR67MC8jvNTva6OQ5PKsdN6tQBn9vWbBOP5gXEMZLtBP1tsopNu7ZpaUduyPiSVIH5VlWi~KRvMRZnQpHWxfVvnvvxifuk8bODDHh1Ba7MJxrAkdoskzP7xVYO3NbROscTPZ5tKnK9SVt2tnpdW0Aqxj1e2kH6WJhqwgxFfCDqDojMEesx-om71R99U0hMjwDHUF~EDEk6L6wrmD0OfXxbeKd-g5FoTPdJg__',
|
160
|
+
thumbnail:
|
161
|
+
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/39fd188d-a4dc-43b9-bac8-32fd71bfbc90/39fd188d-a4dc-43b9-bac8-32fd71bfbc90_poster.0000001.jpg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTYzMjM0Mjl9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=SGA54MFpy4jaqKJHKEuxRfjk-~NBFAh1tdW9Y6uYJwc0LFjDDgX1sraerSyohmVhj~-QVIrglY5BvglDIhrFcLJWGTkgj4vhyLprk1a7EDckv0HBgp-k1ZKvoDtt3wBOzrL4GicfXBkuMpIu5jv5MY3xemlJj2a6V~h65XJuLO4u-xS~McH6rS3mRxoNl4GcYUVm4upre1DGQx-5Suy6Ateoxl6xxoF8kg5EL02KxkIGiRpwXJTvVmUuVF0rpBj-IE40MfmhLBQ1NNSXiqb3-HjpkKwhYPvB5APVh23mzGmqJ0P3jbr2F1cU4Jvlqsjb6GVP61wGOz9ITeWPZkOy8A__'
|
162
|
+
},
|
163
|
+
client: {
|
164
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
165
|
+
name: 'Vouch',
|
166
|
+
logoSrc: 'https://logo.clearbit.com/vouchfor.com?size=260'
|
167
|
+
},
|
168
|
+
contact: {
|
169
|
+
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
170
|
+
name: 'Aaron Williams',
|
171
|
+
roleTitle: 'Software Engineer'
|
172
|
+
},
|
173
|
+
captions: {
|
174
|
+
current:
|
175
|
+
"WEBVTT\r\n\r\n1\r\n00:00:00.790 --> 00:00:03.269\r\nuh, the biggest pain points this this\r\n\r\n2\r\n00:00:03.279 --> 00:00:07.170\r\nquarter. Um, Jerry has been doing the\r\n\r\n3\r\n00:00:07.179 --> 00:00:09.180\r\nworst work that he's ever been doing.\r\n\r\n4\r\n00:00:09.390 --> 00:00:11.680\r\nAnd we must fire him, Jerry. Goodbye,\r\n\r\n5\r\n00:00:11.689 --> 00:00:12.149\r\nJerry.\r\n"
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
]
|
180
|
+
}
|
181
|
+
} as Vouch;
|
182
|
+
|
183
|
+
export { data };
|
package/src/index.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export {
|
1
|
+
export { PlayerEmbed } from '~/components/PlayerEmbed';
|
2
|
+
export { DialogEmbed } from '~/components/DialogEmbed';
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import { createRef } from 'lit/directives/ref.js';
|
2
|
+
|
3
|
+
import type { Scene, Scenes } from '@vouchfor/canvas-video';
|
4
|
+
import type { MediaPlayer } from '@vouchfor/media-player';
|
5
|
+
import type { LitElement } from 'lit';
|
6
|
+
|
7
|
+
type Constructor<T = Record<string, never>> = new (...args: any[]) => T;
|
8
|
+
|
9
|
+
const MediaPlayerProxy = <T extends Constructor<LitElement>>(SuperClass: T) => {
|
10
|
+
class MediaPlayerProxyClass extends SuperClass {
|
11
|
+
protected _mediaPlayerRef = createRef<MediaPlayer>();
|
12
|
+
|
13
|
+
get waiting() {
|
14
|
+
return this._mediaPlayerRef.value?.waiting;
|
15
|
+
}
|
16
|
+
|
17
|
+
get initialised() {
|
18
|
+
return this._mediaPlayerRef.value?.initialised;
|
19
|
+
}
|
20
|
+
|
21
|
+
get seeking() {
|
22
|
+
return this._mediaPlayerRef.value?.seeking;
|
23
|
+
}
|
24
|
+
|
25
|
+
get paused() {
|
26
|
+
return this._mediaPlayerRef.value?.paused;
|
27
|
+
}
|
28
|
+
|
29
|
+
get captions() {
|
30
|
+
return this._mediaPlayerRef.value?.captions;
|
31
|
+
}
|
32
|
+
|
33
|
+
get fullscreen() {
|
34
|
+
return this._mediaPlayerRef.value?.fullscreen;
|
35
|
+
}
|
36
|
+
|
37
|
+
get duration() {
|
38
|
+
return this._mediaPlayerRef.value?.duration;
|
39
|
+
}
|
40
|
+
|
41
|
+
set currentTime(value: number) {
|
42
|
+
if (this._mediaPlayerRef.value) {
|
43
|
+
this._mediaPlayerRef.value.currentTime = value;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
get currentTime() {
|
47
|
+
return this._mediaPlayerRef.value?.currentTime ?? 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
set playbackRate(value: number) {
|
51
|
+
if (this._mediaPlayerRef.value) {
|
52
|
+
this._mediaPlayerRef.value.playbackRate = value;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
get playbackRate() {
|
56
|
+
return this._mediaPlayerRef.value?.playbackRate ?? 1;
|
57
|
+
}
|
58
|
+
|
59
|
+
set volume(value: number) {
|
60
|
+
if (this._mediaPlayerRef.value) {
|
61
|
+
this._mediaPlayerRef.value.volume = value;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
get volume() {
|
65
|
+
return this._mediaPlayerRef.value?.volume ?? 1;
|
66
|
+
}
|
67
|
+
|
68
|
+
set muted(value: boolean) {
|
69
|
+
if (this._mediaPlayerRef.value) {
|
70
|
+
this._mediaPlayerRef.value.muted = value;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
get muted() {
|
74
|
+
return this._mediaPlayerRef.value?.muted ?? false;
|
75
|
+
}
|
76
|
+
|
77
|
+
get scene(): Scene | null {
|
78
|
+
return this._mediaPlayerRef.value?.scene ?? null;
|
79
|
+
}
|
80
|
+
|
81
|
+
get scenes(): Scene[] {
|
82
|
+
return this._mediaPlayerRef.value?.scenes ?? [];
|
83
|
+
}
|
84
|
+
|
85
|
+
get sceneConfig(): Scenes | null {
|
86
|
+
return this._mediaPlayerRef.value?.sceneConfig ?? null;
|
87
|
+
}
|
88
|
+
|
89
|
+
get videoState() {
|
90
|
+
return this._mediaPlayerRef.value?.videoState;
|
91
|
+
}
|
92
|
+
|
93
|
+
get mediaPlayer() {
|
94
|
+
return this._mediaPlayerRef.value;
|
95
|
+
}
|
96
|
+
|
97
|
+
play() {
|
98
|
+
this._mediaPlayerRef.value?.play();
|
99
|
+
}
|
100
|
+
|
101
|
+
pause() {
|
102
|
+
this._mediaPlayerRef.value?.pause();
|
103
|
+
}
|
104
|
+
|
105
|
+
reset(time = 0, play = false) {
|
106
|
+
this._mediaPlayerRef.value?.reset(time, play);
|
107
|
+
}
|
108
|
+
|
109
|
+
setScene(index: number) {
|
110
|
+
this._mediaPlayerRef.value?.setScene(index);
|
111
|
+
}
|
112
|
+
}
|
113
|
+
return MediaPlayerProxyClass;
|
114
|
+
};
|
115
|
+
|
116
|
+
export { MediaPlayerProxy };
|
package/src/utils/env.ts
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
-
type Environment = 'dev' | 'staging' | 'prod';
|
1
|
+
type Environment = 'local' | 'dev' | 'staging' | 'prod';
|
2
2
|
|
3
3
|
type GetEnvUrlsReturn = {
|
4
|
-
marketingUrl: string;
|
5
4
|
videoUrl: string;
|
6
5
|
publicApiUrl: string;
|
7
6
|
embedApiUrl: string;
|
8
|
-
publicRecorderUrl: string;
|
9
7
|
};
|
10
8
|
|
11
|
-
const marketingUrl = 'https://vouchfor.com';
|
12
|
-
|
13
9
|
const devVideoUrl = 'https://d2rxhdlm2q91uk.cloudfront.net';
|
14
10
|
const stagingVideoUrl = 'https://d1ix11aj5kfygl.cloudfront.net';
|
15
11
|
const prodVideoUrl = 'https://d157jlwnudd93d.cloudfront.net';
|
@@ -18,61 +14,51 @@ const devPublicApiUrl = 'https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws
|
|
18
14
|
const stagingPublicApiUrl = 'https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging';
|
19
15
|
const prodPublicApiUrl = 'https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod';
|
20
16
|
|
21
|
-
const
|
22
|
-
const
|
23
|
-
const
|
24
|
-
|
25
|
-
const devPublicRecorderUrl = 'https://dev.vouchfor.com';
|
26
|
-
const stagingPublicRecorderUrl = 'https://staging.vouchfor.com';
|
27
|
-
const prodPublicRecorderUrl = 'https://app.vouchfor.com';
|
17
|
+
const localEmbedApiUrl = 'http://localhost:6060/v2';
|
18
|
+
const devEmbedApiUrl = 'https://embed-dev.vouchfor.com/v2';
|
19
|
+
const stagingEmbedApiUrl = 'https://embed-staging.vouchfor.com/v2';
|
20
|
+
const prodEmbedApiUrl = 'https://embed.vouchfor.com/v2';
|
28
21
|
|
29
22
|
// We are handling the case where env is an unknown string so the ts error is a lie
|
30
23
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
31
24
|
// @ts-ignore
|
32
25
|
function getEnvUrls(env: Environment): GetEnvUrlsReturn {
|
33
|
-
if (!['dev', 'staging', 'prod'].includes(env)) {
|
26
|
+
if (!['local', 'dev', 'staging', 'prod'].includes(env)) {
|
34
27
|
throw new Error(`Unknown environment: ${env}`);
|
35
28
|
}
|
36
29
|
|
30
|
+
if (env === 'local') {
|
31
|
+
return {
|
32
|
+
videoUrl: devVideoUrl,
|
33
|
+
publicApiUrl: devPublicApiUrl,
|
34
|
+
embedApiUrl: localEmbedApiUrl
|
35
|
+
};
|
36
|
+
}
|
37
|
+
|
37
38
|
if (env === 'dev') {
|
38
39
|
return {
|
39
|
-
marketingUrl,
|
40
40
|
videoUrl: devVideoUrl,
|
41
41
|
publicApiUrl: devPublicApiUrl,
|
42
|
-
embedApiUrl: devEmbedApiUrl
|
43
|
-
publicRecorderUrl: devPublicRecorderUrl
|
42
|
+
embedApiUrl: devEmbedApiUrl
|
44
43
|
};
|
45
44
|
}
|
46
45
|
|
47
46
|
if (env === 'staging') {
|
48
47
|
return {
|
49
|
-
marketingUrl,
|
50
48
|
videoUrl: stagingVideoUrl,
|
51
49
|
publicApiUrl: stagingPublicApiUrl,
|
52
|
-
embedApiUrl: stagingEmbedApiUrl
|
53
|
-
publicRecorderUrl: stagingPublicRecorderUrl
|
50
|
+
embedApiUrl: stagingEmbedApiUrl
|
54
51
|
};
|
55
52
|
}
|
56
53
|
|
57
54
|
if (env === 'prod') {
|
58
55
|
return {
|
59
|
-
marketingUrl,
|
60
56
|
videoUrl: prodVideoUrl,
|
61
57
|
publicApiUrl: prodPublicApiUrl,
|
62
|
-
embedApiUrl: prodEmbedApiUrl
|
63
|
-
publicRecorderUrl: prodPublicRecorderUrl
|
58
|
+
embedApiUrl: prodEmbedApiUrl
|
64
59
|
};
|
65
60
|
}
|
66
61
|
}
|
67
62
|
|
68
|
-
export {
|
69
|
-
marketingUrl,
|
70
|
-
devEmbedApiUrl,
|
71
|
-
stagingEmbedApiUrl,
|
72
|
-
prodEmbedApiUrl,
|
73
|
-
devPublicRecorderUrl,
|
74
|
-
stagingPublicRecorderUrl,
|
75
|
-
prodPublicRecorderUrl,
|
76
|
-
getEnvUrls
|
77
|
-
};
|
63
|
+
export { devEmbedApiUrl, stagingEmbedApiUrl, prodEmbedApiUrl, getEnvUrls };
|
78
64
|
export type { Environment };
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import type { Embed } from '..';
|
2
|
-
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
3
|
-
import type { ReactiveControllerHost } from 'lit';
|
4
|
-
type EmbedHost = ReactiveControllerHost & Embed;
|
5
|
-
declare class FetcherController {
|
6
|
-
host: EmbedHost;
|
7
|
-
private _fetching;
|
8
|
-
private _vouch?;
|
9
|
-
private _template?;
|
10
|
-
set fetching(value: boolean);
|
11
|
-
get fetching(): boolean;
|
12
|
-
set vouch(value: import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | undefined);
|
13
|
-
get vouch(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | undefined;
|
14
|
-
set template(value: TemplateInstance | undefined);
|
15
|
-
get template(): TemplateInstance | undefined;
|
16
|
-
private getVouch;
|
17
|
-
private getTemplate;
|
18
|
-
constructor(host: EmbedHost);
|
19
|
-
}
|
20
|
-
export { FetcherController };
|