@clickview/player 0.0.6-rc.0 → 0.0.7-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.
Files changed (78) hide show
  1. package/dist/en.json +1 -1
  2. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +21 -3
  3. package/dist/libs/common/src/backbone/core/AppLink.d.ts +0 -4
  4. package/dist/libs/common/src/backbone/core/BaseError.d.ts +8 -0
  5. package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +0 -5
  6. package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +2 -2
  7. package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +3 -1
  8. package/dist/libs/shared/src/apps/search/interfaces/FilterProps.d.ts +8 -0
  9. package/dist/libs/shared/src/apps/search/interfaces/SearchFilter.d.ts +29 -0
  10. package/dist/libs/shared/src/apps/search/interfaces/SearchResults.d.ts +26 -0
  11. package/dist/libs/shared/src/apps/search/interfaces/SearchTypes.d.ts +26 -0
  12. package/dist/libs/shared/src/apps/search/interfaces/index.d.ts +4 -0
  13. package/dist/libs/shared/src/apps/search/reducers/FilterReducer.d.ts +36 -0
  14. package/dist/libs/shared/src/apps/search/reducers/index.d.ts +1 -0
  15. package/dist/libs/shared/src/constants/AppVariables.d.ts +0 -1
  16. package/dist/libs/shared/src/enums/MasterType.d.ts +1 -0
  17. package/dist/libs/shared/src/enums/SettingName.d.ts +1 -0
  18. package/dist/libs/shared/src/hooks/useNavLock.d.ts +2 -0
  19. package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +7 -4
  20. package/dist/libs/shared/src/images/svg/actions/index.d.ts +3 -1
  21. package/dist/libs/shared/src/images/svg/objects/index.d.ts +3 -1
  22. package/dist/libs/shared/src/images/svg/status/index.d.ts +2 -1
  23. package/dist/libs/shared/src/interfaces/FavouriteVideoFunc.d.ts +2 -0
  24. package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +6 -3
  25. package/dist/libs/shared/src/interfaces/index.d.ts +2 -0
  26. package/dist/libs/shared/src/interfaces/models/Config.d.ts +1 -0
  27. package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +1 -1
  28. package/dist/libs/shared/src/interfaces/models/User.d.ts +14 -1
  29. package/dist/libs/shared/src/interfaces/models/interactive-results/InteractiveResultSet.d.ts +5 -0
  30. package/dist/libs/shared/src/interfaces/models/interactive-results/StudentResult.d.ts +2 -1
  31. package/dist/libs/shared/src/interfaces/requests/index.d.ts +0 -1
  32. package/dist/libs/shared/src/interfaces/responses/ShareSearchResponse.d.ts +5 -0
  33. package/dist/libs/shared/src/interfaces/responses/index.d.ts +1 -0
  34. package/dist/libs/shared/src/utils/ImageHelper.d.ts +2 -1
  35. package/dist/player-app.css +23 -21
  36. package/dist/player-app.js +13 -13
  37. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +1 -0
  38. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +1 -0
  39. package/dist/projects/player/src/components/cog-button/cog-button.d.ts +7 -5
  40. package/dist/projects/player/src/components/cog-button/collapsible-heading-menu-item.d.ts +15 -0
  41. package/dist/projects/player/src/components/collapserator/collapserator.d.ts +1 -1
  42. package/dist/projects/player/src/components/keyboard-shortcuts-button/keyboard-shortcuts-button.d.ts +1 -0
  43. package/dist/projects/player/src/components/menu/menu.d.ts +7 -0
  44. package/dist/projects/player/src/components/play-pause-feedback/play-pause-feedback.d.ts +1 -0
  45. package/dist/projects/player/src/components/play-toggle/play-toggle.d.ts +1 -0
  46. package/dist/projects/player/src/components/player/player.d.ts +4 -0
  47. package/dist/projects/player/src/components/subs-caps-button/off-text-track-menu-item.d.ts +1 -0
  48. package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +1 -0
  49. package/dist/projects/player/src/components/subs-caps-button/subtitle-search-menu-item.d.ts +2 -1
  50. package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-button.d.ts +2 -0
  51. package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-input.d.ts +1 -0
  52. package/dist/projects/player/src/players/base-player.d.ts +13 -3
  53. package/dist/projects/player/src/players/interactive-player.d.ts +4 -0
  54. package/dist/projects/player/src/players/player.d.ts +1 -5
  55. package/dist/projects/player/src/players/reports/reports-player.d.ts +14 -0
  56. package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay.d.ts +1 -0
  57. package/dist/projects/player/src/plugins/engagement-overlay-plugin/engagement-overlay-plugin.d.ts +30 -0
  58. package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +29 -0
  59. package/dist/projects/player/src/plugins/interactive-plugin/hooks/useStateManager.d.ts +2 -0
  60. package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +2 -0
  61. package/dist/projects/player/src/plugins/next-video-plugin/next-video-plugin.d.ts +2 -1
  62. package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +30 -0
  63. package/dist/projects/player/src/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin.d.ts +0 -1
  64. package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +25 -0
  65. package/dist/projects/player/src/plugins/picture-in-picture-plugin/picture-in-picture-plugin.d.ts +0 -1
  66. package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +1 -0
  67. package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +3 -0
  68. package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +40 -0
  69. package/dist/projects/player/src/react/ReportsPlayer.d.ts +3 -0
  70. package/dist/projects/player/src/services/analytics-service.d.ts +6 -2
  71. package/package.json +5 -4
  72. package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +0 -42
  73. package/dist/libs/shared/src/images/svg/player/index.d.ts +0 -14
  74. package/dist/libs/shared/src/interfaces/requests/CreateViewKeyRequest.d.ts +0 -3
  75. package/dist/projects/player/src/plugins/example-plugin/components/example-button/example-button.d.ts +0 -1
  76. package/dist/projects/player/src/plugins/example-plugin/example-plugin.d.ts +0 -2
  77. package/dist/projects/player/src/utils/scrollbar-helper.d.ts +0 -6
  78. /package/dist/projects/player/src/{plugins/example-plugin/components/example-react-button/example-react-button.d.ts → components/seek-bar/seek-bar.d.ts} +0 -0
