@clickview/player 0.0.3 → 0.0.4-rc.1
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/.storybook/main.js +1 -0
- package/.storybook/stories/Base.stories.tsx +6 -5
- package/.storybook/stories/Interactives.stories.tsx +45 -49
- package/.storybook/stories/utils/mock-playerapi.ts +44 -12
- package/dist/en.json +1 -393
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +5 -1
- package/dist/libs/common/src/backbone/utils/LocalStorageHelper.d.ts +58 -0
- package/dist/libs/common/src/react/flight/FlightHelpers.d.ts +2 -1
- package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +17 -1
- package/dist/libs/shared/src/components/actions/ActionButton.d.ts +2 -0
- package/dist/libs/shared/src/components/actions/ActionsDropdown.d.ts +1 -1
- package/dist/libs/shared/src/components/icon-button/IconButton.d.ts +2 -0
- package/dist/libs/shared/src/components/interactive-questions/InteractionLabel.d.ts +20 -0
- package/dist/libs/shared/src/components/popup/Popup.d.ts +2 -0
- package/dist/libs/shared/src/enums/ObjectStatus.d.ts +3 -3
- package/dist/libs/shared/src/enums/UserGroup.d.ts +3 -3
- package/dist/libs/shared/src/enums/UserRole.d.ts +4 -4
- package/dist/libs/shared/src/hooks/UseGrabCursorProps.d.ts +15 -0
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +3 -1
- package/dist/libs/shared/src/images/svg/objects/index.d.ts +3 -1
- package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +2 -1
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +4 -1
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +1 -7
- package/dist/libs/shared/src/interfaces/models/Customer.d.ts +1 -2
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Series.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/User.d.ts +12 -37
- package/dist/libs/shared/src/interfaces/models/Video.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/interactive-results/StudentAttempt.d.ts +1 -1
- package/dist/libs/shared/src/utils/InteractiveCorrectnessHelper.d.ts +16 -0
- package/dist/player-app.css +45 -2391
- package/dist/player-app.js +122 -5657
- package/dist/projects/player/src/components/collapserator/collapserator.d.ts +2 -0
- package/dist/projects/player/src/components/landing-splash/landing-splash.d.ts +65 -0
- package/dist/projects/player/src/components/landing-splash/metadata/splash-metadata.d.ts +63 -0
- package/dist/projects/player/src/components/landing-splash/metadata/splash-title/splash-title.d.ts +62 -0
- package/dist/projects/player/src/components/landing-splash/metadata/splash-warning/splash-warning.d.ts +60 -0
- package/dist/projects/player/src/components/logo/clickview-logo.d.ts +1 -0
- package/dist/projects/player/src/components/menu/menu.d.ts +16 -0
- package/dist/projects/player/src/components/menu-button/menu-button.d.ts +1 -0
- package/dist/projects/player/src/components/player/player.d.ts +2 -0
- package/dist/projects/player/src/components/subs-caps-button/SubCapsMenuItem.d.ts +52 -0
- package/dist/projects/player/src/components/subs-caps-button/subtitle-search-menu-item.d.ts +54 -0
- package/dist/projects/player/src/components/subs-caps-button/subtitle-size-menu-item.d.ts +53 -0
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-result-menu-item.d.ts +15 -0
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-button.d.ts +30 -0
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-input.d.ts +27 -0
- package/dist/projects/player/src/components/subtitle-size-button/subtitle-size-button.d.ts +1 -0
- package/dist/projects/player/src/components/text-track-settings/text-track-settings.d.ts +56 -0
- package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +1 -0
- package/dist/projects/player/src/interfaces/models/PlaybackObject.d.ts +13 -0
- package/dist/projects/player/src/players/base-player.d.ts +9 -0
- package/dist/projects/player/src/players/interactive-player.d.ts +2 -0
- package/dist/projects/player/src/plugins/chromecast-plugin/chromecast-plugin.d.ts +11 -0
- package/dist/projects/player/src/plugins/chromecast-plugin/components/chromecast-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/chromecast-plugin/session-manager.d.ts +73 -0
- package/dist/projects/player/src/plugins/chromecast-plugin/tech/chromecast-tech-ui/chromecast-tech-ui.d.ts +67 -0
- package/dist/projects/player/src/plugins/chromecast-plugin/tech/chromecast-tech.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +4 -4
- package/dist/projects/player/src/plugins/interactive-plugin/components/sliding-timepoint/sliding-timepoints.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useInteractiveTrack.d.ts +4 -2
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/helpers.d.ts +1 -1
- package/dist/projects/player/src/plugins/persist-quality-settings-plugin/persist-quality-settings-plugin.d.ts +33 -0
- package/dist/projects/player/src/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin.d.ts +38 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-handle/drag-handle.d.ts +53 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-targets/drag-targets.d.ts +54 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/whiteboard-mode-button/whiteboard-mode-button.d.ts +23 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/whiteboard-mode-button/whiteboard-mode-menu-item.d.ts +15 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/contants/WhiteboardSides.d.ts +5 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/interfaces/WhiteboardSide.d.ts +1 -0
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/whiteboard-mode-plugin.d.ts +34 -0
- package/dist/projects/player/src/utils/fn.d.ts +30 -0
- package/dist/projects/player/src/utils/local-storage-helper.d.ts +6 -0
- package/dist/projects/player/src/utils/track-helper.d.ts +1 -0
- package/package.json +70 -66
- package/typings/utils/imports.d.ts +1 -1
- package/dist/libs/shared/src/enums/CustomerType.d.ts +0 -11
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/create-interaction-buttons.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/useInteractiveTrack.d.ts +0 -20
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/view-iteraction-buttons.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/CreateInteractionState.d.ts +0 -4
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/ViewInteractionState.d.ts +0 -3
package/.storybook/main.js
CHANGED
|
@@ -3,13 +3,14 @@ import { ClickViewPlayer, Player } from '../../src/index';
|
|
|
3
3
|
import { mockplayerApi } from './utils/mock-playerapi';
|
|
4
4
|
import { mockSetups } from './utils/mock-setup';
|
|
5
5
|
|
|
6
|
+
const PLAYER_API_STAGING = 'https://player.web.au.stg.cvnet.io';
|
|
7
|
+
|
|
6
8
|
export default {
|
|
7
9
|
title: 'Base'
|
|
8
10
|
};
|
|
9
11
|
|
|
10
|
-
export const Default = () =>
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export const Default = () => <ClickViewPlayer viewKey='basic' fetch={mockplayerApi} />;
|
|
13
|
+
|
|
13
14
|
Default.storyName = 'Default';
|
|
14
15
|
|
|
15
16
|
export const Chapters = () =>
|
|
@@ -48,7 +49,7 @@ export const Error = () =>
|
|
|
48
49
|
<ClickViewPlayer viewKey='error' fetch={mockplayerApi} />;
|
|
49
50
|
|
|
50
51
|
export const PlayerApi = () =>
|
|
51
|
-
<ClickViewPlayer viewKey='camwashere' />;
|
|
52
|
+
<ClickViewPlayer viewKey='camwashere' playerApi={new URL(PLAYER_API_STAGING)} />;
|
|
52
53
|
|
|
53
54
|
PlayerApi.storyName = 'Player API';
|
|
54
55
|
|
|
@@ -56,7 +57,7 @@ PlayerApi.storyName = 'Player API';
|
|
|
56
57
|
* This story uses an intentionally invalid viewKey.
|
|
57
58
|
*/
|
|
58
59
|
export const PlayerApiError = () =>
|
|
59
|
-
<ClickViewPlayer viewKey='camwashere_error' />;
|
|
60
|
+
<ClickViewPlayer viewKey='camwashere_error' playerApi={new URL(PLAYER_API_STAGING)} />;
|
|
60
61
|
|
|
61
62
|
PlayerApiError.storyName = 'Player API Error';
|
|
62
63
|
|
|
@@ -1,68 +1,64 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ClickViewInteractivePlayer, InteractivePlayer } from '../../src/index';
|
|
3
|
-
import { InteractiveMode } from '../../src/plugins/interactive-plugin/interfaces';
|
|
4
|
-
import { mockplayerApi } from './utils/mock-playerapi';
|
|
5
|
-
|
|
6
|
-
const IMAGE_API_URL_STAGING = 'https://image.api.stg.cvnet.io';
|
|
7
2
|
|
|
8
3
|
export default {
|
|
9
4
|
title: 'Interactives'
|
|
10
5
|
};
|
|
11
6
|
|
|
12
|
-
export const Default = () =>
|
|
13
|
-
<ClickViewInteractivePlayer viewKey='interactive' fetch={mockplayerApi} />;
|
|
7
|
+
export const Default = () => <h1>Sorry no interactives</h1>;
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
<ClickViewInteractivePlayer
|
|
17
|
-
viewKey='basic'
|
|
18
|
-
fetch={mockplayerApi}
|
|
19
|
-
mode={InteractiveMode.Create}
|
|
20
|
-
imageApi={IMAGE_API_URL_STAGING} />;
|
|
9
|
+
Default.storyName = 'Default';
|
|
21
10
|
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
// export const Create = () =>
|
|
12
|
+
// <ClickViewInteractivePlayer
|
|
13
|
+
// viewKey='interactive'
|
|
14
|
+
// fetch={mockplayerApi}
|
|
15
|
+
// mode={InteractiveMode.Create}
|
|
16
|
+
// imageApi={new URL(IMAGE_API_URL_STAGING)} />;
|
|
26
17
|
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
// export const Annotation = () => {
|
|
19
|
+
// function onReady(player: InteractivePlayer): void {
|
|
20
|
+
// player.currentTime(15);
|
|
21
|
+
// }
|
|
29
22
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
player.currentTime(13);
|
|
33
|
-
}
|
|
23
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
24
|
+
// };
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
// export const ShortAnswer = () => {
|
|
27
|
+
// function onReady(player: InteractivePlayer): void {
|
|
28
|
+
// player.currentTime(13);
|
|
29
|
+
// }
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
player.currentTime(17);
|
|
41
|
-
}
|
|
31
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
32
|
+
// };
|
|
42
33
|
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
// export const Image = () => {
|
|
35
|
+
// function onReady(player: InteractivePlayer): void {
|
|
36
|
+
// player.currentTime(17);
|
|
37
|
+
// }
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
player.currentTime(5);
|
|
49
|
-
}
|
|
39
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
40
|
+
// };
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
// export const TrueOrFalse = () => {
|
|
43
|
+
// function onReady(player: InteractivePlayer): void {
|
|
44
|
+
// player.currentTime(5);
|
|
45
|
+
// }
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
player.currentTime(7);
|
|
57
|
-
}
|
|
47
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
48
|
+
// };
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
// export const MultipleChoice = () => {
|
|
51
|
+
// function onReady(player: InteractivePlayer): void {
|
|
52
|
+
// player.currentTime(7);
|
|
53
|
+
// }
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
player.currentTime(9);
|
|
65
|
-
}
|
|
55
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
56
|
+
// };
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
// export const MissingWord = () => {
|
|
59
|
+
// function onReady(player: InteractivePlayer): void {
|
|
60
|
+
// player.currentTime(9);
|
|
61
|
+
// }
|
|
62
|
+
|
|
63
|
+
// return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
|
|
64
|
+
// };
|
|
@@ -163,6 +163,26 @@ const mockResources = <Resources> {
|
|
|
163
163
|
|
|
164
164
|
const emptyLocalCacheAddresses = <LocalCacheAddress[]> [];
|
|
165
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
|
+
|
|
166
186
|
const sources: { [key: string]: PlaybackObject } = {
|
|
167
187
|
basic: {
|
|
168
188
|
files: basicFiles,
|
|
@@ -178,7 +198,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
178
198
|
}]
|
|
179
199
|
},
|
|
180
200
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
181
|
-
resources: mockResources
|
|
201
|
+
resources: mockResources,
|
|
202
|
+
...mockExtraData
|
|
182
203
|
},
|
|
183
204
|
chapters: {
|
|
184
205
|
files: basicFiles,
|
|
@@ -186,7 +207,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
186
207
|
chapters: mockChapters,
|
|
187
208
|
subtitles: emptySubtitles,
|
|
188
209
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
189
|
-
resources: mockResources
|
|
210
|
+
resources: mockResources,
|
|
211
|
+
...mockExtraData
|
|
190
212
|
},
|
|
191
213
|
vertical: {
|
|
192
214
|
files: {
|
|
@@ -200,7 +222,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
200
222
|
chapters: mockChapters,
|
|
201
223
|
subtitles: emptySubtitles,
|
|
202
224
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
203
|
-
resources: mockResources
|
|
225
|
+
resources: mockResources,
|
|
226
|
+
...mockExtraData
|
|
204
227
|
},
|
|
205
228
|
error: {
|
|
206
229
|
files: {
|
|
@@ -216,7 +239,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
216
239
|
chapters: emptyChapters,
|
|
217
240
|
subtitles: emptySubtitles,
|
|
218
241
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
219
|
-
resources: mockResources
|
|
242
|
+
resources: mockResources,
|
|
243
|
+
...mockExtraData
|
|
220
244
|
},
|
|
221
245
|
multipleQualities: {
|
|
222
246
|
files: multipleFiles,
|
|
@@ -224,7 +248,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
224
248
|
chapters: emptyChapters,
|
|
225
249
|
subtitles: emptySubtitles,
|
|
226
250
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
227
|
-
resources: mockResources
|
|
251
|
+
resources: mockResources,
|
|
252
|
+
...mockExtraData
|
|
228
253
|
},
|
|
229
254
|
poster: {
|
|
230
255
|
files: basicFiles,
|
|
@@ -233,7 +258,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
233
258
|
posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
|
|
234
259
|
subtitles: emptySubtitles,
|
|
235
260
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
236
|
-
resources: mockResources
|
|
261
|
+
resources: mockResources,
|
|
262
|
+
...mockExtraData
|
|
237
263
|
},
|
|
238
264
|
everything: {
|
|
239
265
|
files: multipleFiles,
|
|
@@ -242,7 +268,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
242
268
|
posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
|
|
243
269
|
subtitles: multipleSubtitles,
|
|
244
270
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
245
|
-
resources: mockResources
|
|
271
|
+
resources: mockResources,
|
|
272
|
+
...mockExtraData
|
|
246
273
|
},
|
|
247
274
|
multipleSubtitles: {
|
|
248
275
|
files: basicFiles,
|
|
@@ -250,7 +277,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
250
277
|
chapters: emptyChapters,
|
|
251
278
|
subtitles: multipleSubtitles,
|
|
252
279
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
253
|
-
resources: mockResources
|
|
280
|
+
resources: mockResources,
|
|
281
|
+
...mockExtraData
|
|
254
282
|
},
|
|
255
283
|
multipleTracksWithDefault: {
|
|
256
284
|
files: basicFiles,
|
|
@@ -276,7 +304,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
276
304
|
}]
|
|
277
305
|
},
|
|
278
306
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
279
|
-
resources: mockResources
|
|
307
|
+
resources: mockResources,
|
|
308
|
+
...mockExtraData
|
|
280
309
|
},
|
|
281
310
|
interactive: {
|
|
282
311
|
files: basicFiles,
|
|
@@ -285,7 +314,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
285
314
|
additionalData: interactive,
|
|
286
315
|
subtitles: emptySubtitles,
|
|
287
316
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
288
|
-
resources: mockResources
|
|
317
|
+
resources: mockResources,
|
|
318
|
+
...mockExtraData
|
|
289
319
|
},
|
|
290
320
|
clip: {
|
|
291
321
|
files: basicFiles,
|
|
@@ -297,7 +327,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
297
327
|
},
|
|
298
328
|
subtitles: emptySubtitles,
|
|
299
329
|
localCacheAddresses: emptyLocalCacheAddresses,
|
|
300
|
-
resources: mockResources
|
|
330
|
+
resources: mockResources,
|
|
331
|
+
...mockExtraData
|
|
301
332
|
},
|
|
302
333
|
localcache: {
|
|
303
334
|
files: multipleFiles,
|
|
@@ -309,7 +340,8 @@ const sources: { [key: string]: PlaybackObject } = {
|
|
|
309
340
|
name: 'test',
|
|
310
341
|
playbackProfile: '1080'
|
|
311
342
|
}],
|
|
312
|
-
resources: mockResources
|
|
343
|
+
resources: mockResources,
|
|
344
|
+
...mockExtraData
|
|
313
345
|
}
|
|
314
346
|
};
|
|
315
347
|
|