@clickview/player 0.0.3-dev.1 → 0.0.3-rc.0

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.
@@ -13,7 +13,6 @@ module.exports = {
13
13
  rules: custom.module.rules
14
14
  },
15
15
  resolve: custom.resolve,
16
- resolveLoader: custom.resolveLoader,
17
16
  plugins: [
18
17
  ...config.plugins,
19
18
  ...custom.plugins
@@ -3,14 +3,13 @@ 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
-
8
6
  export default {
9
7
  title: 'Base'
10
8
  };
11
9
 
12
- export const Default = () => <ClickViewPlayer viewKey='basic' fetch={mockplayerApi} />;
13
-
10
+ export const Default = () =>
11
+ <ClickViewPlayer viewKey='basic' fetch={mockplayerApi} />;
12
+
14
13
  Default.storyName = 'Default';
15
14
 
16
15
  export const Chapters = () =>
@@ -49,7 +48,7 @@ export const Error = () =>
49
48
  <ClickViewPlayer viewKey='error' fetch={mockplayerApi} />;
50
49
 
51
50
  export const PlayerApi = () =>
52
- <ClickViewPlayer viewKey='camwashere' playerApi={new URL(PLAYER_API_STAGING)} />;
51
+ <ClickViewPlayer viewKey='camwashere' />;
53
52
 
54
53
  PlayerApi.storyName = 'Player API';
55
54
 
@@ -57,7 +56,7 @@ PlayerApi.storyName = 'Player API';
57
56
  * This story uses an intentionally invalid viewKey.
58
57
  */
59
58
  export const PlayerApiError = () =>
60
- <ClickViewPlayer viewKey='camwashere_error' playerApi={new URL(PLAYER_API_STAGING)} />;
59
+ <ClickViewPlayer viewKey='camwashere_error' />;
61
60
 
62
61
  PlayerApiError.storyName = 'Player API Error';
63
62
 
@@ -1,64 +1,68 @@
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';
2
7
 
3
8
  export default {
4
9
  title: 'Interactives'
5
10
  };
6
11
 
7
- export const Default = () => <h1>Sorry no interactives</h1>;
8
-
9
- Default.storyName = 'Default';
12
+ export const Default = () =>
13
+ <ClickViewInteractivePlayer viewKey='interactive' fetch={mockplayerApi} />;
10
14
 
11
- // export const Create = () =>
12
- // <ClickViewInteractivePlayer
13
- // viewKey='interactive'
14
- // fetch={mockplayerApi}
15
- // mode={InteractiveMode.Create}
16
- // imageApi={new URL(IMAGE_API_URL_STAGING)} />;
15
+ export const Create = () =>
16
+ <ClickViewInteractivePlayer
17
+ viewKey='basic'
18
+ fetch={mockplayerApi}
19
+ mode={InteractiveMode.Create}
20
+ imageApi={IMAGE_API_URL_STAGING} />;
17
21
 
18
- // export const Annotation = () => {
19
- // function onReady(player: InteractivePlayer): void {
20
- // player.currentTime(15);
21
- // }
22
+ export const Annotation = () => {
23
+ function onReady(player: InteractivePlayer): void {
24
+ player.currentTime(15);
25
+ }
22
26
 
23
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
24
- // };
27
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
28
+ };
25
29
 
26
- // export const ShortAnswer = () => {
27
- // function onReady(player: InteractivePlayer): void {
28
- // player.currentTime(13);
29
- // }
30
+ export const ShortAnswer = () => {
31
+ function onReady(player: InteractivePlayer): void {
32
+ player.currentTime(13);
33
+ }
30
34
 
31
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
32
- // };
35
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
36
+ };
33
37
 
34
- // export const Image = () => {
35
- // function onReady(player: InteractivePlayer): void {
36
- // player.currentTime(17);
37
- // }
38
+ export const Image = () => {
39
+ function onReady(player: InteractivePlayer): void {
40
+ player.currentTime(17);
41
+ }
38
42
 
39
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
40
- // };
43
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
44
+ };
41
45
 
42
- // export const TrueOrFalse = () => {
43
- // function onReady(player: InteractivePlayer): void {
44
- // player.currentTime(5);
45
- // }
46
+ export const TrueOrFalse = () => {
47
+ function onReady(player: InteractivePlayer): void {
48
+ player.currentTime(5);
49
+ }
46
50
 
47
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
48
- // };
51
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
52
+ };
49
53
 
50
- // export const MultipleChoice = () => {
51
- // function onReady(player: InteractivePlayer): void {
52
- // player.currentTime(7);
53
- // }
54
+ export const MultipleChoice = () => {
55
+ function onReady(player: InteractivePlayer): void {
56
+ player.currentTime(7);
57
+ }
54
58
 
55
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
56
- // };
59
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
60
+ };
57
61
 
58
- // export const MissingWord = () => {
59
- // function onReady(player: InteractivePlayer): void {
60
- // player.currentTime(9);
61
- // }
62
+ export const MissingWord = () => {
63
+ function onReady(player: InteractivePlayer): void {
64
+ player.currentTime(9);
65
+ }
62
66
 
63
- // return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
64
- // };
67
+ return <ClickViewInteractivePlayer onReady={onReady} viewKey='interactive' fetch={mockplayerApi} autoplay={true} />;
68
+ };
@@ -163,14 +163,6 @@ const mockResources = <Resources> {
163
163
 
164
164
  const emptyLocalCacheAddresses = <LocalCacheAddress[]> [];
165
165
 
166
- const mockExtraData = {
167
- videoId: '',
168
- viewerId: '',
169
- viewerCustomerId: '',
170
- region: '',
171
- mediaId: ''
172
- }
173
-
174
166
  const sources: { [key: string]: PlaybackObject } = {
175
167
  basic: {
176
168
  files: basicFiles,
@@ -186,8 +178,7 @@ const sources: { [key: string]: PlaybackObject } = {
186
178
  }]
187
179
  },
188
180
  localCacheAddresses: emptyLocalCacheAddresses,
189
- resources: mockResources,
190
- ...mockExtraData
181
+ resources: mockResources
191
182
  },
192
183
  chapters: {
193
184
  files: basicFiles,
@@ -195,8 +186,7 @@ const sources: { [key: string]: PlaybackObject } = {
195
186
  chapters: mockChapters,
196
187
  subtitles: emptySubtitles,
197
188
  localCacheAddresses: emptyLocalCacheAddresses,
198
- resources: mockResources,
199
- ...mockExtraData
189
+ resources: mockResources
200
190
  },
201
191
  vertical: {
202
192
  files: {
@@ -210,8 +200,7 @@ const sources: { [key: string]: PlaybackObject } = {
210
200
  chapters: mockChapters,
211
201
  subtitles: emptySubtitles,
212
202
  localCacheAddresses: emptyLocalCacheAddresses,
213
- resources: mockResources,
214
- ...mockExtraData
203
+ resources: mockResources
215
204
  },
216
205
  error: {
217
206
  files: {
@@ -227,8 +216,7 @@ const sources: { [key: string]: PlaybackObject } = {
227
216
  chapters: emptyChapters,
228
217
  subtitles: emptySubtitles,
229
218
  localCacheAddresses: emptyLocalCacheAddresses,
230
- resources: mockResources,
231
- ...mockExtraData
219
+ resources: mockResources
232
220
  },
233
221
  multipleQualities: {
234
222
  files: multipleFiles,
@@ -236,8 +224,7 @@ const sources: { [key: string]: PlaybackObject } = {
236
224
  chapters: emptyChapters,
237
225
  subtitles: emptySubtitles,
238
226
  localCacheAddresses: emptyLocalCacheAddresses,
239
- resources: mockResources,
240
- ...mockExtraData
227
+ resources: mockResources
241
228
  },
242
229
  poster: {
243
230
  files: basicFiles,
@@ -246,8 +233,7 @@ const sources: { [key: string]: PlaybackObject } = {
246
233
  posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
247
234
  subtitles: emptySubtitles,
248
235
  localCacheAddresses: emptyLocalCacheAddresses,
249
- resources: mockResources,
250
- ...mockExtraData
236
+ resources: mockResources
251
237
  },
252
238
  everything: {
253
239
  files: multipleFiles,
@@ -256,8 +242,7 @@ const sources: { [key: string]: PlaybackObject } = {
256
242
  posterUrl: 'https://image.api.stg.cvnet.io/v2/thumbnails/Q229lo',
257
243
  subtitles: multipleSubtitles,
258
244
  localCacheAddresses: emptyLocalCacheAddresses,
259
- resources: mockResources,
260
- ...mockExtraData
245
+ resources: mockResources
261
246
  },
262
247
  multipleSubtitles: {
263
248
  files: basicFiles,
@@ -265,8 +250,7 @@ const sources: { [key: string]: PlaybackObject } = {
265
250
  chapters: emptyChapters,
266
251
  subtitles: multipleSubtitles,
267
252
  localCacheAddresses: emptyLocalCacheAddresses,
268
- resources: mockResources,
269
- ...mockExtraData
253
+ resources: mockResources
270
254
  },
271
255
  multipleTracksWithDefault: {
272
256
  files: basicFiles,
@@ -292,8 +276,7 @@ const sources: { [key: string]: PlaybackObject } = {
292
276
  }]
293
277
  },
294
278
  localCacheAddresses: emptyLocalCacheAddresses,
295
- resources: mockResources,
296
- ...mockExtraData
279
+ resources: mockResources
297
280
  },
298
281
  interactive: {
299
282
  files: basicFiles,
@@ -302,8 +285,7 @@ const sources: { [key: string]: PlaybackObject } = {
302
285
  additionalData: interactive,
303
286
  subtitles: emptySubtitles,
304
287
  localCacheAddresses: emptyLocalCacheAddresses,
305
- resources: mockResources,
306
- ...mockExtraData
288
+ resources: mockResources
307
289
  },
308
290
  clip: {
309
291
  files: basicFiles,
@@ -315,8 +297,7 @@ const sources: { [key: string]: PlaybackObject } = {
315
297
  },
316
298
  subtitles: emptySubtitles,
317
299
  localCacheAddresses: emptyLocalCacheAddresses,
318
- resources: mockResources,
319
- ...mockExtraData
300
+ resources: mockResources
320
301
  },
321
302
  localcache: {
322
303
  files: multipleFiles,
@@ -328,8 +309,7 @@ const sources: { [key: string]: PlaybackObject } = {
328
309
  name: 'test',
329
310
  playbackProfile: '1080'
330
311
  }],
331
- resources: mockResources,
332
- ...mockExtraData
312
+ resources: mockResources
333
313
  }
334
314
  };
335
315
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/player",
3
- "version": "0.0.3-dev.1",
3
+ "version": "0.0.3-rc.0",
4
4
  "description": "ClickView Player",
5
5
  "main": "dist/player-app.js",
6
6
  "scripts": {
@@ -27,12 +27,11 @@
27
27
  "devDependencies": {
28
28
  "@babel/core": "7.11.6",
29
29
  "@clickview/eslint-config": "1.0.0",
30
- "@clickview/player-font": "0.0.8",
31
- "@clickview/tooling": "0.0.22-dev.1",
30
+ "@clickview/player-font": "0.0.6",
31
+ "@clickview/tooling": "0.0.22-rc.0",
32
32
  "@storybook/react": "6.0.26",
33
33
  "@types/cropperjs": "1.3.0",
34
34
  "@types/draft-js": "0.10.44",
35
- "@types/node-polyglot": "0.4.34",
36
35
  "@types/react-draft-wysiwyg": "1.13.1",
37
36
  "@types/simplebar": "5.1.1",
38
37
  "@types/video.js": "7.3.11",
@@ -41,13 +40,12 @@
41
40
  "webpack-dev-server": "3.11.0"
42
41
  },
43
42
  "dependencies": {
44
- "@clickview/styles": "1.0.15-dev.1",
43
+ "@clickview/styles": "1.0.15-rc.0",
45
44
  "@microsoft/signalr": "5.0.2",
46
45
  "cropperjs": "1.5.6",
47
46
  "draft-convert": "2.1.10",
48
47
  "draft-js": "0.11.7",
49
48
  "keycode": "2.2.0",
50
- "node-polyglot": "2.3.0",
51
49
  "react-draft-wysiwyg": "1.14.5",
52
50
  "simplebar": "5.3.0",
53
51
  "simplebar-react": "2.3.0",
@@ -6,7 +6,7 @@
6
6
  declare module '*.scss';
7
7
  declare module '*.svg';
8
8
 
9
- declare module '*.json' {
9
+ declare module "*.json" {
10
10
  export const value: any;
11
11
  export default value;
12
12
  }