@vkontakte/videoplayer 1.1.46-beta.2 → 1.1.46-dev.aff6b2d6.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/es2015.cjs.js +17 -17
- package/es2015.esm.js +17 -17
- package/es2018.cjs.js +17 -17
- package/es2018.esm.js +17 -17
- package/esnext.cjs.js +17 -17
- package/esnext.esm.js +17 -17
- package/evergreen.esm.js +17 -17
- package/package.json +5 -5
- package/types/components/Ads/admanWrapper.d.ts +8 -0
- package/types/store/index.d.ts +8 -6
- package/types/types/index.d.ts +24 -0
- package/types/utils/elementHelpers.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.46-
|
|
3
|
+
"version": "1.1.46-dev.aff6b2d6.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"**/*.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@vkontakte/videoplayer-core": "2.0.113-
|
|
53
|
-
"@vkontakte/videoplayer-interactive": "1.0.21-
|
|
54
|
-
"@vkontakte/videoplayer-shared": "1.0.45-
|
|
55
|
-
"@vkontakte/videoplayer-statistics": "1.0.60-
|
|
52
|
+
"@vkontakte/videoplayer-core": "2.0.113-dev.6fcdc6e7.0",
|
|
53
|
+
"@vkontakte/videoplayer-interactive": "1.0.21-dev.c12d2c05.0",
|
|
54
|
+
"@vkontakte/videoplayer-shared": "1.0.45-dev.e743aafc.0",
|
|
55
|
+
"@vkontakte/videoplayer-statistics": "1.0.60-dev.3b85e46c.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -46,13 +46,21 @@ export declare class AdmanWrapper {
|
|
|
46
46
|
private runtimeTimeout;
|
|
47
47
|
private watchDogTimeout;
|
|
48
48
|
events: {
|
|
49
|
+
init$: Subject<void>;
|
|
50
|
+
loadStarted$: Subject<void>;
|
|
51
|
+
loadEnded$: Subject<void>;
|
|
52
|
+
loadError$: Subject<void>;
|
|
53
|
+
ready$: Subject<void>;
|
|
49
54
|
slotRequested$: Subject<void>;
|
|
50
55
|
started$: Subject<AdsSection>;
|
|
51
56
|
paused$: Subject<void>;
|
|
52
57
|
resumed$: Subject<void>;
|
|
53
58
|
ended$: Subject<void>;
|
|
59
|
+
empty$: Subject<void>;
|
|
54
60
|
skipped$: Subject<void>;
|
|
55
61
|
clicked$: Subject<void>;
|
|
62
|
+
closed$: Subject<void>;
|
|
63
|
+
error$: Subject<void>;
|
|
56
64
|
};
|
|
57
65
|
constructor(logger: ILogger, config: IConfig);
|
|
58
66
|
init(actions: ExternalActions, adsState: IAdsState, playerState: IPlayerState): void;
|
package/types/store/index.d.ts
CHANGED
|
@@ -80,8 +80,6 @@ export interface IUIState {
|
|
|
80
80
|
mobileUnmuteButtonExpanded: Writable<boolean>;
|
|
81
81
|
mobileUnmuteButtonVisible: Writable<boolean>;
|
|
82
82
|
icon3DVideoVisible: Writable<boolean>;
|
|
83
|
-
settingsMenuVisible: Writable<boolean>;
|
|
84
|
-
settingsMenuOpenedByKeyboard: Writable<boolean>;
|
|
85
83
|
scrubbingInProgress: Writable<boolean>;
|
|
86
84
|
is3DVideo: Writable<boolean>;
|
|
87
85
|
isPictureInPictureActive$: Readable<boolean>;
|
|
@@ -93,6 +91,11 @@ export interface IUIState {
|
|
|
93
91
|
additionalContextMenuItems$: Readable<ContextMenuItem[]>;
|
|
94
92
|
overlayContainer$: Writable<HTMLDivElement | undefined>;
|
|
95
93
|
startedByKeyboard$: Writable<boolean>;
|
|
94
|
+
settingsMenu: {
|
|
95
|
+
visible$: Writable<boolean>;
|
|
96
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
97
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
98
|
+
};
|
|
96
99
|
}
|
|
97
100
|
export interface IWebApi {
|
|
98
101
|
pictureInPictureApi?: IPictureInPictureApi;
|
|
@@ -181,6 +184,8 @@ export interface IStore {
|
|
|
181
184
|
toggleSettingsMenu: (wasOpenedByKey?: boolean) => void;
|
|
182
185
|
openSettingsMenu: (wasOpenedByKey?: boolean) => void;
|
|
183
186
|
closeSettingsMenu: (wasOpenedByKey?: boolean) => void;
|
|
187
|
+
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
188
|
+
closeSettingsSubMenu: (ref: HTMLElement) => void;
|
|
184
189
|
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
185
190
|
setVolume: (volume: number, preferredVolume?: number) => void;
|
|
186
191
|
setAudioStream: (stream: IAudioStream) => void;
|
|
@@ -231,7 +236,6 @@ export interface IStore {
|
|
|
231
236
|
nextMovie: (movieId: number) => void;
|
|
232
237
|
correctSeekTimeToInteractive: (time: number) => number;
|
|
233
238
|
replayInteractive?: () => void;
|
|
234
|
-
stopPlayer?: () => void;
|
|
235
239
|
setLooped: (isLooped: boolean) => void;
|
|
236
240
|
reportProblem: () => void;
|
|
237
241
|
};
|
|
@@ -239,7 +243,6 @@ export interface IStore {
|
|
|
239
243
|
firstStart: (showAds: boolean) => void;
|
|
240
244
|
play: () => void;
|
|
241
245
|
pause: () => void;
|
|
242
|
-
stop: () => void;
|
|
243
246
|
seekTime: (time: number) => void;
|
|
244
247
|
seekEpisodeStartTime: (time: number) => void;
|
|
245
248
|
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
@@ -281,7 +284,6 @@ interface IStoreParams {
|
|
|
281
284
|
interactiveRanges$?: IValueObservable<InteractiveRange[]>;
|
|
282
285
|
isInteractiveTime$?: IValueObservable<boolean>;
|
|
283
286
|
replayInteractive?: () => void;
|
|
284
|
-
stopPlayer?: () => void;
|
|
285
287
|
hasInteractiveBranches?: boolean;
|
|
286
288
|
disabledControls: ControlsKeys;
|
|
287
289
|
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
@@ -296,5 +298,5 @@ interface IStoreParams {
|
|
|
296
298
|
* Store приложения.
|
|
297
299
|
* Если будет слишком большим - можно разделить его на модули
|
|
298
300
|
*/
|
|
299
|
-
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive,
|
|
301
|
+
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
|
|
300
302
|
export {};
|
package/types/types/index.d.ts
CHANGED
|
@@ -96,10 +96,30 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
96
96
|
height: number;
|
|
97
97
|
}) => void;
|
|
98
98
|
onReportProblem?: () => void;
|
|
99
|
+
onSettingsMenu?: (value: {
|
|
100
|
+
visible: boolean;
|
|
101
|
+
size: Size;
|
|
102
|
+
position: Position;
|
|
103
|
+
}) => void;
|
|
104
|
+
onSettingsSubMenu?: (value: {
|
|
105
|
+
visible: boolean;
|
|
106
|
+
name?: string;
|
|
107
|
+
size: Size;
|
|
108
|
+
position: Position;
|
|
109
|
+
}) => void;
|
|
99
110
|
};
|
|
100
111
|
adsInfo?: {
|
|
112
|
+
onLoadStarted?: () => void;
|
|
113
|
+
onLoadEnded?: () => void;
|
|
114
|
+
onLoadError?: () => void;
|
|
115
|
+
onInit?: () => void;
|
|
116
|
+
onReady?: () => void;
|
|
101
117
|
onStarted?: () => void;
|
|
102
118
|
onCompleted?: () => void;
|
|
119
|
+
onEmpty?: () => void;
|
|
120
|
+
onClicked?: () => void;
|
|
121
|
+
onClosed?: () => void;
|
|
122
|
+
onError?: () => void;
|
|
103
123
|
};
|
|
104
124
|
}
|
|
105
125
|
export interface IVKVideoPlayerUICallbacks {
|
|
@@ -480,4 +500,8 @@ export type Position = {
|
|
|
480
500
|
bottom?: number;
|
|
481
501
|
right?: number;
|
|
482
502
|
};
|
|
503
|
+
export type Size = {
|
|
504
|
+
width: number;
|
|
505
|
+
height: number;
|
|
506
|
+
};
|
|
483
507
|
export {};
|