@@ -75,5 +75,6 @@ export declare class ChapterBarItem extends Component {
75
75
  * by SeekBar which ChapterSeekBar extends
76
76
  */
77
77
  update(): void;
78
+ updateBuffered(bufferEnd: number): void;
78
79
  }
79
80
  export {};
@@ -51,5 +51,6 @@ export declare class ChapterBarItems extends Component {
51
51
  buildCSSClass(): string;
52
52
  createEl(tagName?: string, properties?: any, attributes?: any): Element;
53
53
  update(): void;
54
+ updateBuffered(): void;
54
55
  }
55
56
  export {};
@@ -1,15 +1,18 @@
1
1
  import { CollapsibleComponent } from 'projects/player/interfaces/CollapsibleComponent';
2
2
  import videojs, { VideoJsPlayer } from 'video.js';
3
- import 'projects/player/components/next-video-menu-item/next-video-menu-item';
4
3
  import './cog-button.scss';
5
4
  declare const MenuItem: {
6
5
  new (player: VideoJsPlayer, options?: videojs.MenuItemOptions): videojs.MenuItem;
7
6
  prototype: videojs.MenuItem;
8
7
  };
8
+ interface AdditionalMenuItem {
9
+ index: number;
10
+ ctor: typeof MenuItem;
11
+ }
9
12
  interface CogMenuItemOptions extends videojs.ComponentOptions {
10
13
  item: CollapsibleComponent;
11
14
  }
