@vouchfor/embeds 0.0.0-experiment.2da2c49 → 0.0.0-experiment.2dc922f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/embeds.js +1038 -9
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/src/components/DialogEmbed/DialogOverlay.d.ts +4 -3
- package/dist/es/src/components/DialogEmbed/DialogPortal.d.ts +3 -2
- package/dist/es/src/components/DialogEmbed/index.d.ts +5 -3
- package/dist/es/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +4 -3
- package/dist/es/src/components/PlayerEmbed/controllers/fetcher.d.ts +3 -2
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/index.d.ts +4 -2
- package/dist/es/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +4 -3
- package/dist/es/src/components/PlayerEmbed/index.d.ts +76 -0
- package/dist/es/src/components/PlayerEmbed/tests/data.d.ts +4 -2
- package/dist/es/src/components/PlayerEmbed/tests/media-data.d.ts +19 -0
- package/dist/iife/dialog-embed/embed.iife.js +2752 -394
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -1
- package/dist/iife/embeds.iife.js +2752 -394
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/embed.iife.js +2726 -370
- package/dist/iife/player-embed/embed.iife.js.map +1 -1
- package/package.json +44 -38
- package/src/components/DialogEmbed/Dialog.stories.ts +12 -0
- package/src/components/DialogEmbed/DialogOverlay.ts +2 -1
- package/src/components/DialogEmbed/DialogPortal.ts +22 -10
- package/src/components/DialogEmbed/index.ts +5 -1
- package/src/components/PlayerEmbed/MultiEmbed.stories.ts +135 -0
- package/src/components/PlayerEmbed/PlayerEmbed.stories.ts +18 -2
- package/src/components/PlayerEmbed/controllers/tracking/index.ts +10 -10
- package/src/components/PlayerEmbed/controllers/tracking/utils.ts +1 -1
- package/src/components/PlayerEmbed/index.ts +123 -7
- package/src/components/PlayerEmbed/tests/PlayerEmbed.spec.ts +14 -7
- package/src/components/PlayerEmbed/tests/data.ts +121 -77
- package/src/components/PlayerEmbed/tests/media-data.ts +22 -0
- package/dist/es/browser-17f8a53b.js +0 -433
- package/dist/es/browser-17f8a53b.js.map +0 -1
- package/dist/es/index-747e8b52.js +0 -10478
- package/dist/es/index-747e8b52.js.map +0 -1
- package/dist/iife/dialog-embed/browser-2436b04a.js +0 -433
- package/dist/iife/dialog-embed/browser-2436b04a.js.map +0 -1
- package/dist/iife/dialog-embed/embed.js +0 -5
- package/dist/iife/dialog-embed/embed.js.map +0 -1
- package/dist/iife/dialog-embed/index-c39a015a.js +0 -32937
- package/dist/iife/dialog-embed/index-c39a015a.js.map +0 -1
- package/dist/iife/dialog-embed/src/components/DialogEmbed/DialogOverlay.d.ts +0 -19
- package/dist/iife/dialog-embed/src/components/DialogEmbed/DialogPortal.d.ts +0 -35
- package/dist/iife/dialog-embed/src/components/DialogEmbed/index.d.ts +0 -35
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +0 -15
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/fetcher.d.ts +0 -14
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/tracking/index.d.ts +0 -36
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +0 -17
- package/dist/iife/dialog-embed/src/components/PlayerEmbed/tests/data.d.ts +0 -3
- package/dist/iife/dialog-embed/src/index.d.ts +0 -2
- package/dist/iife/dialog-embed/src/utils/env.d.ts +0 -12
- package/dist/iife/dialog-embed/src/utils/events.d.ts +0 -2
- package/dist/iife/player-embed/browser-88dbf1ce.js +0 -433
- package/dist/iife/player-embed/browser-88dbf1ce.js.map +0 -1
- package/dist/iife/player-embed/embed.js +0 -5
- package/dist/iife/player-embed/embed.js.map +0 -1
- package/dist/iife/player-embed/index-601226fd.js +0 -32494
- package/dist/iife/player-embed/index-601226fd.js.map +0 -1
- package/dist/iife/player-embed/src/components/DialogEmbed/DialogOverlay.d.ts +0 -19
- package/dist/iife/player-embed/src/components/DialogEmbed/DialogPortal.d.ts +0 -35
- package/dist/iife/player-embed/src/components/DialogEmbed/index.d.ts +0 -35
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/event-forwarder.d.ts +0 -15
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/fetcher.d.ts +0 -14
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/tracking/index.d.ts +0 -36
- package/dist/iife/player-embed/src/components/PlayerEmbed/controllers/tracking/utils.d.ts +0 -17
- package/dist/iife/player-embed/src/components/PlayerEmbed/tests/data.d.ts +0 -3
- package/dist/iife/player-embed/src/index.d.ts +0 -2
- package/dist/iife/player-embed/src/utils/env.d.ts +0 -12
- package/dist/iife/player-embed/src/utils/events.d.ts +0 -2
- package/src/mixins/media-player-proxy.ts +0 -116
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
|
2
2
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
|
-
import { ref } from 'lit/directives/ref.js';
|
|
4
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
5
|
|
|
6
6
|
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
|
7
|
-
import type { MediaPlayerProps } from '@vouchfor/media-player';
|
|
7
|
+
import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
|
|
8
|
+
import type { Vouch } from '@vouchfor/video-utils';
|
|
9
|
+
import type { PropertyValueMap } from 'lit';
|
|
8
10
|
import type { Environment } from '~/utils/env';
|
|
9
11
|
|
|
10
12
|
import { EventForwardController } from './controllers/event-forwarder';
|
|
11
13
|
import { FetcherController } from './controllers/fetcher';
|
|
12
14
|
import { TrackingController } from './controllers/tracking';
|
|
13
|
-
import { MediaPlayerProxy } from '~/mixins/media-player-proxy';
|
|
14
15
|
|
|
15
16
|
import '@vouchfor/media-player';
|
|
16
17
|
|
|
17
|
-
type PlayerEmbedProps = Pick<MediaPlayerProps, '
|
|
18
|
+
type PlayerEmbedProps = Pick<MediaPlayerProps, 'aspectRatio' | 'language' | 'preload' | 'autoplay' | 'controls'> & {
|
|
19
|
+
data?: Vouch;
|
|
18
20
|
env: Environment;
|
|
19
21
|
apiKey: string;
|
|
20
22
|
disableTracking?: boolean;
|
|
@@ -23,10 +25,11 @@ type PlayerEmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload
|
|
|
23
25
|
templateId?: string;
|
|
24
26
|
// Index of the questions to include starting from 1
|
|
25
27
|
questions?: number[];
|
|
28
|
+
senderId?: string;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
@customElement('vouch-embed-player')
|
|
29
|
-
class PlayerEmbed extends
|
|
32
|
+
class PlayerEmbed extends LitElement {
|
|
30
33
|
static styles = [
|
|
31
34
|
css`
|
|
32
35
|
:host {
|
|
@@ -49,6 +52,8 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
49
52
|
@property({ type: String }) preload: PlayerEmbedProps['preload'] = 'auto';
|
|
50
53
|
@property({ type: Boolean }) autoplay: PlayerEmbedProps['autoplay'] = false;
|
|
51
54
|
@property({ type: Number }) aspectRatio: PlayerEmbedProps['aspectRatio'] = 0;
|
|
55
|
+
@property({ type: String }) language?: MediaPlayerProps['language'];
|
|
56
|
+
@property({ type: String }) senderId?: PlayerEmbedProps['senderId'];
|
|
52
57
|
|
|
53
58
|
private eventController = new EventForwardController(this, [
|
|
54
59
|
'durationchange',
|
|
@@ -61,10 +66,12 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
61
66
|
'playing',
|
|
62
67
|
'ratechange',
|
|
63
68
|
'scenechange',
|
|
69
|
+
'scenesupdate',
|
|
64
70
|
'seeking',
|
|
65
71
|
'seeked',
|
|
66
72
|
'timeupdate',
|
|
67
73
|
'volumechange',
|
|
74
|
+
'processing',
|
|
68
75
|
'waiting',
|
|
69
76
|
|
|
70
77
|
'video:loadeddata',
|
|
@@ -73,6 +80,7 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
73
80
|
'video:play',
|
|
74
81
|
'video:playing',
|
|
75
82
|
'video:pause',
|
|
83
|
+
'video:waiting',
|
|
76
84
|
'video:stalled',
|
|
77
85
|
'video:timeupdate',
|
|
78
86
|
'video:ended',
|
|
@@ -90,6 +98,108 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
90
98
|
return this._fetcherController.fetching;
|
|
91
99
|
}
|
|
92
100
|
|
|
101
|
+
private _mediaPlayerRef = createRef<MediaPlayer>();
|
|
102
|
+
|
|
103
|
+
get waiting() {
|
|
104
|
+
return this._mediaPlayerRef.value?.waiting;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
get initialised() {
|
|
108
|
+
return this._mediaPlayerRef.value?.initialised;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
get seeking() {
|
|
112
|
+
return this._mediaPlayerRef.value?.seeking;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
get paused() {
|
|
116
|
+
return this._mediaPlayerRef.value?.paused;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
get captions() {
|
|
120
|
+
return this._mediaPlayerRef.value?.captions;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
get fullscreen() {
|
|
124
|
+
return this._mediaPlayerRef.value?.fullscreen;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
get duration() {
|
|
128
|
+
return this._mediaPlayerRef.value?.duration;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
set currentTime(value: number) {
|
|
132
|
+
if (this._mediaPlayerRef.value) {
|
|
133
|
+
this._mediaPlayerRef.value.currentTime = value;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
get currentTime() {
|
|
137
|
+
return this._mediaPlayerRef.value?.currentTime ?? 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
set playbackRate(value: number) {
|
|
141
|
+
if (this._mediaPlayerRef.value) {
|
|
142
|
+
this._mediaPlayerRef.value.playbackRate = value;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
get playbackRate() {
|
|
146
|
+
return this._mediaPlayerRef.value?.playbackRate ?? 1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
set volume(value: number) {
|
|
150
|
+
if (this._mediaPlayerRef.value) {
|
|
151
|
+
this._mediaPlayerRef.value.volume = value;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
get volume() {
|
|
155
|
+
return this._mediaPlayerRef.value?.volume ?? 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
set muted(value: boolean) {
|
|
159
|
+
if (this._mediaPlayerRef.value) {
|
|
160
|
+
this._mediaPlayerRef.value.muted = value;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
get muted() {
|
|
164
|
+
return this._mediaPlayerRef.value?.muted ?? false;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// get scene(): Scene | null {
|
|
168
|
+
// return this._mediaPlayerRef.value?.scene ?? null;
|
|
169
|
+
// }
|
|
170
|
+
|
|
171
|
+
// get scenes(): Scene[] {
|
|
172
|
+
// return this._mediaPlayerRef.value?.scenes ?? [];
|
|
173
|
+
// }
|
|
174
|
+
|
|
175
|
+
// get sceneConfig(): Scenes | null {
|
|
176
|
+
// return this._mediaPlayerRef.value?.sceneConfig ?? null;
|
|
177
|
+
// }
|
|
178
|
+
|
|
179
|
+
get mediaState() {
|
|
180
|
+
return this._mediaPlayerRef.value?.mediaState;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
get mediaPlayer() {
|
|
184
|
+
return this._mediaPlayerRef.value;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
play() {
|
|
188
|
+
this._mediaPlayerRef.value?.play();
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
pause() {
|
|
192
|
+
this._mediaPlayerRef.value?.pause();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
reset(time = 0, play = false) {
|
|
196
|
+
this._mediaPlayerRef.value?.reset(time, play);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// setScene(index: number) {
|
|
200
|
+
// this._mediaPlayerRef.value?.setScene(index);
|
|
201
|
+
// }
|
|
202
|
+
|
|
93
203
|
private _renderStyles() {
|
|
94
204
|
if (!this.aspectRatio) {
|
|
95
205
|
return html`
|
|
@@ -115,6 +225,13 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
115
225
|
return null;
|
|
116
226
|
}
|
|
117
227
|
|
|
228
|
+
protected willUpdate(changedProperties: PropertyValueMap<PlayerEmbedProps>) {
|
|
229
|
+
// If the vouch this embed is pointing to changes then reset the player
|
|
230
|
+
if (changedProperties.has('vouchId') && this.vouchId !== changedProperties.get('vouchId')) {
|
|
231
|
+
this.reset(0, false);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
118
235
|
render() {
|
|
119
236
|
return html`
|
|
120
237
|
${this._renderStyles()}
|
|
@@ -123,10 +240,9 @@ class PlayerEmbed extends MediaPlayerProxy(LitElement) {
|
|
|
123
240
|
${this.eventController.register()}
|
|
124
241
|
?autoplay=${this.autoplay}
|
|
125
242
|
?loading=${this.fetching}
|
|
126
|
-
.data=${this.vouch}
|
|
127
|
-
.template=${this.template}
|
|
128
243
|
aspectRatio=${ifDefined(this.aspectRatio)}
|
|
129
244
|
preload=${ifDefined(this.preload)}
|
|
245
|
+
language=${ifDefined(this.language)}
|
|
130
246
|
.controls=${this.controls}
|
|
131
247
|
></vmp-media-player>
|
|
132
248
|
`;
|
|
@@ -4,7 +4,7 @@ import { html } from 'lit';
|
|
|
4
4
|
import sinon from 'sinon';
|
|
5
5
|
|
|
6
6
|
import type { PlayerEmbed } from '../index.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { MediaMap } from '@vouchfor/media-player';
|
|
8
8
|
|
|
9
9
|
import { data } from './data.js';
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ import { data } from './data.js';
|
|
|
13
13
|
// https://modern-web.dev/guides/test-runner/typescript/
|
|
14
14
|
import '../../../test/lib/embeds.js';
|
|
15
15
|
|
|
16
|
-
function getVideo(videos:
|
|
16
|
+
function getVideo(videos: MediaMap) {
|
|
17
17
|
return Object.values(videos)[0];
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -27,8 +27,8 @@ function playerLoaded(player: PlayerEmbed) {
|
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
describe('Embeds', () => {
|
|
31
|
-
it('
|
|
30
|
+
describe.skip('Embeds', () => {
|
|
31
|
+
it('Sends correct tracking events', async () => {
|
|
32
32
|
const player = await fixture<PlayerEmbed>(
|
|
33
33
|
html`<vouch-embed-player env="dev" .data=${data} aspectratio=${1}></vouch-embed-player>`
|
|
34
34
|
);
|
|
@@ -45,17 +45,24 @@ describe('Embeds', () => {
|
|
|
45
45
|
await waitUntil(
|
|
46
46
|
() => {
|
|
47
47
|
// Video plays for 3 seconds
|
|
48
|
-
return (getVideo(player.mediaPlayer!.
|
|
48
|
+
return (getVideo(player.mediaPlayer!.media)?.node?.currentTime ?? 0) > 3;
|
|
49
49
|
},
|
|
50
50
|
'Video did not play for 3 seconds',
|
|
51
51
|
{ timeout: 20000 }
|
|
52
52
|
);
|
|
53
|
-
expect(getVideo(player.mediaPlayer!.
|
|
53
|
+
expect(getVideo(player.mediaPlayer!.media)?.node?.paused).eq(false);
|
|
54
54
|
player.pause();
|
|
55
|
-
expect(getVideo(player.mediaPlayer!.
|
|
55
|
+
expect(getVideo(player.mediaPlayer!.media)?.node?.paused).eq(true);
|
|
56
56
|
expect(sendTrackingSpy.callCount).to.be.eq(0);
|
|
57
57
|
// Destroy node because events are sent when node is removed from the document
|
|
58
58
|
player.remove();
|
|
59
|
+
await waitUntil(
|
|
60
|
+
() => {
|
|
61
|
+
return createTrackingSpy.args[2];
|
|
62
|
+
},
|
|
63
|
+
'Cleanup event has not fired',
|
|
64
|
+
{ timeout: 5000 }
|
|
65
|
+
);
|
|
59
66
|
expect(sendTrackingSpy.callCount).to.be.eq(1);
|
|
60
67
|
expect(createTrackingSpy.args[0]).to.eql([
|
|
61
68
|
'VIDEO_PLAYED',
|
|
@@ -1,67 +1,83 @@
|
|
|
1
|
-
import type { Vouch } from '@vouchfor/
|
|
1
|
+
import type { Vouch } from '@vouchfor/video-utils';
|
|
2
|
+
|
|
3
|
+
import { VIDEOA, VIDEOB, VIDEOC } from './media-data';
|
|
2
4
|
|
|
3
5
|
/* eslint-disable max-lines */
|
|
4
|
-
const data = {
|
|
6
|
+
const data: Vouch = {
|
|
5
7
|
id: '85a7f7fb-897c-41a4-be7b-2636cf991f2c',
|
|
6
8
|
hashId: '6JQEIPeStt',
|
|
9
|
+
settings: {
|
|
10
|
+
branding: {
|
|
11
|
+
base: {
|
|
12
|
+
primary: {
|
|
13
|
+
color: '#48aff7',
|
|
14
|
+
text: '#def2ff'
|
|
15
|
+
},
|
|
16
|
+
secondary: {
|
|
17
|
+
color: '#fdbdfa',
|
|
18
|
+
text: '#8b26bf'
|
|
19
|
+
},
|
|
20
|
+
radius: '8px'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
7
24
|
questions: {
|
|
8
25
|
items: [
|
|
9
26
|
{
|
|
10
27
|
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
|
11
|
-
title:
|
|
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: αβγδ`,
|
|
28
|
+
title: "What is the business problem you're trying to solve?",
|
|
22
29
|
answer: {
|
|
23
30
|
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
|
24
31
|
label: null,
|
|
25
32
|
metadata: {
|
|
26
|
-
duration:
|
|
33
|
+
duration: VIDEOA.duration
|
|
27
34
|
},
|
|
28
35
|
settings: {
|
|
29
36
|
endOffset: 0,
|
|
30
37
|
startOffset: 0
|
|
31
38
|
},
|
|
32
39
|
media: {
|
|
33
|
-
input:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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'
|
|
40
|
+
input: VIDEOA.mp4,
|
|
41
|
+
video: VIDEOA.mp4,
|
|
42
|
+
playlist: VIDEOA.m3u8,
|
|
43
|
+
thumbnail: VIDEOA.jpg,
|
|
44
|
+
videos: {
|
|
45
|
+
xs: VIDEOA.mp4
|
|
46
|
+
}
|
|
46
47
|
},
|
|
47
48
|
contact: {
|
|
48
49
|
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
|
49
|
-
name: 'Aaron Williams'
|
|
50
|
+
name: 'Aaron Williams',
|
|
51
|
+
roleTitle: 'Software Engineer',
|
|
52
|
+
client: {
|
|
53
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
|
54
|
+
name: 'Not Supplied',
|
|
55
|
+
logoSrc: 'https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/logos/vouch-logotype-teal.png'
|
|
56
|
+
}
|
|
50
57
|
},
|
|
51
58
|
captions: {
|
|
52
59
|
current:
|
|
60
|
+
"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",
|
|
61
|
+
translation:
|
|
53
62
|
'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'
|
|
63
|
+
},
|
|
64
|
+
transcription: {
|
|
65
|
+
language: 'en',
|
|
66
|
+
translation: {
|
|
67
|
+
language: 'ja'
|
|
68
|
+
},
|
|
69
|
+
items: []
|
|
54
70
|
}
|
|
55
71
|
}
|
|
56
72
|
},
|
|
57
73
|
{
|
|
58
74
|
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
|
59
|
-
|
|
75
|
+
title: "What is the business problem you're trying to solve?",
|
|
60
76
|
answer: {
|
|
61
77
|
id: '5c66bb3a-ed68-41a0-a601-a49865104418',
|
|
62
|
-
label:
|
|
78
|
+
label: null,
|
|
63
79
|
metadata: {
|
|
64
|
-
duration:
|
|
80
|
+
duration: VIDEOA.duration
|
|
65
81
|
},
|
|
66
82
|
settings: {
|
|
67
83
|
endOffset: 0.385945945945946,
|
|
@@ -74,27 +90,33 @@ const data = {
|
|
|
74
90
|
}
|
|
75
91
|
},
|
|
76
92
|
media: {
|
|
77
|
-
input:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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'
|
|
93
|
+
input: VIDEOA.mp4,
|
|
94
|
+
video: VIDEOA.mp4,
|
|
95
|
+
playlist: VIDEOA.m3u8,
|
|
96
|
+
thumbnail: VIDEOA.jpg,
|
|
97
|
+
videos: {
|
|
98
|
+
xs: VIDEOA.mp4
|
|
99
|
+
}
|
|
89
100
|
},
|
|
90
101
|
contact: {
|
|
91
102
|
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
|
92
103
|
name: 'Aaron Williams',
|
|
93
|
-
roleTitle: 'Software Engineer'
|
|
104
|
+
roleTitle: 'Software Engineer',
|
|
105
|
+
client: {
|
|
106
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
|
107
|
+
logoSrc: 'https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/logos/vouch-logotype-teal.png'
|
|
108
|
+
}
|
|
94
109
|
},
|
|
95
110
|
captions: {
|
|
96
111
|
current:
|
|
97
112
|
"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"
|
|
113
|
+
},
|
|
114
|
+
transcription: {
|
|
115
|
+
language: 'en',
|
|
116
|
+
translation: {
|
|
117
|
+
language: 'fr'
|
|
118
|
+
},
|
|
119
|
+
items: []
|
|
98
120
|
}
|
|
99
121
|
}
|
|
100
122
|
},
|
|
@@ -103,72 +125,87 @@ const data = {
|
|
|
103
125
|
title: 'What are the priorities for your business/team this quarter?',
|
|
104
126
|
answer: {
|
|
105
127
|
id: 'e77c81a7-f6ef-4eae-91fc-b620d092d8d6',
|
|
106
|
-
label:
|
|
128
|
+
label: 'Hello this label is overridden',
|
|
107
129
|
metadata: {
|
|
108
|
-
duration:
|
|
130
|
+
duration: VIDEOB.duration
|
|
109
131
|
},
|
|
110
132
|
settings: {
|
|
111
133
|
endOffset: 0,
|
|
112
134
|
startOffset: 0
|
|
113
135
|
},
|
|
114
136
|
media: {
|
|
115
|
-
input:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'https://d2rxhdlm2q91uk.cloudfront.net/TVik9uTMgE/6JQEIPeStt/e77c81a7-f6ef-4eae-91fc-b620d092d8d6/e77c81a7-f6ef-4eae-91fc-b620d092d8d6_poster.0000001.jpg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMnJ4aGRsbTJxOTF1ay5jbG91ZGZyb250Lm5ldC9UVmlrOXVUTWdFLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjIwMTYzMjM0Mjl9fX1dfQ__&Key-Pair-Id=K2SWKOH0FA5F6M&Signature=SGA54MFpy4jaqKJHKEuxRfjk-~NBFAh1tdW9Y6uYJwc0LFjDDgX1sraerSyohmVhj~-QVIrglY5BvglDIhrFcLJWGTkgj4vhyLprk1a7EDckv0HBgp-k1ZKvoDtt3wBOzrL4GicfXBkuMpIu5jv5MY3xemlJj2a6V~h65XJuLO4u-xS~McH6rS3mRxoNl4GcYUVm4upre1DGQx-5Suy6Ateoxl6xxoF8kg5EL02KxkIGiRpwXJTvVmUuVF0rpBj-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'
|
|
137
|
+
input: VIDEOB.mp4,
|
|
138
|
+
video: VIDEOB.mp4,
|
|
139
|
+
playlist: VIDEOB.m3u8,
|
|
140
|
+
thumbnail: VIDEOB.jpg,
|
|
141
|
+
videos: {
|
|
142
|
+
xs: VIDEOB.mp4
|
|
143
|
+
}
|
|
128
144
|
},
|
|
129
145
|
contact: {
|
|
130
146
|
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
|
131
147
|
name: 'Aaron Williams',
|
|
132
|
-
roleTitle: 'Software Engineer'
|
|
148
|
+
roleTitle: 'Software Engineer',
|
|
149
|
+
client: {
|
|
150
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
|
151
|
+
name: 'Vouch',
|
|
152
|
+
logoSrc: 'https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/logos/vouch-logotype-teal.png'
|
|
153
|
+
}
|
|
133
154
|
},
|
|
134
155
|
captions: {
|
|
135
156
|
current:
|
|
136
157
|
'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'
|
|
158
|
+
},
|
|
159
|
+
transcription: {
|
|
160
|
+
language: 'en',
|
|
161
|
+
translation: {
|
|
162
|
+
language: 'de'
|
|
163
|
+
},
|
|
164
|
+
items: []
|
|
137
165
|
}
|
|
138
166
|
}
|
|
139
167
|
},
|
|
140
168
|
{
|
|
141
169
|
id: '39fd188d-a4dc-43b9-bac8-32fd71bfbc90',
|
|
142
|
-
title:
|
|
170
|
+
title: `"Emoji": 🇯🇵 🙏
|
|
171
|
+
\t\t'Arabic': خَرَجَ الوَلَدُ.
|
|
172
|
+
Chinese: 简化字不讲理\f
|
|
173
|
+
Hebrew: עִבְרִית\r\r
|
|
174
|
+
Japanese Kanji: 漢字\n
|
|
175
|
+
\\\\\\///
|
|
176
|
+
Japanese Hiragana: 平仮名
|
|
177
|
+
Japanese Katakana: 片仮名
|
|
178
|
+
Devangari Hindi: ॳॴॶॷऎऒऔ
|
|
179
|
+
Korean Hangul: 정음/正音
|
|
180
|
+
Cyrillic: АБВГДЕЖЗИКЛМН
|
|
181
|
+
Greek: αβγδ`,
|
|
143
182
|
answer: {
|
|
144
183
|
id: '39fd188d-a4dc-43b9-bac8-32fd71bfbc90',
|
|
145
184
|
label: null,
|
|
146
185
|
metadata: {
|
|
147
|
-
duration:
|
|
186
|
+
duration: VIDEOC.duration
|
|
148
187
|
},
|
|
149
188
|
settings: {
|
|
150
189
|
endOffset: 0,
|
|
151
190
|
startOffset: 0
|
|
152
191
|
},
|
|
153
192
|
media: {
|
|
154
|
-
input:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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'
|
|
193
|
+
input: VIDEOC.mp4,
|
|
194
|
+
video: VIDEOC.mp4,
|
|
195
|
+
playlist: VIDEOC.m3u8,
|
|
196
|
+
thumbnail: VIDEOC.jpg,
|
|
197
|
+
videos: {
|
|
198
|
+
xs: VIDEOC.mp4
|
|
199
|
+
}
|
|
167
200
|
},
|
|
168
201
|
contact: {
|
|
169
202
|
id: 'b62f62a3-0cd4-4512-9b52-121cb2f3e72f',
|
|
170
203
|
name: 'Aaron Williams',
|
|
171
|
-
|
|
204
|
+
client: {
|
|
205
|
+
id: '03540d70-1c75-4867-a235-bac842ed6ce4',
|
|
206
|
+
name: 'Vouch',
|
|
207
|
+
logoSrc: 'https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/logos/vouch-logotype-teal.png'
|
|
208
|
+
}
|
|
172
209
|
},
|
|
173
210
|
captions: {
|
|
174
211
|
current:
|
|
@@ -178,6 +215,13 @@ const data = {
|
|
|
178
215
|
}
|
|
179
216
|
]
|
|
180
217
|
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const withNullAnswer = {
|
|
221
|
+
...data,
|
|
222
|
+
questions: {
|
|
223
|
+
items: [...data.questions.items, { id: 'null', answer: null }]
|
|
224
|
+
}
|
|
181
225
|
} as Vouch;
|
|
182
226
|
|
|
183
|
-
export { data };
|
|
227
|
+
export { data, withNullAnswer };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const VIDEOA = {
|
|
2
|
+
mp4: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/01/output.mp4',
|
|
3
|
+
m3u8: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/01/master.m3u8',
|
|
4
|
+
jpg: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/01/output.jpg',
|
|
5
|
+
duration: 7.29
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const VIDEOB = {
|
|
9
|
+
mp4: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/02/output.mp4',
|
|
10
|
+
m3u8: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/02/master.m3u8',
|
|
11
|
+
jpg: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/02/output.jpg',
|
|
12
|
+
duration: 40.4
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const VIDEOC = {
|
|
16
|
+
mp4: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/03/output.mp4',
|
|
17
|
+
m3u8: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/03/master.m3u8',
|
|
18
|
+
jpg: 'https://media-player-test-videos.s3.ap-southeast-2.amazonaws.com/03/output.jpg',
|
|
19
|
+
duration: 30.33
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { VIDEOA, VIDEOB, VIDEOC };
|