@clickview/player 0.0.20 → 0.0.21-rc.3
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 -0
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +2 -0
- package/dist/libs/shared/src/components/immersive-reader/ImmersiveReader.d.ts +2 -0
- package/dist/libs/shared/src/components/popup/PopupButtons.d.ts +2 -1
- package/dist/libs/shared/src/interfaces/models/BaseShareObject.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +2 -0
- package/dist/libs/shared/src/interfaces/models/User.d.ts +0 -4
- package/dist/libs/shared/src/utils/DialogHelper.d.ts +1 -0
- package/dist/player-app.css +2 -0
- package/dist/player-app.js +19 -19
- package/dist/projects/player/src/players/base-player.d.ts +4 -2
- package/dist/projects/player/src/players/interactive-player.d.ts +2 -2
- package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/InteractiveSummaryWrapper.d.ts +2 -2
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/interactive-summary.d.ts +2 -2
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/progress-summary/progress-summary.d.ts +2 -2
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +2 -2
- package/dist/projects/player/src/plugins/progress-reporter-plugin/components/progress-reporter-display.d.ts +57 -0
- package/dist/projects/player/src/plugins/progress-reporter-plugin/interfaces/ProgressEvent.d.ts +8 -0
- package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +6 -9
- package/dist/projects/player/src/services/analytics-service.d.ts +2 -2
- package/package.json +3 -3
|
@@ -39,7 +39,7 @@ import '../components/text-track-display/text-track-display.scss';
|
|
|
39
39
|
import { ExternalLinkOptions } from 'projects/player/plugins/open-externally-plugin/interfaces/ExternalLinkOptions';
|
|
40
40
|
import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
|
|
41
41
|
import { AnalyticsPlayerType, AnalyticsService } from 'projects/player/services/analytics-service';
|
|
42
|
-
import {
|
|
42
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
43
43
|
import { PlayerWrapperOptions } from 'projects/player/components/player/player';
|
|
44
44
|
import { HashObject } from 'libs/analytics/interfaces';
|
|
45
45
|
export interface BasePlayerOptions {
|
|
@@ -75,7 +75,7 @@ export declare abstract class BasePlayer {
|
|
|
75
75
|
protected initialize(): void;
|
|
76
76
|
private _configurePlugins;
|
|
77
77
|
protected configurePlugins(): void;
|
|
78
|
-
protected onFlushProgress(events:
|
|
78
|
+
protected onFlushProgress(events: ProgressEventPair[]): void;
|
|
79
79
|
protected buildVideoJs(): VideoJsPlayer;
|
|
80
80
|
protected getPlayerOptions(): PlayerWrapperOptions;
|
|
81
81
|
protected fetch(): Promise<void>;
|
|
@@ -95,6 +95,8 @@ export declare abstract class BasePlayer {
|
|
|
95
95
|
ready(callback: () => void): void;
|
|
96
96
|
isDisposed(): boolean;
|
|
97
97
|
play(): void;
|
|
98
|
+
pause(): void;
|
|
99
|
+
isPaused(): boolean;
|
|
98
100
|
currentTime(time?: number): number | void;
|
|
99
101
|
private bindEventListeners;
|
|
100
102
|
private setupSeekBar;
|
|
@@ -8,7 +8,7 @@ import 'projects/player/plugins/interactive-plugin/interactive-plugin';
|
|
|
8
8
|
import { InteractiveMode } from 'projects/player/plugins/interactive-plugin/interfaces';
|
|
9
9
|
import { PlaybackObject } from 'projects/player/interfaces/models/PlaybackObject';
|
|
10
10
|
import { AnalyticsPlayerType } from 'projects/player/services/analytics-service';
|
|
11
|
-
import {
|
|
11
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
12
12
|
import { PlayerWrapperOptions } from 'projects/player/components/player/player';
|
|
13
13
|
import { BasePlayer, BasePlayerOptions } from './base-player';
|
|
14
14
|
declare type CollectResultsOptionalOptions = {
|
|
@@ -40,7 +40,7 @@ export declare class InteractivePlayer extends BasePlayer {
|
|
|
40
40
|
private totalProgress;
|
|
41
41
|
constructor(id: string | Element, options: InteractivePlayerOptions);
|
|
42
42
|
protected getPlayerOptions(): PlayerWrapperOptions;
|
|
43
|
-
protected onFlushProgress(events:
|
|
43
|
+
protected onFlushProgress(events: ProgressEventPair[]): void;
|
|
44
44
|
protected additionalSetup(playbackObject: PlaybackObject): Promise<void>;
|
|
45
45
|
private setupUpClipPlugin;
|
|
46
46
|
private setupViewInteractivePlugin;
|
|
@@ -3,14 +3,14 @@ import { VideoJsPlayer } from 'video.js';
|
|
|
3
3
|
import { HtmlPortalNode } from 'react-reverse-portal';
|
|
4
4
|
import { CurrentUser, Interactive } from 'libs/shared/interfaces';
|
|
5
5
|
import { InteractiveState } from 'projects/player/plugins/interactive-plugin/interfaces';
|
|
6
|
-
import {
|
|
6
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
7
7
|
import { ResultsService } from 'projects/player/plugins/interactive-plugin/utils/ResultsService';
|
|
8
8
|
interface InteractiveSummaryWrapperProps {
|
|
9
9
|
title: string;
|
|
10
10
|
currentUser: CurrentUser;
|
|
11
11
|
player: VideoJsPlayer;
|
|
12
12
|
state: InteractiveState;
|
|
13
|
-
progress?:
|
|
13
|
+
progress?: ProgressEventPair[];
|
|
14
14
|
interactive: Interactive;
|
|
15
15
|
portalNode: HtmlPortalNode;
|
|
16
16
|
resultsService: ResultsService;
|
|
@@ -3,7 +3,7 @@ import { HtmlPortalNode } from 'react-reverse-portal';
|
|
|
3
3
|
import { VideoJsPlayer } from 'video.js';
|
|
4
4
|
import { ResultsService } from 'projects/player/plugins/interactive-plugin/utils/ResultsService';
|
|
5
5
|
import { CurrentUser, Interactive } from 'libs/shared/interfaces';
|
|
6
|
-
import {
|
|
6
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
7
7
|
import { InteractiveState } from 'projects/player/plugins/interactive-plugin/interfaces';
|
|
8
8
|
interface InteractiveSummaryProps {
|
|
9
9
|
title: string;
|
|
@@ -13,7 +13,7 @@ interface InteractiveSummaryProps {
|
|
|
13
13
|
currentUser: CurrentUser;
|
|
14
14
|
player: VideoJsPlayer;
|
|
15
15
|
state: InteractiveState;
|
|
16
|
-
progress?:
|
|
16
|
+
progress?: ProgressEventPair[];
|
|
17
17
|
interactive: Interactive;
|
|
18
18
|
portalNode: HtmlPortalNode;
|
|
19
19
|
resultsService?: ResultsService;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Interactive } from 'libs/shared/interfaces';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { VideoJsPlayer } from 'video.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
5
5
|
interface ProgressSummaryProps {
|
|
6
6
|
player: VideoJsPlayer;
|
|
7
7
|
duration: number;
|
|
8
|
-
progress?:
|
|
8
|
+
progress?: ProgressEventPair[];
|
|
9
9
|
interactive: Interactive;
|
|
10
10
|
}
|
|
11
11
|
export declare function ProgressSummary(props: ProgressSummaryProps): React.ReactElement;
|
|
@@ -3,7 +3,7 @@ import { HtmlPortalNode } from 'react-reverse-portal';
|
|
|
3
3
|
import { CurrentUser, Interactive, Config } 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
|
-
import {
|
|
6
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
7
7
|
import { AnalyticsService } from 'projects/player/services/analytics-service';
|
|
8
8
|
import 'projects/player/plugins/interactive-plugin/components/interactive/interactive-component';
|
|
9
9
|
import 'projects/player/plugins/interactive-plugin/components/continue-session/continue-session';
|
|
@@ -34,7 +34,7 @@ interface InteractivePluginOptions {
|
|
|
34
34
|
actionsPortalNode?: HtmlPortalNode;
|
|
35
35
|
questionListPortalNode?: HtmlPortalNode;
|
|
36
36
|
summaryPortalNode?: HtmlPortalNode;
|
|
37
|
-
progress?:
|
|
37
|
+
progress?: ProgressEventPair[];
|
|
38
38
|
latestSession?: LatestSession;
|
|
39
39
|
clipOffset?: number;
|
|
40
40
|
analyticsService: AnalyticsService;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
3
|
+
import './progress-reporter-display.scss';
|
|
4
|
+
declare const Component: {
|
|
5
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions, ready?: videojs.Component.ReadyCallback): videojs.Component;
|
|
6
|
+
prototype: videojs.Component;
|
|
7
|
+
getComponent(name: "Button" | "button"): {
|
|
8
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.Button;
|
|
9
|
+
prototype: videojs.Button;
|
|
10
|
+
};
|
|
11
|
+
getComponent(name: "ClickableComponent" | "clickablecomponent"): {
|
|
12
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.ClickableComponent;
|
|
13
|
+
prototype: videojs.ClickableComponent;
|
|
14
|
+
};
|
|
15
|
+
getComponent(name: "ModalDialog" | "modaldialog"): {
|
|
16
|
+
new (player: VideoJsPlayer, options?: videojs.ModalDialogOptions): videojs.ModalDialog;
|
|
17
|
+
prototype: videojs.ModalDialog;
|
|
18
|
+
};
|
|
19
|
+
getComponent(name: "Menu" | "menu"): {
|
|
20
|
+
new (player: VideoJsPlayer, options?: videojs.MenuOptions): videojs.Menu;
|
|
21
|
+
prototype: videojs.Menu;
|
|
22
|
+
};
|
|
23
|
+
getComponent(name: "MenuButton" | "menubutton"): {
|
|
24
|
+
new (player: VideoJsPlayer, options?: videojs.MenuButtonOptions): videojs.MenuButton;
|
|
25
|
+
prototype: videojs.MenuButton;
|
|
26
|
+
};
|
|
27
|
+
getComponent(name: "MenuItem" | "menuitem"): {
|
|
28
|
+
new (player: VideoJsPlayer, options?: videojs.MenuItemOptions): videojs.MenuItem;
|
|
29
|
+
prototype: videojs.MenuItem;
|
|
30
|
+
};
|
|
31
|
+
getComponent(name: "MouseTimeDisplay" | "mouseTimeDisplay"): {
|
|
32
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.MouseTimeDisplay;
|
|
33
|
+
prototype: videojs.MouseTimeDisplay;
|
|
34
|
+
};
|
|
35
|
+
getComponent(name: "Spacer" | "spacer"): {
|
|
36
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions, ready?: videojs.Component.ReadyCallback): videojs.Spacer;
|
|
37
|
+
prototype: videojs.Spacer;
|
|
38
|
+
};
|
|
39
|
+
getComponent(name: "Player" | "player"): {
|
|
40
|
+
new (player: VideoJsPlayer, options?: import("video.js").VideoJsPlayerOptions): VideoJsPlayer;
|
|
41
|
+
prototype: VideoJsPlayer;
|
|
42
|
+
getTagSettings(tag: Element): any;
|
|
43
|
+
};
|
|
44
|
+
getComponent(name: "timeTooltip" | "TimeTooltip"): {
|
|
45
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.TimeToolTip;
|
|
46
|
+
prototype: videojs.TimeToolTip;
|
|
47
|
+
};
|
|
48
|
+
getComponent(name: string): any;
|
|
49
|
+
registerComponent(name: string, ComponentToRegister: any): any;
|
|
50
|
+
};
|
|
51
|
+
export declare class ProgressReporterDisplay extends Component {
|
|
52
|
+
private events_;
|
|
53
|
+
update(): void;
|
|
54
|
+
addEvents(events: ProgressEventPair[]): void;
|
|
55
|
+
createEl(): HTMLDivElement;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
2
3
|
declare const Plugin: {
|
|
3
4
|
new (player: VideoJsPlayer, options?: any): videojs.Plugin;
|
|
4
5
|
prototype: videojs.Plugin;
|
|
@@ -13,20 +14,13 @@ declare const Plugin: {
|
|
|
13
14
|
registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
|
|
14
15
|
registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
|
|
15
16
|
};
|
|
16
|
-
interface Event {
|
|
17
|
-
time: number;
|
|
18
|
-
type: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ProgressEvent {
|
|
21
|
-
start: Event;
|
|
22
|
-
end: Event;
|
|
23
|
-
}
|
|
24
17
|
interface ProgressReporterPluginOptions {
|
|
25
|
-
onFlush: (events:
|
|
18
|
+
onFlush: (events: ProgressEventPair[]) => void;
|
|
26
19
|
interval?: number;
|
|
27
20
|
}
|
|
28
21
|
declare class ProgressReporterPlugin extends Plugin {
|
|
29
22
|
private options;
|
|
23
|
+
private progressReporterDisplay;
|
|
30
24
|
private eventBuffer;
|
|
31
25
|
private latestTime;
|
|
32
26
|
/**
|
|
@@ -49,7 +43,10 @@ declare class ProgressReporterPlugin extends Plugin {
|
|
|
49
43
|
private initialize;
|
|
50
44
|
private validateOptions;
|
|
51
45
|
private bindListeners;
|
|
46
|
+
private interval;
|
|
52
47
|
private startInterval;
|
|
48
|
+
private addEasterEgg;
|
|
49
|
+
private addDisplay;
|
|
53
50
|
private onPlay;
|
|
54
51
|
private onPause;
|
|
55
52
|
private onTimeUpdate;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RegionName } from 'libs/analytics/enums/RegionName';
|
|
2
2
|
import { RegionalUrl, AnalyticsOptions, HashObject } from 'libs/analytics/interfaces';
|
|
3
|
-
import {
|
|
3
|
+
import { ProgressEventPair } from 'projects/player/plugins/progress-reporter-plugin/interfaces/ProgressEvent';
|
|
4
4
|
export declare type AnalyticsPlayerType = 'player' | 'interactive-player' | 'create-clip-player' | 'reports-player';
|
|
5
5
|
interface AnalyticsServiceOptions {
|
|
6
6
|
collectionApiUrls: RegionalUrl;
|
|
@@ -23,7 +23,7 @@ export declare class AnalyticsService {
|
|
|
23
23
|
private collectionApiClient;
|
|
24
24
|
constructor(options: AnalyticsServiceOptions);
|
|
25
25
|
logStream(): void;
|
|
26
|
-
logVideoProgress(events:
|
|
26
|
+
logVideoProgress(events: ProgressEventPair[]): void;
|
|
27
27
|
logUserAction(analyticsData: HashObject | HashObject[], analyticsOptions: AnalyticsOptions): void;
|
|
28
28
|
private getAnalyticsData;
|
|
29
29
|
private initialize;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/player",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21-rc.3",
|
|
4
4
|
"description": "ClickView Player",
|
|
5
5
|
"main": "dist/player-app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@babel/core": "7.11.6",
|
|
29
29
|
"@clickview/eslint-config": "1.0.1",
|
|
30
30
|
"@clickview/player-font": "0.0.12",
|
|
31
|
-
"@clickview/tooling": "0.0.
|
|
31
|
+
"@clickview/tooling": "0.0.35-rc.3",
|
|
32
32
|
"@storybook/react": "6.0.26",
|
|
33
33
|
"@types/chromecast-caf-sender": "1.0.3",
|
|
34
34
|
"@types/cropperjs": "1.3.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"webpack-dev-server": "3.11.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@clickview/styles": "1.0.
|
|
45
|
+
"@clickview/styles": "1.0.30-rc.3",
|
|
46
46
|
"@microsoft/signalr": "5.0.2",
|
|
47
47
|
"cropperjs": "1.5.6",
|
|
48
48
|
"draft-convert": "2.1.10",
|