12
- declare class CogMenuItem extends MenuItem {
15
+ export declare class CogMenuItem extends MenuItem {
13
16
  options_: CogMenuItemOptions;
14
17
  constructor(player: VideoJsPlayer, options: CogMenuItemOptions);
15
18
  handleClick(event: videojs.EventTarget.Event): void;
@@ -24,11 +27,10 @@ interface CogButtonOptions extends videojs.ComponentOptions {
24
27
  }
25
28
  export declare class CogButton extends MenuButton {
26
29
  options_: CogButtonOptions;
27
- private renderPlayNext;
30
+ private additionalItems;
28
31
  constructor(player: VideoJsPlayer, options: CogButtonOptions);
29
32
  buildWrapperCSSClass(): string;
30
33
  buildCSSClass(): string;
31
- pressButton(): void;
32
34
  /**
33
35
  * Create the list of menu items. Specific to each subclass.
34
36
  *
@@ -36,6 +38,6 @@ export declare class CogButton extends MenuButton {
36
38
  */
37
39
  createItems(): CogMenuItem[];
38
40
  update(): void;
39
- showPlayNext(): void;
41
+ addItem(item: AdditionalMenuItem): void;
40
42
  }
41
43
  export {};
@@ -0,0 +1,15 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
2
+ declare const MenuItem: {
3
+ new (player: VideoJsPlayer, options?: videojs.MenuItemOptions): videojs.MenuItem;
4
+ prototype: videojs.MenuItem;
5
+ };
6
+ interface CollapsibleHeadingMenuItemOptions extends videojs.MenuItemOptions {
7
+ onClickBack?: () => void;
8
+ }
9
+ export declare class CollapsibleHeadingMenuItem extends MenuItem {
10
+ options_: CollapsibleHeadingMenuItemOptions;
11
+ constructor(player: VideoJsPlayer, options?: CollapsibleHeadingMenuItemOptions);
12
+ createEl(): HTMLLIElement;
13
+ handleClick(event: videojs.EventTarget.Event): void;
14
+ }
15
+ export {};
@@ -1,6 +1,6 @@
1
1
  import 'projects/player/components/cog-button/cog-button';
2
2
  import 'projects/player/components/subtitle-size-button/subtitle-size-button';
3
3
  import 'projects/player/components/subtitle-search-button/subtitle-search-button';
4
+ import 'projects/player/components/keyboard-shortcuts-button/keyboard-shortcuts-button';
4
5
  import './collapserator.scss';
5
- import '../play-toggle/play-toggle.scss';
6
6
  import '../fullscreen-toggle/fullscreen-toggle.scss';
@@ -0,0 +1 @@
1
+ import './keyboard-shortcuts-button.scss';
@@ -5,6 +5,13 @@ declare const BaseMenu: {
5
5
  };
6
6
  export declare class Menu extends BaseMenu {
7
7
  isDisposed_: boolean;
8
+ private simpleBar;
9
+ createEl(): HTMLDivElement;
10
+ contentEl(): Element;
11
+ dispose(): void;
12
+ addItem(component: string | videojs.MenuItem): void;
13
+ lockShowing(): void;
14
+ recalculateScrollBar(): void;
8
15
  /**
9
16
  * The video.js Menu handleBlur function checks if the target is an immediate child
10
17
  * but we have scenarios where the target is not an immediate child
@@ -0,0 +1 @@
1
+ import './play-pause-feedback.scss';
@@ -0,0 +1 @@
1
+ import './play-toggle.scss';
@@ -1,6 +1,10 @@
1
+ import { VideoJsPlayerOptions } from 'video.js';
1
2
  import './player.scss';
2
3
  export declare const IS_IPOD: boolean;
3
4
  export declare const IS_ANDROID: boolean;
5
+ export interface PlayerWrapperOptions extends VideoJsPlayerOptions {
6
+ setMaxHeight?: boolean;
7
+ }
4
8
  declare module 'video.js' {
5
9
  interface VideoJsPlayer {
6
10
  lock(callback: (success: () => void) => void): void;
@@ -1 +1,2 @@
1
+ import './off-text-track-menu-item.ts';
1
2
  import './subs-caps-button.scss';
@@ -48,7 +48,8 @@ declare const TextTrackMenuItem: {
48
48
  };
49
49
  export declare class SubtitleSearchMenuItem extends TextTrackMenuItem {
50
50
  constructor(player: VideoJsPlayer);
51
- private toggleHidden;
51
+ private toggleEnabled;
52
+ private bindTrackEvents;
52
53
  handleClick(): void;
53
54
  }
54
55
  export {};
@@ -8,6 +8,7 @@ declare const MenuButton: {
8
8
  };
9
9
  export declare class SubtitleSearchButton extends MenuButton implements CollapsibleComponent {
10
10
  constructor(player: VideoJsPlayer, options?: videojs.MenuButtonOptions);
11
+ private bindTrackEvents;
11
12
  createItems(): SubtitleResultMenuItem[];
12
13
  search(text: string): void;
13
14
  private findMatches;
@@ -15,6 +16,7 @@ export declare class SubtitleSearchButton extends MenuButton implements Collapsi
15
16
  private toggleNoResults;
16
17
  buildWrapperCSSClass(): string;
17
18
  update(): void;
19
+ pressButton(): void;
18
20
  /**
19
21
  * CollapsibileComponent interface implementation
20
22
  * from here onward
@@ -11,6 +11,7 @@ export declare class SubtitleSearchInput extends MenuItem {
11
11
  options_: SubtitleSearchInputOptions;
12
12
  constructor(player: VideoJsPlayer, options: SubtitleSearchInputOptions);
13
13
  createEl(): HTMLLIElement;
14
+ focus(): void;
14
15
  /**
15
16
  * Because we extend MenuItem which will close the menu by default
16
17
  * we need to halt the event propogation here
@@ -1,5 +1,9 @@
1
- import { VideoJsPlayer, VideoJsPlayerOptions } from 'video.js';
1
+ import { VideoJsPlayer } from 'video.js';
2
2
  import 'videojs-contrib-quality-levels';
3
+ import 'projects/player/plugins/persist-volume-plugin/persist-volume-plugin';
4
+ import 'projects/player/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin';
5
+ import 'projects/player/plugins/open-externally-plugin/open-externally-plugin';
6
+ import 'projects/player/plugins/touch-controls-plugin/touch-controls-plugin';
3
7
  import 'projects/player/plugins/progressive-files-plugin/progressive-files-plugin';
4
8
  import 'projects/player/plugins/localcache-plugin/localcache-plugin';
5
9
  import 'projects/player/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin';
@@ -11,6 +15,8 @@ import 'projects/player/components/menu/menu';
11
15
  import 'projects/player/components/menu-button/menu-button';
12
16
  import 'projects/player/components/time-wrapper/time-wrapper';
13
17
  import 'projects/player/components/collapserator/collapserator';
18
+ /** Seekbar must be imported before chapter-seek-bar */
19
+ import 'projects/player/components/seek-bar/seek-bar';
14
20
  import 'projects/player/components/chapter-seek-bar/chapter-seek-bar';
15
21
  import 'projects/player/components/progress-control/progress-control';
16
22
  import 'projects/player/components/mouse-time-display/mouse-time-display';
@@ -20,6 +26,8 @@ import 'projects/player/components/quality-selector/quality-button';
20
26
  import 'projects/player/components/playback-rate-button/playback-rate-button';
21
27
  import 'projects/player/components/text-track-settings/text-track-settings';
22
28
  import 'projects/player/components/player/player';
29
+ import 'projects/player/components/play-pause-feedback/play-pause-feedback';
30
+ import 'projects/player/components/play-toggle/play-toggle';
23
31
  /**
24
32
  * *.scss imports must be relative
25
33
  */
@@ -32,6 +40,8 @@ import { ExternalLinkOptions } from 'projects/player/plugins/open-externally-plu
32
40
  import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
33
41
  import { AnalyticsPlayerType, AnalyticsService } from 'projects/player/services/analytics-service';
34
42
  import { ProgressEvent } from 'projects/player/plugins/progress-reporter-plugin/progress-reporter-plugin';
43
+ import { PlayerWrapperOptions } from 'projects/player/components/player/player';
44
+ import { HashObject } from 'libs/analytics/interfaces';
35
45
  export interface BasePlayerOptions {
36
46
  autoplay?: boolean;
37
47
  viewKey: string;
@@ -42,7 +52,6 @@ export interface BasePlayerOptions {
42
52
  playerApi?: URL;
43
53
  enableLocalCache?: boolean;
44
54
  onRequestPictureInPicture?: (isPiP: boolean) => void;
45
- showResources?: boolean;
46
55
  imageCdnUrl?: string;
47
56
  /**
48
57
  * An optional external element for binding hotkey
@@ -68,11 +77,12 @@ export declare abstract class BasePlayer {
68
77
  protected configurePlugins(): void;
69
78
  protected onFlushProgress(events: ProgressEvent[]): void;
70
79
  protected buildVideoJs(): VideoJsPlayer;
71
- protected getPlayerOptions(): VideoJsPlayerOptions;
80
+ protected getPlayerOptions(): PlayerWrapperOptions;
72
81
  protected fetch(): Promise<void>;
73
82
  private fetchConfig;
74
83
  protected additionalSetup(playbackObject: PlaybackObject): void;
75
84
  private setupAnalyticsService;
85
+ protected getAdditionalAnalyticsData(playbackObject: PlaybackObject): HashObject;
76
86
  protected logStream(): void;
77
87
  protected getAnalyticsPlayerType(): AnalyticsPlayerType;
78
88
  protected createEl(id: string | Element): HTMLVideoElement;
@@ -6,6 +6,8 @@ import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject
6
6
  import { AnalyticsPlayerType } from 'projects/player/services/analytics-service';
7
7
  import { ProgressEvent } from 'projects/player/plugins/progress-reporter-plugin/progress-reporter-plugin';
8
8
  import 'projects/player/plugins/interactive-plugin/interactive-plugin';
9
+ import { PlayerWrapperOptions } from '../components/player/player';
10
+ import { HashObject } from 'libs/analytics/interfaces';
9
11
  export interface InteractivePlayerOptions extends BasePlayerOptions {
10
12
  mode?: InteractiveMode;
11
13
  imageApi?: URL;
@@ -21,10 +23,12 @@ export declare class InteractivePlayer extends BasePlayer {
21
23
  private resultsService;
22
24
  private totalProgress;
23
25
  constructor(id: string | Element, options: InteractivePlayerOptions);
26
+ protected getPlayerOptions(): PlayerWrapperOptions;
24
27
  protected onFlushProgress(events: ProgressEvent[]): void;
25
28
  protected additionalSetup(playbackObject: PlaybackObject): Promise<void>;
26
29
  private setupUpClipPlugin;
27
30
  private setupViewInteractivePlugin;
31
+ protected getAdditionalAnalyticsData(playbackObject: PlaybackObject): HashObject;
28
32
  protected getSeekBarOptions(): any;
29
33
  protected getAnalyticsPlayerType(): AnalyticsPlayerType;
30
34
  }
@@ -1,10 +1,5 @@
1
1
  import { BasePlayer, BasePlayerOptions } from './base-player';
2
- import 'projects/player/plugins/example-plugin/example-plugin';
3
- import 'projects/player/plugins/persist-volume-plugin/persist-volume-plugin';
4
- import 'projects/player/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin';
5
- import 'projects/player/plugins/open-externally-plugin/open-externally-plugin';
6
2
  import 'projects/player/plugins/clip-plugin/clip-plugin';
7
- import 'projects/player/plugins/touch-controls-plugin/touch-controls-plugin';
8
3
  import 'projects/player/plugins/next-video-plugin/next-video-plugin';
9
4
  import 'projects/player/plugins/create-clip-button-plugin/create-clip-button-plugin';
10
5
  import 'projects/player/plugins/resources-plugin/resources-plugin';
@@ -13,6 +8,7 @@ import 'projects/player/plugins/favourite-plugin/favourite-plugin';
13
8
  import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
14
9
  import { NextVideo } from 'projects/player/interfaces/NextVideo';
15
10
  export interface PlayerOptions extends BasePlayerOptions {
11
+ showResources?: boolean;
16
12
  }
17
13
  export declare class Player extends BasePlayer {
18
14
  protected options: PlayerOptions;
@@ -0,0 +1,14 @@
1
+ import { BasePlayer, BasePlayerOptions } from 'projects/player/players/base-player';
2
+ import 'projects/player/plugins/engagement-overlay-plugin/engagement-overlay-plugin';
3
+ import { AnalyticsPlayerType } from 'projects/player/services/analytics-service';
4
+ import './reports-player.scss';
5
+ export interface ReportsPlayerOptions extends BasePlayerOptions {
6
+ heatMap: number[];
7
+ }
8
+ export declare class ReportsPlayer extends BasePlayer {
9
+ protected options: ReportsPlayerOptions;
10
+ constructor(id: string | Element, options: ReportsPlayerOptions);
11
+ protected getPlayerClassName(): string;
12
+ protected configurePlugins(): void;
13
+ protected getAnalyticsPlayerType(): AnalyticsPlayerType;
14
+ }
@@ -0,0 +1,30 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
2
+ import 'projects/player/plugins/engagement-overlay-plugin/components/engagement-overlay';
3
+ declare const Plugin: {
4
+ new (player: VideoJsPlayer, options?: any): videojs.Plugin;
5
+ prototype: videojs.Plugin;
6
+ BASE_PLUGIN_NAME: string;
7
+ deregisterPlugin(name: string): void;
8
+ getPlugin(name: string): any;
9
+ getPluginVersion(name: string): string;
10
+ getPlugins(names?: string[]): {
11
+ [name: string]: videojs.Plugin;
12
+ };
13
+ isBasic(plugin: string | (() => any)): boolean;
14
+ registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
15
+ registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
16
+ };
17
+ interface EngagementOverlayPluginOptions {
18
+ heatMap: number[];
19
+ }
20
+ declare class EngagementOverlayPlugin extends Plugin {
21
+ private options;
22
+ constructor(player: VideoJsPlayer, options: EngagementOverlayPluginOptions);
23
+ private initialize;
24
+ }
25
+ declare module 'video.js' {
26
+ interface VideoJsPlayer {
27
+ engagementOverlayPlugin(options?: EngagementOverlayPluginOptions): EngagementOverlayPlugin;
28
+ }
29
+ }
30
+ export {};
@@ -1 +1,30 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
2
+ declare const Plugin: {
3
+ new (player: VideoJsPlayer, options?: any): videojs.Plugin;
4
+ prototype: videojs.Plugin;
5
+ BASE_PLUGIN_NAME: string;
6
+ deregisterPlugin(name: string): void;
7
+ getPlugin(name: string): any;
8
+ getPluginVersion(name: string): string;
9
+ getPlugins(names?: string[]): {
10
+ [name: string]: videojs.Plugin;
11
+ };
12
+ isBasic(plugin: string | (() => any)): boolean;
13
+ registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
14
+ registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
15
+ };
16
+ declare class FullscreenOnRotatePlugin extends Plugin {
17
+ constructor(player: VideoJsPlayer);
18
+ private initialize;
19
+ private onFullscreenChange;
20
+ private onRotate;
21
+ private hasScreenOrientation;
22
+ private hasScreenLock;
23
+ private getAngle;
24
+ }
25
+ declare module 'video.js' {
26
+ interface VideoJsPlayer {
27
+ fullscreenOnRotatePlugin(): FullscreenOnRotatePlugin;
28
+ }
29
+ }
1
30
  export {};
@@ -2,6 +2,7 @@ import { VideoJsPlayer } from 'video.js';
2
2
  import { Interaction, InteractionTypeId, Interactive, Timepoint } from 'libs/shared/interfaces';
3
3
  import { InteractiveMode, LatestSession } from 'projects/player/plugins/interactive-plugin/interfaces';
4
4
  import { ResultsService } from 'projects/player/plugins/interactive-plugin/utils/ResultsService';
5
+ import { AnalyticsService } from 'projects/player/services/analytics-service';
5
6
  interface UseStateManagerProps {
6
7
  mode: InteractiveMode;
7
8
  timepoint: Timepoint;
@@ -9,6 +10,7 @@ interface UseStateManagerProps {
9
10
  player: VideoJsPlayer;
10
11
  resultsService?: ResultsService;
11
12
  latestSession?: LatestSession;
13
+ analyticsService: AnalyticsService;
12
14
  setOpen: (open: boolean) => void;
13
15
  addCue: (timepointId: string) => void;
14
16
  updateCue: (oldTimepointId: string, timepointId: string) => void;
@@ -4,6 +4,7 @@ import { CurrentUser, Interactive } from 'libs/shared/interfaces';
4
4
  import { InteractiveMode, LatestSession } from 'projects/player/plugins/interactive-plugin/interfaces';
5
5
  import { ResultsService } from 'projects/player/plugins/interactive-plugin/utils/ResultsService';
6
6
  import { ProgressEvent } from 'projects/player/plugins/progress-reporter-plugin/progress-reporter-plugin';
7
+ import { AnalyticsService } from 'projects/player/services/analytics-service';
7
8
  import 'projects/player/plugins/interactive-plugin/components/interactive/interactive-component';
8
9
  import 'projects/player/plugins/interactive-plugin/components/continue-session/continue-session';
9
10
  import './interactive-plugin-styles.scss';
@@ -32,6 +33,7 @@ interface InteractivePluginOptions {
32
33
  progress?: ProgressEvent[];
33
34
  latestSession?: LatestSession;
34
35
  clipOffset?: number;
36
+ analyticsService: AnalyticsService;
35
37
  }
36
38
  declare class InteractivePlugin extends Plugin {
37
39
  private options;
@@ -1,6 +1,7 @@
1
1
  import videojs, { VideoJsPlayer } from 'video.js';
2
2
  import { NextVideo } from 'projects/player/interfaces/NextVideo';
3
3
  import 'projects/player/plugins/next-video-plugin/components/up-next/up-next';
4
+ import 'projects/player/components/next-video-menu-item/next-video-menu-item';
4
5
  declare const Plugin: {
5
6
  new (player: VideoJsPlayer, options?: any): videojs.Plugin;
6
7
  prototype: videojs.Plugin;
@@ -30,7 +31,7 @@ declare class NextVideoPlugin extends Plugin {
30
31
  setShouldPlayNext(val: boolean): void;
31
32
  private setChapterTrack;
32
33
  private bindListeners;
33
- private unbindListeners;
34
+ dispose(): void;
34
35
  private onTimeUpdate;
35
36
  private showUpNext;
36
37
  private hideUpNext;
@@ -1 +1,31 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
2
+ import { ExternalLinkOptions } from 'projects/player/plugins/open-externally-plugin/interfaces/ExternalLinkOptions';
1
3
  import 'projects/player/plugins/open-externally-plugin/components/open-externally-button';
4
+ declare const Plugin: {
5
+ new (player: VideoJsPlayer, options?: any): videojs.Plugin;
6
+ prototype: videojs.Plugin;
7
+ BASE_PLUGIN_NAME: string;
8
+ deregisterPlugin(name: string): void;
9
+ getPlugin(name: string): any;
10
+ getPluginVersion(name: string): string;
11
+ getPlugins(names?: string[]): {
12
+ [name: string]: videojs.Plugin;
13
+ };
14
+ isBasic(plugin: string | (() => any)): boolean;
15
+ registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
16
+ registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
17
+ };
18
+ interface OpenExternallyPluginOptions {
19
+ getExternalLink: (options: ExternalLinkOptions) => string;
20
+ }
21
+ declare class OpenExternallyPlugin extends Plugin {
22
+ private options;
23
+ constructor(player: VideoJsPlayer, options: OpenExternallyPluginOptions);
24
+ private onReady;
25
+ }
26
+ declare module 'video.js' {
27
+ interface VideoJsPlayer {
28
+ openExternallyPlugin(oprions: OpenExternallyPluginOptions): OpenExternallyPlugin;
29
+ }
30
+ }
31
+ export {};
@@ -20,7 +20,6 @@ interface PersistSubtitleSettingsPluginOptions {
20
20
  }
21
21
  declare class PersistSubtitleSettingsPlugin extends Plugin {
22
22
  private options;
23
- private trackGuess;
24
23
  constructor(player: VideoJsPlayer, options: PersistSubtitleSettingsPluginOptions);
25
24
  private initialize;
26
25
  private safeGet;
@@ -1 +1,26 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
2
+ declare const Plugin: {
3
+ new (player: VideoJsPlayer, options?: any): videojs.Plugin;
4
+ prototype: videojs.Plugin;
5
+ BASE_PLUGIN_NAME: string;
6
+ deregisterPlugin(name: string): void;
7
+ getPlugin(name: string): any;
8
+ getPluginVersion(name: string): string;
9
+ getPlugins(names?: string[]): {
10
+ [name: string]: videojs.Plugin;
11
+ };
12
+ isBasic(plugin: string | (() => any)): boolean;
13
+ registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
14
+ registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
15
+ };
16
+ declare class PersistVolumePlugin extends Plugin {
17
+ constructor(player: VideoJsPlayer);
18
+ private initialize;
19
+ private saveVolumeState;
20
+ }
21
+ declare module 'video.js' {
22
+ interface VideoJsPlayer {
23
+ persistVolumePlugin(): PersistVolumePlugin;
24
+ }
25
+ }
1
26
  export {};
@@ -15,7 +15,6 @@ declare const Plugin: {
15
15
  registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
16
16
  };
17
17
  interface PictureInPicturePluginOptions {
18
- initialIsInPictureInPicture: boolean;
19
18
  onRequestPictureInPicture: (isPiP: boolean) => void;
20
19
  }
21
20
  declare class PictureInPicturePlugin extends Plugin {
@@ -57,6 +57,7 @@ declare class ProgressReporterPlugin extends Plugin {
57
57
  private onEnded;
58
58
  private logEvent;
59
59
  private shouldUseCarriedOverTime;
60
+ private shouldSaveCarriedOverTime;
60
61
  private shouldClearCarriedOverTime;
61
62
  private flushBuffer;
62
63
  }
@@ -19,7 +19,9 @@ export declare class ProgressiveFilesPlugin extends Plugin {
19
19
  private sources;
20
20
  private _currentSource;
21
21
  private qualityLevels;
22
+ private options_;
22
23
  constructor(player: VideoJsPlayer, options: ProgressiveFilesPluginOptions);
24
+ private initialize;
23
25
  get currentSource(): Source;
24
26
  /**
25
27
  * Sets the current player source. If the id cannot be found, the current source is returned
@@ -27,6 +29,7 @@ export declare class ProgressiveFilesPlugin extends Plugin {
27
29
  */
28
30
  setSource(id: string): Source;
29
31
  getSourceById(id: string): Source;
32
+ private sortSources;
30
33
  private populateSources;
31
34
  private sourceChangeUpdateQualityLevels;
32
35
  }
@@ -1 +1,41 @@
1
+ import videojs, { VideoJsPlayer } from 'video.js';
1
2
  import './components/touch-controls/touch-controls';
3
+ declare const Plugin: {
4
+ new (player: VideoJsPlayer, options?: any): videojs.Plugin;
5
+ prototype: videojs.Plugin;
6
+ BASE_PLUGIN_NAME: string;
7
+ deregisterPlugin(name: string): void;
8
+ getPlugin(name: string): any;
9
+ getPluginVersion(name: string): string;
10
+ getPlugins(names?: string[]): {
11
+ [name: string]: videojs.Plugin;
12
+ };
13
+ isBasic(plugin: string | (() => any)): boolean;
14
+ registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
15
+ registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
16
+ };
17
+ declare class TouchControlsPlugin extends Plugin {
18
+ private tech;
19
+ private touchControls;
20
+ private touchStartTime;
21
+ private lastTouchTime;
22
+ private doubleTouchCount;
23
+ private seekStartTime;
24
+ private directionModifier;
25
+ constructor(player: VideoJsPlayer);
26
+ private bindFunctions;
27
+ private initialize;
28
+ private reBindEventListeners;
29
+ private unBindEventListeners;
30
+ dispose(): void;
31
+ private onTouchStart;
32
+ private onTouchEnd;
33
+ private resetProperties;
34
+ private onDoubleTouch;
35
+ }
36
+ declare module 'video.js' {
37
+ interface VideoJsPlayer {
38
+ touchControls(): TouchControlsPlugin;
39
+ }
40
+ }
41
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ReportsPlayerOptions } from 'projects/player/players/reports/reports-player';
3
+ export declare function ClickViewReportsPlayer(props: ReportsPlayerOptions): React.ReactElement;
@@ -1,19 +1,21 @@
1
1
  import { RegionName } from 'libs/analytics/enums/RegionName';
2
- import { RegionalUrl } from 'libs/analytics/interfaces';
2
+ import { RegionalUrl, AnalyticsOptions, HashObject } from 'libs/analytics/interfaces';
3
3
  import { ProgressEvent } from 'projects/player/plugins/progress-reporter-plugin/progress-reporter-plugin';
4
- export declare type AnalyticsPlayerType = 'player' | 'interactive-player' | 'create-clip-player';
4
+ export declare type AnalyticsPlayerType = 'player' | 'interactive-player' | 'create-clip-player' | 'reports-player';
5
5
  interface AnalyticsServiceOptions {
6
6
  collectionApiUrls: RegionalUrl;
7
7
  collectionApiClientId: string;
8
8
  productVersion: string;
9
9
  regionName: RegionName;
10
10
  videoId: string;
11
+ mediaId: string;
11
12
  userId: string;
12
13
  customerId: string;
13
14
  mediaType: 'MasterVideo' | 'MasterClip' | 'MasterInteractive';
14
15
  playerType: AnalyticsPlayerType;
15
16
  isEmbedded: boolean;
16
17
  isUsingLocalCache: boolean;
18
+ additionalAnalyticsData?: HashObject;
17
19
  }
18
20
  export declare class AnalyticsService {
19
21
  private options;
@@ -21,6 +23,8 @@ export declare class AnalyticsService {
21
23
  constructor(options: AnalyticsServiceOptions);
22
24
  logStream(): void;
23
25
  logVideoProgress(events: ProgressEvent[]): void;
26
+ logUserAction(analyticsData: HashObject | HashObject[], analyticsOptions: AnalyticsOptions): void;
27
+ private getAnalyticsData;
24
28
  private initialize;
25
29
  private setupCollectionApiClient;
26
30
  private getCurrentUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/player",
3
- "version": "0.0.6-rc.0",
3
+ "version": "0.0.7-rc.0",
4
4
  "description": "ClickView Player",
5
5
  "main": "dist/player-app.js",
6
6
  "scripts": {
@@ -27,8 +27,8 @@
27
27
  "devDependencies": {
28
28
  "@babel/core": "7.11.6",
29
29
  "@clickview/eslint-config": "1.0.1",
30
- "@clickview/player-font": "0.0.10",
31
- "@clickview/tooling": "0.0.24-rc.0",
30
+ "@clickview/player-font": "0.0.12",
31
+ "@clickview/tooling": "0.0.25-rc.0",
32
32
  "@storybook/react": "6.0.26",
33
33
  "@types/chromecast-caf-sender": "1.0.3",
34
34
  "@types/cropperjs": "1.3.0",
@@ -42,11 +42,12 @@
42
42
  "webpack-dev-server": "3.11.0"
43
43
  },
44
44
  "dependencies": {
45
- "@clickview/styles": "1.0.17-rc.0",
45
+ "@clickview/styles": "1.0.18-rc.0",
46
46
  "@microsoft/signalr": "5.0.2",
47
47
  "cropperjs": "1.5.6",
48
48
  "draft-convert": "2.1.10",
49
49
  "draft-js": "0.11.7",
50
+ "highcharts": "9.1.0",
50
51
  "keycode": "2.2.0",
51
52
  "node-polyglot": "2.3.0",
52
53
  "react-draft-wysiwyg": "1.14.5",