@clickview/player 0.0.6-dev.2 → 0.0.6-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.
- package/dist/en.json +1 -1
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +3 -21
- package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +42 -0
- package/dist/libs/common/src/backbone/core/AppLink.d.ts +4 -0
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +0 -8
- package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +5 -0
- package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +2 -2
- package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +1 -3
- package/dist/libs/shared/src/constants/AppVariables.d.ts +1 -0
- package/dist/libs/shared/src/enums/MasterType.d.ts +0 -1
- package/dist/libs/shared/src/enums/SettingName.d.ts +0 -1
- package/dist/libs/shared/src/hooks/useNavLock.d.ts +0 -2
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +4 -7
- package/dist/libs/shared/src/images/svg/actions/index.d.ts +1 -3
- package/dist/libs/shared/src/images/svg/objects/index.d.ts +1 -3
- package/dist/libs/shared/src/images/svg/player/index.d.ts +14 -0
- package/dist/libs/shared/src/images/svg/status/index.d.ts +1 -2
- package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +3 -6
- package/dist/libs/shared/src/interfaces/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +1 -1
- package/dist/libs/shared/src/interfaces/models/User.d.ts +1 -14
- package/dist/libs/shared/src/interfaces/models/interactive-results/InteractiveResultSet.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/interactive-results/StudentResult.d.ts +1 -2
- package/dist/libs/shared/src/interfaces/requests/CreateViewKeyRequest.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +1 -0
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +1 -2
- package/dist/player-app.css +21 -23
- package/dist/player-app.js +13 -13
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +0 -1
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +0 -1
- package/dist/projects/player/src/components/cog-button/cog-button.d.ts +5 -7
- package/dist/projects/player/src/components/collapserator/collapserator.d.ts +1 -1
- package/dist/projects/player/src/components/menu/menu.d.ts +0 -7
- package/dist/projects/player/src/components/player/player.d.ts +0 -4
- package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +0 -1
- package/dist/projects/player/src/components/subs-caps-button/subtitle-search-menu-item.d.ts +1 -2
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-button.d.ts +0 -2
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-input.d.ts +0 -1
- package/dist/projects/player/src/players/base-player.d.ts +3 -13
- package/dist/projects/player/src/players/interactive-player.d.ts +0 -4
- package/dist/projects/player/src/players/player.d.ts +5 -1
- package/dist/projects/player/src/plugins/example-plugin/components/example-button/example-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/example-plugin/example-plugin.d.ts +2 -0
- package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +0 -29
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useStateManager.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +0 -2
- package/dist/projects/player/src/plugins/next-video-plugin/next-video-plugin.d.ts +1 -2
- package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +0 -30
- package/dist/projects/player/src/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +0 -25
- package/dist/projects/player/src/plugins/picture-in-picture-plugin/picture-in-picture-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +0 -1
- package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +0 -3
- package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +0 -40
- package/dist/projects/player/src/services/analytics-service.d.ts +2 -6
- package/dist/projects/player/src/utils/scrollbar-helper.d.ts +6 -0
- package/package.json +4 -5
- package/dist/libs/shared/src/apps/search/interfaces/FilterProps.d.ts +0 -8
- package/dist/libs/shared/src/apps/search/interfaces/SearchFilter.d.ts +0 -29
- package/dist/libs/shared/src/apps/search/interfaces/SearchResults.d.ts +0 -26
- package/dist/libs/shared/src/apps/search/interfaces/SearchTypes.d.ts +0 -26
- package/dist/libs/shared/src/apps/search/interfaces/index.d.ts +0 -4
- package/dist/libs/shared/src/apps/search/reducers/FilterReducer.d.ts +0 -36
- package/dist/libs/shared/src/apps/search/reducers/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/FavouriteVideoFunc.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/responses/ShareSearchResponse.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/responses/index.d.ts +0 -1
- package/dist/projects/player/src/components/cog-button/collapsible-heading-menu-item.d.ts +0 -15
- package/dist/projects/player/src/components/keyboard-shortcuts-button/keyboard-shortcuts-button.d.ts +0 -1
- package/dist/projects/player/src/components/play-pause-feedback/play-pause-feedback.d.ts +0 -1
- package/dist/projects/player/src/components/play-toggle/play-toggle.d.ts +0 -1
- package/dist/projects/player/src/components/subs-caps-button/off-text-track-menu-item.d.ts +0 -1
- package/dist/projects/player/src/players/reports/reports-player.d.ts +0 -14
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay.d.ts +0 -1
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/engagement-overlay-plugin.d.ts +0 -30
- package/dist/projects/player/src/react/ReportsPlayer.d.ts +0 -3
- /package/dist/projects/player/src/{components/seek-bar/seek-bar.d.ts → plugins/example-plugin/components/example-react-button/example-react-button.d.ts} +0 -0
|
@@ -1,18 +1,15 @@
|
|
|
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';
|
|
3
4
|
import './cog-button.scss';
|
|
4
5
|
declare const MenuItem: {
|
|
5
6
|
new (player: VideoJsPlayer, options?: videojs.MenuItemOptions): videojs.MenuItem;
|
|
6
7
|
prototype: videojs.MenuItem;
|
|
7
8
|
};
|
|
8
|
-
interface AdditionalMenuItem {
|
|
9
|
-
index: number;
|
|
10
|
-
ctor: typeof MenuItem;
|
|
11
|
-
}
|
|
12
9
|
interface CogMenuItemOptions extends videojs.ComponentOptions {
|
|
13
10
|
item: CollapsibleComponent;
|
|
14
11
|
}
|
|
15
|
-
|
|
12
|
+
declare class CogMenuItem extends MenuItem {
|
|
16
13
|
options_: CogMenuItemOptions;
|
|
17
14
|
constructor(player: VideoJsPlayer, options: CogMenuItemOptions);
|
|
18
15
|
handleClick(event: videojs.EventTarget.Event): void;
|
|
@@ -27,10 +24,11 @@ interface CogButtonOptions extends videojs.ComponentOptions {
|
|
|
27
24
|
}
|
|
28
25
|
export declare class CogButton extends MenuButton {
|
|
29
26
|
options_: CogButtonOptions;
|
|
30
|
-
private
|
|
27
|
+
private renderPlayNext;
|
|
31
28
|
constructor(player: VideoJsPlayer, options: CogButtonOptions);
|
|
32
29
|
buildWrapperCSSClass(): string;
|
|
33
30
|
buildCSSClass(): string;
|
|
31
|
+
pressButton(): void;
|
|
34
32
|
/**
|
|
35
33
|
* Create the list of menu items. Specific to each subclass.
|
|
36
34
|
*
|
|
@@ -38,6 +36,6 @@ export declare class CogButton extends MenuButton {
|
|
|
38
36
|
*/
|
|
39
37
|
createItems(): CogMenuItem[];
|
|
40
38
|
update(): void;
|
|
41
|
-
|
|
39
|
+
showPlayNext(): void;
|
|
42
40
|
}
|
|
43
41
|
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';
|
|
5
4
|
import './collapserator.scss';
|
|
5
|
+
import '../play-toggle/play-toggle.scss';
|
|
6
6
|
import '../fullscreen-toggle/fullscreen-toggle.scss';
|
|
@@ -5,13 +5,6 @@ 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;
|
|
15
8
|
/**
|
|
16
9
|
* The video.js Menu handleBlur function checks if the target is an immediate child
|
|
17
10
|
* but we have scenarios where the target is not an immediate child
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { VideoJsPlayerOptions } from 'video.js';
|
|
2
1
|
import './player.scss';
|
|
3
2
|
export declare const IS_IPOD: boolean;
|
|
4
3
|
export declare const IS_ANDROID: boolean;
|
|
5
|
-
export interface PlayerWrapperOptions extends VideoJsPlayerOptions {
|
|
6
|
-
setMaxHeight?: boolean;
|
|
7
|
-
}
|
|
8
4
|
declare module 'video.js' {
|
|
9
5
|
interface VideoJsPlayer {
|
|
10
6
|
lock(callback: (success: () => void) => void): void;
|
|
@@ -48,8 +48,7 @@ declare const TextTrackMenuItem: {
|
|
|
48
48
|
};
|
|
49
49
|
export declare class SubtitleSearchMenuItem extends TextTrackMenuItem {
|
|
50
50
|
constructor(player: VideoJsPlayer);
|
|
51
|
-
private
|
|
52
|
-
private bindTrackEvents;
|
|
51
|
+
private toggleHidden;
|
|
53
52
|
handleClick(): void;
|
|
54
53
|
}
|
|
55
54
|
export {};
|
package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-button.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ 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;
|
|
12
11
|
createItems(): SubtitleResultMenuItem[];
|
|
13
12
|
search(text: string): void;
|
|
14
13
|
private findMatches;
|
|
@@ -16,7 +15,6 @@ export declare class SubtitleSearchButton extends MenuButton implements Collapsi
|
|
|
16
15
|
private toggleNoResults;
|
|
17
16
|
buildWrapperCSSClass(): string;
|
|
18
17
|
update(): void;
|
|
19
|
-
pressButton(): void;
|
|
20
18
|
/**
|
|
21
19
|
* CollapsibileComponent interface implementation
|
|
22
20
|
* from here onward
|
package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-input.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export declare class SubtitleSearchInput extends MenuItem {
|
|
|
11
11
|
options_: SubtitleSearchInputOptions;
|
|
12
12
|
constructor(player: VideoJsPlayer, options: SubtitleSearchInputOptions);
|
|
13
13
|
createEl(): HTMLLIElement;
|
|
14
|
-
focus(): void;
|
|
15
14
|
/**
|
|
16
15
|
* Because we extend MenuItem which will close the menu by default
|
|
17
16
|
* we need to halt the event propogation here
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { VideoJsPlayer } from 'video.js';
|
|
1
|
+
import { VideoJsPlayer, VideoJsPlayerOptions } 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';
|
|
7
3
|
import 'projects/player/plugins/progressive-files-plugin/progressive-files-plugin';
|
|
8
4
|
import 'projects/player/plugins/localcache-plugin/localcache-plugin';
|
|
9
5
|
import 'projects/player/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin';
|
|
@@ -15,8 +11,6 @@ import 'projects/player/components/menu/menu';
|
|
|
15
11
|
import 'projects/player/components/menu-button/menu-button';
|
|
16
12
|
import 'projects/player/components/time-wrapper/time-wrapper';
|
|
17
13
|
import 'projects/player/components/collapserator/collapserator';
|
|
18
|
-
/** Seekbar must be imported before chapter-seek-bar */
|
|
19
|
-
import 'projects/player/components/seek-bar/seek-bar';
|
|
20
14
|
import 'projects/player/components/chapter-seek-bar/chapter-seek-bar';
|
|
21
15
|
import 'projects/player/components/progress-control/progress-control';
|
|
22
16
|
import 'projects/player/components/mouse-time-display/mouse-time-display';
|
|
@@ -26,8 +20,6 @@ import 'projects/player/components/quality-selector/quality-button';
|
|
|
26
20
|
import 'projects/player/components/playback-rate-button/playback-rate-button';
|
|
27
21
|
import 'projects/player/components/text-track-settings/text-track-settings';
|
|
28
22
|
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';
|
|
31
23
|
/**
|
|
32
24
|
* *.scss imports must be relative
|
|
33
25
|
*/
|
|
@@ -40,8 +32,6 @@ import { ExternalLinkOptions } from 'projects/player/plugins/open-externally-plu
|
|
|
40
32
|
import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
|
|
41
33
|
import { AnalyticsPlayerType, AnalyticsService } from 'projects/player/services/analytics-service';
|
|
42
34
|
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';
|
|
45
35
|
export interface BasePlayerOptions {
|
|
46
36
|
autoplay?: boolean;
|
|
47
37
|
viewKey: string;
|
|
@@ -52,6 +42,7 @@ export interface BasePlayerOptions {
|
|
|
52
42
|
playerApi?: URL;
|
|
53
43
|
enableLocalCache?: boolean;
|
|
54
44
|
onRequestPictureInPicture?: (isPiP: boolean) => void;
|
|
45
|
+
showResources?: boolean;
|
|
55
46
|
imageCdnUrl?: string;
|
|
56
47
|
/**
|
|
57
48
|
* An optional external element for binding hotkey
|
|
@@ -77,12 +68,11 @@ export declare abstract class BasePlayer {
|
|
|
77
68
|
protected configurePlugins(): void;
|
|
78
69
|
protected onFlushProgress(events: ProgressEvent[]): void;
|
|
79
70
|
protected buildVideoJs(): VideoJsPlayer;
|
|
80
|
-
protected getPlayerOptions():
|
|
71
|
+
protected getPlayerOptions(): VideoJsPlayerOptions;
|
|
81
72
|
protected fetch(): Promise<void>;
|
|
82
73
|
private fetchConfig;
|
|
83
74
|
protected additionalSetup(playbackObject: PlaybackObject): void;
|
|
84
75
|
private setupAnalyticsService;
|
|
85
|
-
protected getAdditionalAnalyticsData(playbackObject: PlaybackObject): HashObject;
|
|
86
76
|
protected logStream(): void;
|
|
87
77
|
protected getAnalyticsPlayerType(): AnalyticsPlayerType;
|
|
88
78
|
protected createEl(id: string | Element): HTMLVideoElement;
|
|
@@ -6,8 +6,6 @@ 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';
|
|
11
9
|
export interface InteractivePlayerOptions extends BasePlayerOptions {
|
|
12
10
|
mode?: InteractiveMode;
|
|
13
11
|
imageApi?: URL;
|
|
@@ -23,12 +21,10 @@ export declare class InteractivePlayer extends BasePlayer {
|
|
|
23
21
|
private resultsService;
|
|
24
22
|
private totalProgress;
|
|
25
23
|
constructor(id: string | Element, options: InteractivePlayerOptions);
|
|
26
|
-
protected getPlayerOptions(): PlayerWrapperOptions;
|
|
27
24
|
protected onFlushProgress(events: ProgressEvent[]): void;
|
|
28
25
|
protected additionalSetup(playbackObject: PlaybackObject): Promise<void>;
|
|
29
26
|
private setupUpClipPlugin;
|
|
30
27
|
private setupViewInteractivePlugin;
|
|
31
|
-
protected getAdditionalAnalyticsData(playbackObject: PlaybackObject): HashObject;
|
|
32
28
|
protected getSeekBarOptions(): any;
|
|
33
29
|
protected getAnalyticsPlayerType(): AnalyticsPlayerType;
|
|
34
30
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
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';
|
|
2
6
|
import 'projects/player/plugins/clip-plugin/clip-plugin';
|
|
7
|
+
import 'projects/player/plugins/touch-controls-plugin/touch-controls-plugin';
|
|
3
8
|
import 'projects/player/plugins/next-video-plugin/next-video-plugin';
|
|
4
9
|
import 'projects/player/plugins/create-clip-button-plugin/create-clip-button-plugin';
|
|
5
10
|
import 'projects/player/plugins/resources-plugin/resources-plugin';
|
|
@@ -8,7 +13,6 @@ import 'projects/player/plugins/favourite-plugin/favourite-plugin';
|
|
|
8
13
|
import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
|
|
9
14
|
import { NextVideo } from 'projects/player/interfaces/NextVideo';
|
|
10
15
|
export interface PlayerOptions extends BasePlayerOptions {
|
|
11
|
-
showResources?: boolean;
|
|
12
16
|
}
|
|
13
17
|
export declare class Player extends BasePlayer {
|
|
14
18
|
protected options: PlayerOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './example-button.scss';
|
|
@@ -1,30 +1 @@
|
|
|
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
|
-
}
|
|
30
1
|
export {};
|
|
@@ -2,7 +2,6 @@ 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';
|
|
6
5
|
interface UseStateManagerProps {
|
|
7
6
|
mode: InteractiveMode;
|
|
8
7
|
timepoint: Timepoint;
|
|
@@ -10,7 +9,6 @@ interface UseStateManagerProps {
|
|
|
10
9
|
player: VideoJsPlayer;
|
|
11
10
|
resultsService?: ResultsService;
|
|
12
11
|
latestSession?: LatestSession;
|
|
13
|
-
analyticsService: AnalyticsService;
|
|
14
12
|
setOpen: (open: boolean) => void;
|
|
15
13
|
addCue: (timepointId: string) => void;
|
|
16
14
|
updateCue: (oldTimepointId: string, timepointId: string) => void;
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
import 'projects/player/plugins/interactive-plugin/components/interactive/interactive-component';
|
|
9
8
|
import 'projects/player/plugins/interactive-plugin/components/continue-session/continue-session';
|
|
10
9
|
import './interactive-plugin-styles.scss';
|
|
@@ -33,7 +32,6 @@ interface InteractivePluginOptions {
|
|
|
33
32
|
progress?: ProgressEvent[];
|
|
34
33
|
latestSession?: LatestSession;
|
|
35
34
|
clipOffset?: number;
|
|
36
|
-
analyticsService: AnalyticsService;
|
|
37
35
|
}
|
|
38
36
|
declare class InteractivePlugin extends Plugin {
|
|
39
37
|
private options;
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
declare const Plugin: {
|
|
6
5
|
new (player: VideoJsPlayer, options?: any): videojs.Plugin;
|
|
7
6
|
prototype: videojs.Plugin;
|
|
@@ -31,7 +30,7 @@ declare class NextVideoPlugin extends Plugin {
|
|
|
31
30
|
setShouldPlayNext(val: boolean): void;
|
|
32
31
|
private setChapterTrack;
|
|
33
32
|
private bindListeners;
|
|
34
|
-
|
|
33
|
+
private unbindListeners;
|
|
35
34
|
private onTimeUpdate;
|
|
36
35
|
private showUpNext;
|
|
37
36
|
private hideUpNext;
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
-
import { ExternalLinkOptions } from 'projects/player/plugins/open-externally-plugin/interfaces/ExternalLinkOptions';
|
|
3
1
|
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,6 +20,7 @@ interface PersistSubtitleSettingsPluginOptions {
|
|
|
20
20
|
}
|
|
21
21
|
declare class PersistSubtitleSettingsPlugin extends Plugin {
|
|
22
22
|
private options;
|
|
23
|
+
private trackGuess;
|
|
23
24
|
constructor(player: VideoJsPlayer, options: PersistSubtitleSettingsPluginOptions);
|
|
24
25
|
private initialize;
|
|
25
26
|
private safeGet;
|
|
@@ -1,26 +1 @@
|
|
|
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
|
-
}
|
|
26
1
|
export {};
|
package/dist/projects/player/src/plugins/picture-in-picture-plugin/picture-in-picture-plugin.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ 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;
|
|
18
19
|
onRequestPictureInPicture: (isPiP: boolean) => void;
|
|
19
20
|
}
|
|
20
21
|
declare class PictureInPicturePlugin extends Plugin {
|
package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts
CHANGED
|
@@ -19,9 +19,7 @@ export declare class ProgressiveFilesPlugin extends Plugin {
|
|
|
19
19
|
private sources;
|
|
20
20
|
private _currentSource;
|
|
21
21
|
private qualityLevels;
|
|
22
|
-
private options_;
|
|
23
22
|
constructor(player: VideoJsPlayer, options: ProgressiveFilesPluginOptions);
|
|
24
|
-
private initialize;
|
|
25
23
|
get currentSource(): Source;
|
|
26
24
|
/**
|
|
27
25
|
* Sets the current player source. If the id cannot be found, the current source is returned
|
|
@@ -29,7 +27,6 @@ export declare class ProgressiveFilesPlugin extends Plugin {
|
|
|
29
27
|
*/
|
|
30
28
|
setSource(id: string): Source;
|
|
31
29
|
getSourceById(id: string): Source;
|
|
32
|
-
private sortSources;
|
|
33
30
|
private populateSources;
|
|
34
31
|
private sourceChangeUpdateQualityLevels;
|
|
35
32
|
}
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
1
|
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 {};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { RegionName } from 'libs/analytics/enums/RegionName';
|
|
2
|
-
import { RegionalUrl
|
|
2
|
+
import { RegionalUrl } 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';
|
|
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;
|
|
12
11
|
userId: string;
|
|
13
12
|
customerId: string;
|
|
14
13
|
mediaType: 'MasterVideo' | 'MasterClip' | 'MasterInteractive';
|
|
15
14
|
playerType: AnalyticsPlayerType;
|
|
16
15
|
isEmbedded: boolean;
|
|
17
16
|
isUsingLocalCache: boolean;
|
|
18
|
-
additionalAnalyticsData?: HashObject;
|
|
19
17
|
}
|
|
20
18
|
export declare class AnalyticsService {
|
|
21
19
|
private options;
|
|
@@ -23,8 +21,6 @@ export declare class AnalyticsService {
|
|
|
23
21
|
constructor(options: AnalyticsServiceOptions);
|
|
24
22
|
logStream(): void;
|
|
25
23
|
logVideoProgress(events: ProgressEvent[]): void;
|
|
26
|
-
logUserAction(analyticsData: HashObject | HashObject[], analyticsOptions: AnalyticsOptions): void;
|
|
27
|
-
private getAnalyticsData;
|
|
28
24
|
private initialize;
|
|
29
25
|
private setupCollectionApiClient;
|
|
30
26
|
private getCurrentUser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/player",
|
|
3
|
-
"version": "0.0.6-
|
|
3
|
+
"version": "0.0.6-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.
|
|
31
|
-
"@clickview/tooling": "0.0.24-
|
|
30
|
+
"@clickview/player-font": "0.0.10",
|
|
31
|
+
"@clickview/tooling": "0.0.24-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,12 +42,11 @@
|
|
|
42
42
|
"webpack-dev-server": "3.11.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@clickview/styles": "1.0.17-
|
|
45
|
+
"@clickview/styles": "1.0.17-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",
|
|
51
50
|
"keycode": "2.2.0",
|
|
52
51
|
"node-polyglot": "2.3.0",
|
|
53
52
|
"react-draft-wysiwyg": "1.14.5",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FilterState } from 'libs/shared/apps/search/reducers';
|
|
2
|
-
import { SearchFilter, MoreFilters } from './SearchFilter';
|
|
3
|
-
export declare type FilterProps = {
|
|
4
|
-
filter: SearchFilter | MoreFilters;
|
|
5
|
-
draftState: FilterState;
|
|
6
|
-
setDraftState: (draftState: FilterState) => void;
|
|
7
|
-
isOnMoreFilters?: boolean;
|
|
8
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FilterProps } from './FilterProps';
|
|
3
|
-
import { SearchIndices } from './SearchResults';
|
|
4
|
-
import { FilterStateHash } from '../reducers';
|
|
5
|
-
export declare type FilterIds = 'sortName' | 'audience' | 'yearGroup' | 'type' | 'rating' | 'interactives' | 'clips' | 'classroom' | 'hasResources' | 'hasSubtitles' | 'productionYear' | 'isHd' | 'producedByClickView' | 'duration' | 'tagOrClassification' | 'status' | 'isAdmin';
|
|
6
|
-
export declare type FilterType = 'radio' | 'checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown' | 'tag';
|
|
7
|
-
export interface SearchFilter {
|
|
8
|
-
id: FilterIds;
|
|
9
|
-
type: FilterType;
|
|
10
|
-
compatibleIndices: SearchIndices[];
|
|
11
|
-
name?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
options?: FilterOption[];
|
|
14
|
-
customComponent?: (props: FilterProps) => JSX.Element;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
disableOptions?: (options: FilterOption[], filters: SearchFilter[], state: FilterStateHash) => FilterOption[];
|
|
17
|
-
}
|
|
18
|
-
export interface MoreFilters extends Omit<SearchFilter, 'id' | 'compatibleIndices'> {
|
|
19
|
-
filters: SearchFilter[];
|
|
20
|
-
id: string;
|
|
21
|
-
}
|
|
22
|
-
export interface FilterOption<TId = string> {
|
|
23
|
-
id: TId;
|
|
24
|
-
name: string;
|
|
25
|
-
default?: boolean;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare type ProductionYearFilterOptions = 'any-year' | 'this-year' | 'last-3-years' | 'last-10-years';
|
|
29
|
-
export declare type DurationFilterOptions = 'short' | 'medium' | 'long';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Video, Classification, Playlist, Series, Clip, InteractiveMetadata, User } from 'libs/shared/interfaces';
|
|
2
|
-
export declare type SearchResultsObject<T> = T & {
|
|
3
|
-
_index: SearchIndices;
|
|
4
|
-
_featured?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare type SearchResultObjectTypes = SearchResultsObject<Video> | SearchResultsObject<Classification> | SearchResultsObject<Series> | SearchResultsObject<Playlist> | SearchResultsObject<Clip> | SearchResultsObject<InteractiveMetadata> | SearchResultsObject<User>;
|
|
7
|
-
export declare type SearchIndices = 'video' | 'series' | 'playlist' | 'classification' | 'clip' | 'interactive' | 'user';
|
|
8
|
-
export interface SearchResults<T = SearchResultObjectTypes> {
|
|
9
|
-
results: T[];
|
|
10
|
-
totalResults: number;
|
|
11
|
-
/**
|
|
12
|
-
* If the user's search query has no results, and there is a "suggested query"
|
|
13
|
-
* that the backend finds with a high score, it substitutes the user's query
|
|
14
|
-
* with that suggested query, and returns it on this field so that we are aware
|
|
15
|
-
* on the frontend.
|
|
16
|
-
*/
|
|
17
|
-
substituteQuery?: string;
|
|
18
|
-
/**
|
|
19
|
-
* If no suggestions have a high enough "score" to substitute the original query,
|
|
20
|
-
* a list of all of the best suggestions are returned.
|
|
21
|
-
*/
|
|
22
|
-
suggestions?: string[];
|
|
23
|
-
}
|
|
24
|
-
export declare type TabulatedSearchResults = Omit<SearchResults, 'results'> & {
|
|
25
|
-
results: SearchResultObjectTypes[][];
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="typeahead" />
|
|
2
|
-
import { ObjectHash } from 'backbone';
|
|
3
|
-
export interface RemoteSearch<T> extends Bloodhound.BloodhoundOptions<T> {
|
|
4
|
-
remote: Bloodhound.RemoteOptions<T>;
|
|
5
|
-
}
|
|
6
|
-
export interface LocalSearch<T> extends Bloodhound.BloodhoundOptions<T> {
|
|
7
|
-
local: T[] | (() => T[]);
|
|
8
|
-
}
|
|
9
|
-
export declare type TypeaheadDataSource<T> = Bloodhound<T> | ((query: string, syncResults: (result: T[]) => void, asyncResults?: (result: T[]) => void) => void);
|
|
10
|
-
export interface InstantSearchBloodhound<T> {
|
|
11
|
-
bloodhound: TypeaheadDataSource<T>;
|
|
12
|
-
name: string;
|
|
13
|
-
}
|
|
14
|
-
export declare type TypeaheadConfig<T> = Twitter.Typeahead.Dataset<T>;
|
|
15
|
-
export interface TypeaheadConfigHandler<T> {
|
|
16
|
-
(source?: InstantSearchBloodhound<T>, index?: number, options?: ObjectHash): Twitter.Typeahead.Dataset<T>;
|
|
17
|
-
}
|
|
18
|
-
export interface BloodhoundConfigHandler<T> {
|
|
19
|
-
(source: string, options?: ObjectHash): LocalSearch<T> | RemoteSearch<T>;
|
|
20
|
-
}
|
|
21
|
-
export interface TypeaheadSourceItem<T> {
|
|
22
|
-
name: string;
|
|
23
|
-
typeaheadConfig: TypeaheadConfigHandler<T>;
|
|
24
|
-
bloodhoundConfig?: BloodhoundConfigHandler<T>;
|
|
25
|
-
options?: ObjectHash;
|
|
26
|
-
}
|