@clickview/player 0.0.8-dev.2 → 0.0.8-dev.4
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/libs/shared/src/apps/search/interfaces/SearchFilter.d.ts +1 -0
- package/dist/libs/shared/src/components/actions/Actions.d.ts +1 -0
- package/dist/libs/shared/src/components/avatar/Avatar.d.ts +1 -0
- package/dist/libs/shared/src/components/feedback-tooltip/FeedbackTooltip.d.ts +1 -0
- package/dist/libs/shared/src/components/image-cropper/SimpleCropper.d.ts +1 -0
- package/dist/libs/shared/src/components/immersive-reader/ImmersiveReader.d.ts +1 -0
- package/dist/libs/shared/src/components/interaction-answers/multiple-choice/MultipleChoiceInteractionAnswers.d.ts +1 -0
- package/dist/libs/shared/src/components/interaction-answers/true-or-false/TrueOrFalseInteractionAnswers.d.ts +1 -0
- package/dist/libs/shared/src/components/interactive-questions/InteractionLabel.d.ts +1 -0
- package/dist/libs/shared/src/components/svg-container/SvgContainer.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/models/VideoHistory.d.ts +3 -1
- package/dist/player-app.js +4 -4
- package/dist/projects/player/src/components/cog-button/cog-button.d.ts +3 -0
- package/dist/projects/player/src/components/text-track-button/off-text-track-menu-item.d.ts +1 -0
- package/dist/projects/player/src/components/text-track-button/text-track-button.d.ts +1 -0
- package/dist/projects/player/src/players/base-player.d.ts +1 -0
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/timepoint-interactions/timepoint-interactions.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-annotation/create-annotation-link.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/create-image-cropper.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/upload-image-icon.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-missing-word/create-missing-word.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-multiple-choice/create-multiple-choice.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-multiple-choice/multiple-choice-answer.d.ts +1 -0
- package/package.json +3 -3
- package/.storybook/main.js +0 -23
- package/.storybook/preview-head.html +0 -4
- package/.storybook/stories/Base.stories.tsx +0 -133
- package/.storybook/stories/Clips.stories.tsx +0 -80
- package/.storybook/stories/Interactives.stories.tsx +0 -64
- package/.storybook/stories/Resources.stories.tsx +0 -15
- package/.storybook/stories/Subtitles.stories.tsx +0 -22
- package/.storybook/stories/assets/chapters.vtt +0 -19
- package/.storybook/stories/assets/en.vtt +0 -8
- package/.storybook/stories/assets/es.vtt +0 -8
- package/.storybook/stories/assets/fr.vtt +0 -8
- package/.storybook/stories/assets/interactive.json +0 -451
- package/.storybook/stories/assets/sample_1280x720.mp4.jpg +0 -0
- package/.storybook/stories/assets/sample_1280x720.mp4.vtx +0 -0
- package/.storybook/stories/assets/thumbnails.vtt +0 -62
- package/.storybook/stories/assets/vertical.mp4 +0 -0
- package/.storybook/stories/utils/Wrap.tsx +0 -18
- package/.storybook/stories/utils/mock-playerapi.ts +0 -361
- package/.storybook/stories/utils/mock-setup.ts +0 -16
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import { PlaybackObject, Files, Chapters, Subtitles, LocalCacheAddress, Resources } from '../../../src/interfaces/models/PlaybackObject';
|
|
2
|
-
|
|
3
|
-
import interactive from '../assets/interactive.json';
|
|
4
|
-
|
|
5
|
-
const basicFiles = <Files> {
|
|
6
|
-
progressive: [{
|
|
7
|
-
url: 'https://static.clickview.com.au/testvideos/vpsbenchmark.mp4',
|
|
8
|
-
mimeType: 'video/mp4',
|
|
9
|
-
profile: '720'
|
|
10
|
-
}]
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const multipleFiles = <Files> {
|
|
14
|
-
progressive: [{
|
|
15
|
-
mimeType: 'video/mp4',
|
|
16
|
-
profile: '240',
|
|
17
|
-
url: 'https://static.clickview.com.au/testvideos/vpsbenchmark.mp4?quality=240'
|
|
18
|
-
},{
|
|
19
|
-
mimeType: 'video/mp4',
|
|
20
|
-
profile: '720',
|
|
21
|
-
url: 'https://static.clickview.com.au/testvideos/vpsbenchmark.mp4?quality=720'
|
|
22
|
-
}]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const emptyChapters = <Chapters> {
|
|
26
|
-
list: []
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const mockChapters = <Chapters> {
|
|
30
|
-
list: [{
|
|
31
|
-
name: 'Waves',
|
|
32
|
-
timestamp: 0,
|
|
33
|
-
endTimestamp: 5
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: 'Some More Waves',
|
|
37
|
-
timestamp: 5,
|
|
38
|
-
endTimestamp: 11
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Waves hitting Rocks',
|
|
42
|
-
timestamp: 11,
|
|
43
|
-
endTimestamp: 13
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'Rocky Rocks',
|
|
47
|
-
timestamp: 13,
|
|
48
|
-
endTimestamp: 20
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'End of waves',
|
|
52
|
-
timestamp: 20,
|
|
53
|
-
endTimestamp: 28
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'Credits',
|
|
57
|
-
timestamp: 28,
|
|
58
|
-
endTimestamp: 600
|
|
59
|
-
}]
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const emptySubtitles = <Subtitles> {
|
|
63
|
-
list: []
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const multipleSubtitles = <Subtitles> {
|
|
67
|
-
list: [{
|
|
68
|
-
label: 'English',
|
|
69
|
-
language: 'en',
|
|
70
|
-
url: './en.vtt',
|
|
71
|
-
mimeType: 'text/vtt'
|
|
72
|
-
}, {
|
|
73
|
-
label: 'Spanish',
|
|
74
|
-
language: 'es',
|
|
75
|
-
url: './es.vtt',
|
|
76
|
-
mimeType: 'text/vtt'
|
|
77
|
-
},{
|
|
78
|
-
label: 'French',
|
|
79
|
-
language: 'fr',
|
|
80
|
-
url: './fr.vtt',
|
|
81
|
-
mimeType: 'text/vtt'
|
|
82
|
-
}]
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const mockResources = <Resources> {
|
|
86
|
-
list: [
|
|
87
|
-
{
|
|
88
|
-
name: "Comprehension Questions",
|
|
89
|
-
url: "https://file.api.stg.cvnet.io/v1/files/d9a638acb5e94845bde68ffcee9f268f",
|
|
90
|
-
metadata: {
|
|
91
|
-
type: 'pdf'
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "Ice Cube",
|
|
96
|
-
url: "https://file.api.stg.cvnet.io/v1/files/cb537b963dd4492dbd46a7616240f704",
|
|
97
|
-
metadata: {
|
|
98
|
-
type: 'image'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "Key Concepts",
|
|
103
|
-
url: "https://file.api.stg.cvnet.io/v1/files/fee99545827647c5a833eb6d35457684"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "Classroom Activity: Who Is Centred?",
|
|
107
|
-
url: "https://file.api.stg.cvnet.io/v1/files/dffe3954b85a46019bb7f10653430aee"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "Who Is Centred?: The Geocentric Model vs Heliocentric Model",
|
|
111
|
-
url: "https://file.api.stg.cvnet.io/v1/files/ff1ac5c29d2b43a6a766e32626fdd55a"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: "Endless Story Board Game: Instructions and Questions",
|
|
115
|
-
url: "https://file.api.stg.cvnet.io/v1/files/464090b8d1bc4ef78e0f3fae9b439f3e"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "Endless Story Board Game: Board Game Pieces",
|
|
119
|
-
url: "https://file.api.stg.cvnet.io/v1/files/39bbbef9b4274338afbfd5c3f11d4334"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: "Outstanding Milestones in Mathematics",
|
|
123
|
-
url: "https://file.api.stg.cvnet.io/v1/files/21c3a97dbefb4c678c40ea2f302dde09"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "Classroom Experiment Activity: Imitating Galileo",
|
|
127
|
-
url: "https://file.api.stg.cvnet.io/v1/files/63b0311220514282b34fa389070ea1c1"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: "Key Concepts: The Language of Science",
|
|
131
|
-
url: "https://file.api.stg.cvnet.io/v1/files/c395bb90504f44d7b082cd86178102ae"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: "Classroom Activity: Who Is Centred?",
|
|
135
|
-
url: "https://file.api.stg.cvnet.io/v1/files/3f6453ade0b04ed191b1e4707c1b593c"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: "Who Is Centred?: The Geocentric Model vs Heliocentric Model",
|
|
139
|
-
url: "https://file.api.stg.cvnet.io/v1/files/6b1319fcdb80425d86f7a89bc02c90f1"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: "Endless Story Board Game: Instructions and Questions",
|
|
143
|
-
url: "https://file.api.stg.cvnet.io/v1/files/f8d70f5fd1f1442e9acd85fc23b02700"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: "Endless Story Board Game: Board Game Pieces",
|
|
147
|
-
url: "https://file.api.stg.cvnet.io/v1/files/1c3f60c920534a129744a516c1413cf4"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: "Outstanding Milestones in Mathematics",
|
|
151
|
-
url: "https://file.api.stg.cvnet.io/v1/files/cecb07e558244a39b9f0772c5938d0d7"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: "Classroom Experiment Activity: Imitating Galileo",
|
|
155
|
-
url: "https://file.api.stg.cvnet.io/v1/files/5c179f615a974dccae89f6533fbda4c9"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
name: "Maths, the Language of Science",
|
|
159
|
-
url: "https://file.api.stg.cvnet.io/v1/files/b58daa1d60d5474ba556e2a3fc4942b7"
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const emptyLocalCacheAddresses = <LocalCacheAddress[]> [];
|
|
165
|
-
|
|
166
|
-
const mockExtraData = {
|
|
167
|
-
title: 'Paralympics',
|
|
168
|
-
videoId: '',
|
|
169
|
-
viewerId: '',
|
|
170
|
-
viewerCustomerId: '',
|
|
171
|
-
region: '',
|
|
172
|
-
mediaId: '',
|
|
173
|
-
settings: {
|
|
174
|
-
showSubtitles: false,
|
|
175
|
-
playbackProfile: '',
|
|
176
|
-
playbackProfileLocalCache: '',
|
|
177
|
-
playbackSubtitleSizeDefault: ''
|
|
178
|
-
},
|
|
179
|
-
warning: 'Bloody Scenes, Violence, Alcohol Abuse and Death',
|
|
180
|
-
ratingCode: 'PG',
|
|
181
|
-
seriesName: 'Global Icons',
|
|
182
|
-
seasonNumber: 1,
|
|
183
|
-
episodeNumber: 2
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const sources: { [key: string]: PlaybackObject } = {
|
|
187
|
-
basic: {
|
|
188
|
-
files: basicFiles,
|
|
189
|
-
mediaType: 'MasterVideo',
|
|
190
|
-
chapters: emptyChapters,
|
|
191
|
-
subtitles: {
|
|
192
|
-
list: [{
|
|
193
|
-
isDefault: false,
|
|
194
|
-
label: 'English',
|
|
195
|
-
language: 'en-au',
|
|
196
|
-
url: './en.vtt',
|
|
197
|
-
mimeType: 'text/vtt'
|
|
198
|
-
}]
|
|
199
|
-
},
|
|
200
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
201
|
-
resources: mockResources,
|
|
202
|
-
...mockExtraData
|
|
203
|
-
},
|
|
204
|
-
chapters: {
|
|
205
|
-
files: basicFiles,
|
|
206
|
-
mediaType: 'MasterVideo',
|
|
207
|
-
chapters: mockChapters,
|
|
208
|
-
subtitles: emptySubtitles,
|
|
209
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
210
|
-
resources: mockResources,
|
|
211
|
-
...mockExtraData
|
|
212
|
-
},
|
|
213
|
-
vertical: {
|
|
214
|
-
files: {
|
|
215
|
-
progressive: [{
|
|
216
|
-
mimeType: 'video/mp4',
|
|
217
|
-
profile: '720',
|
|
218
|
-
url: './vertical.mp4'
|
|
219
|
-
}]
|
|
220
|
-
},
|
|
221
|
-
mediaType: 'MasterVideo',
|
|
222
|
-
chapters: mockChapters,
|
|
223
|
-
subtitles: emptySubtitles,
|
|
224
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
225
|
-
resources: mockResources,
|
|
226
|
-
...mockExtraData
|
|
227
|
-
},
|
|
228
|
-
error: {
|
|
229
|
-
files: {
|
|
230
|
-
progressive: [{
|
|
231
|
-
mimeType: 'video/mp4',
|
|
232
|
-
profile: '240',
|
|
233
|
-
|
|
234
|
-
// This is intentionally not a video url
|
|
235
|
-
url: 'https://clickview.com.au'
|
|
236
|
-
}]
|
|
237
|
-
},
|
|
238
|
-
mediaType: 'MasterVideo',
|
|
239
|
-
chapters: emptyChapters,
|
|
240
|
-
subtitles: emptySubtitles,
|
|
241
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
242
|
-
resources: mockResources,
|
|
243
|
-
...mockExtraData
|
|
244
|
-
},
|
|
245
|
-
multipleQualities: {
|
|
246
|
-
files: multipleFiles,
|
|
247
|
-
mediaType: 'MasterVideo',
|
|
248
|
-
chapters: emptyChapters,
|
|
249
|
-
subtitles: emptySubtitles,
|
|
250
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
251
|
-
resources: mockResources,
|
|
252
|
-
...mockExtraData
|
|
253
|
-
},
|
|
254
|
-
poster: {
|
|
255
|
-
files: basicFiles,
|
|
256
|
-
mediaType: 'MasterVideo',
|
|
257
|
-
chapters: emptyChapters,
|
|
258
|
-
posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
|
|
259
|
-
subtitles: emptySubtitles,
|
|
260
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
261
|
-
resources: mockResources,
|
|
262
|
-
...mockExtraData
|
|
263
|
-
},
|
|
264
|
-
everything: {
|
|
265
|
-
files: multipleFiles,
|
|
266
|
-
mediaType: 'MasterVideo',
|
|
267
|
-
chapters: mockChapters,
|
|
268
|
-
posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
|
|
269
|
-
subtitles: multipleSubtitles,
|
|
270
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
271
|
-
resources: mockResources,
|
|
272
|
-
...mockExtraData
|
|
273
|
-
},
|
|
274
|
-
multipleSubtitles: {
|
|
275
|
-
files: basicFiles,
|
|
276
|
-
mediaType: 'MasterVideo',
|
|
277
|
-
chapters: emptyChapters,
|
|
278
|
-
subtitles: multipleSubtitles,
|
|
279
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
280
|
-
resources: mockResources,
|
|
281
|
-
...mockExtraData
|
|
282
|
-
},
|
|
283
|
-
multipleTracksWithDefault: {
|
|
284
|
-
files: basicFiles,
|
|
285
|
-
mediaType: 'MasterVideo',
|
|
286
|
-
chapters: emptyChapters,
|
|
287
|
-
subtitles: {
|
|
288
|
-
list: [{
|
|
289
|
-
label: 'English',
|
|
290
|
-
language: 'en',
|
|
291
|
-
url: './en.vtt',
|
|
292
|
-
mimeType: 'text/vtt'
|
|
293
|
-
}, {
|
|
294
|
-
label: 'Spanish',
|
|
295
|
-
language: 'es',
|
|
296
|
-
url: './es.vtt',
|
|
297
|
-
isDefault: true,
|
|
298
|
-
mimeType: 'text/vtt'
|
|
299
|
-
},{
|
|
300
|
-
label: 'French',
|
|
301
|
-
language: 'fr',
|
|
302
|
-
url: './fr.vtt',
|
|
303
|
-
mimeType: 'text/vtt'
|
|
304
|
-
}]
|
|
305
|
-
},
|
|
306
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
307
|
-
resources: mockResources,
|
|
308
|
-
...mockExtraData
|
|
309
|
-
},
|
|
310
|
-
interactive: {
|
|
311
|
-
files: basicFiles,
|
|
312
|
-
mediaType: 'MasterInteractive',
|
|
313
|
-
chapters: emptyChapters,
|
|
314
|
-
additionalData: interactive,
|
|
315
|
-
subtitles: emptySubtitles,
|
|
316
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
317
|
-
resources: mockResources,
|
|
318
|
-
...mockExtraData
|
|
319
|
-
},
|
|
320
|
-
clip: {
|
|
321
|
-
files: basicFiles,
|
|
322
|
-
mediaType: 'MasterClip',
|
|
323
|
-
chapters: emptyChapters,
|
|
324
|
-
additionalData: {
|
|
325
|
-
startTime: 60,
|
|
326
|
-
endTime: 240
|
|
327
|
-
},
|
|
328
|
-
subtitles: emptySubtitles,
|
|
329
|
-
localCacheAddresses: emptyLocalCacheAddresses,
|
|
330
|
-
resources: mockResources,
|
|
331
|
-
...mockExtraData
|
|
332
|
-
},
|
|
333
|
-
localcache: {
|
|
334
|
-
files: multipleFiles,
|
|
335
|
-
mediaType: 'MasterVideo',
|
|
336
|
-
chapters: emptyChapters,
|
|
337
|
-
subtitles: emptySubtitles,
|
|
338
|
-
localCacheAddresses: [{
|
|
339
|
-
httpsAddress: 'https://local.clickviewlocalcache.com:9055',
|
|
340
|
-
name: 'test',
|
|
341
|
-
playbackProfile: '1080'
|
|
342
|
-
}],
|
|
343
|
-
resources: mockResources,
|
|
344
|
-
...mockExtraData
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
export function mockplayerApi(viewKey: string): Promise<PlaybackObject> {
|
|
349
|
-
const playbackObject = sources[viewKey];
|
|
350
|
-
|
|
351
|
-
if (!playbackObject)
|
|
352
|
-
throw Error('Unknown viewKey: ' + viewKey);
|
|
353
|
-
|
|
354
|
-
return new Promise<PlaybackObject>(resolve => {
|
|
355
|
-
|
|
356
|
-
// 200ms Timeout is just simulating an async api call to fetch tech info
|
|
357
|
-
window.setTimeout(() => {
|
|
358
|
-
resolve(playbackObject);
|
|
359
|
-
}, 200);
|
|
360
|
-
});
|
|
361
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { VideoJsPlayer } from 'video.js';
|
|
2
|
-
import { BasePlayerOptions } from '../../../src/players/base-player';
|
|
3
|
-
|
|
4
|
-
export const mockSetups: any = {
|
|
5
|
-
thumbnails: function(options: BasePlayerOptions, player: VideoJsPlayer): void {
|
|
6
|
-
player.addRemoteTextTrack({
|
|
7
|
-
kind: 'metadata',
|
|
8
|
-
src: './thumbnails.vtt',
|
|
9
|
-
label: 'thumbnails'
|
|
10
|
-
}, true);
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
everything: function(options: BasePlayerOptions, player: VideoJsPlayer): void {
|
|
14
|
-
mockSetups.thumbnails(options, player);
|
|
15
|
-
}
|
|
16
|
-
};
|