@vkontakte/videoplayer 1.1.46-dev.c7ba2832.0 → 1.1.47-dev.f76cced4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.46-dev.c7ba2832.0",
3
+ "version": "1.1.47-dev.f76cced4.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-dev.b7c2037c.0",
53
- "@vkontakte/videoplayer-interactive": "1.0.21-dev.9f01294c.0",
54
- "@vkontakte/videoplayer-shared": "1.0.45-dev.5ee6a138.0",
55
- "@vkontakte/videoplayer-statistics": "1.0.60-dev.02eab319.0"
52
+ "@vkontakte/videoplayer-core": "2.0.114-dev.8971454f.0",
53
+ "@vkontakte/videoplayer-interactive": "1.0.22-dev.55fd61d6.0",
54
+ "@vkontakte/videoplayer-shared": "1.0.46-dev.9c2f91d3.0",
55
+ "@vkontakte/videoplayer-statistics": "1.0.61-dev.26c8946e.0"
56
56
  }
57
57
  }
@@ -1,4 +1,5 @@
1
1
  import type { Writable, Readable } from 'svelte/store';
2
+ import type { AdsTimeRemained } from '../../types';
2
3
  import { AdsSection } from '../../types';
3
4
  import type { AdsParams } from '../../types';
4
5
  import type { ILogger, Milliseconds } from '@vkontakte/videoplayer-shared';
@@ -46,13 +47,22 @@ export declare class AdmanWrapper {
46
47
  private runtimeTimeout;
47
48
  private watchDogTimeout;
48
49
  events: {
50
+ init$: Subject<void>;
51
+ loadStarted$: Subject<void>;
52
+ loadEnded$: Subject<void>;
53
+ loadError$: Subject<void>;
54
+ ready$: Subject<void>;
49
55
  slotRequested$: Subject<void>;
50
56
  started$: Subject<AdsSection>;
57
+ timeRemained$: Subject<AdsTimeRemained>;
51
58
  paused$: Subject<void>;
52
59
  resumed$: Subject<void>;
53
- ended$: Subject<void>;
60
+ ended$: Subject<AdsSection>;
61
+ empty$: Subject<void>;
54
62
  skipped$: Subject<void>;
55
- clicked$: Subject<void>;
63
+ clicked$: Subject<AdsSection>;
64
+ closed$: Subject<AdsSection>;
65
+ error$: Subject<void>;
56
66
  };
57
67
  constructor(logger: ILogger, config: IConfig);
58
68
  init(actions: ExternalActions, adsState: IAdsState, playerState: IPlayerState): void;
package/types/config.d.ts CHANGED
@@ -89,6 +89,7 @@ export interface IUIConfig {
89
89
  copyVideoLink: boolean;
90
90
  videoRotate: boolean;
91
91
  interactiveGraph: boolean;
92
+ interactiveResponsiveUi?: boolean;
92
93
  seekToInteractive: boolean;
93
94
  interactiveLastFrame: boolean;
94
95
  interactiveTextPermanent: boolean;
@@ -231,6 +231,7 @@ export interface IStore {
231
231
  nextMovie: (movieId: number) => void;
232
232
  correctSeekTimeToInteractive: (time: number) => number;
233
233
  replayInteractive?: () => void;
234
+ stopPlayer?: () => void;
234
235
  setLooped: (isLooped: boolean) => void;
235
236
  reportProblem: () => void;
236
237
  };
@@ -238,6 +239,7 @@ export interface IStore {
238
239
  firstStart: (showAds: boolean) => void;
239
240
  play: () => void;
240
241
  pause: () => void;
242
+ stop: () => void;
241
243
  seekTime: (time: number) => void;
242
244
  seekEpisodeStartTime: (time: number) => void;
243
245
  setPlaybackRate: (playbackRate: PlaybackRate) => void;
@@ -279,6 +281,7 @@ interface IStoreParams {
279
281
  interactiveRanges$?: IValueObservable<InteractiveRange[]>;
280
282
  isInteractiveTime$?: IValueObservable<boolean>;
281
283
  replayInteractive?: () => void;
284
+ stopPlayer?: () => void;
282
285
  hasInteractiveBranches?: boolean;
283
286
  disabledControls: ControlsKeys;
284
287
  playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
@@ -293,5 +296,5 @@ interface IStoreParams {
293
296
  * Store приложения.
294
297
  * Если будет слишком большим - можно разделить его на модули
295
298
  */
296
- 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;
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, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
297
300
  export {};
@@ -33,3 +33,14 @@ export type DebugData = {
33
33
  };
34
34
  export declare const constructDebugPanelData: (player: IPlayer, config: IConfig, store: IStore) => DebugData;
35
35
  export declare const fetchVideoFile: (url: string, filename: string) => void;
36
+ export declare const createDequeCache: <T>() => {
37
+ add: (key: string, value: T) => void;
38
+ find: (key: string) => [string, T] | undefined;
39
+ };
40
+ export declare class SubtitlesDownloader {
41
+ private destroyController;
42
+ private pendingDownloads;
43
+ download(url: string): Promise<string | null>;
44
+ destroy(): void;
45
+ isDestroyed(): boolean;
46
+ }
@@ -98,8 +98,18 @@ export interface IVKVideoPlayerCallbacks {
98
98
  onReportProblem?: () => void;
99
99
  };
100
100
  adsInfo?: {
101
- onStarted?: () => void;
102
- onCompleted?: () => void;
101
+ onLoadStarted?: () => void;
102
+ onLoadEnded?: () => void;
103
+ onLoadError?: () => void;
104
+ onInit?: () => void;
105
+ onReady?: () => void;
106
+ onStarted?: (adsSection: AdsSection) => void;
107
+ onTimeRemained?: (timeRemained: AdsTimeRemained) => void;
108
+ onCompleted?: (adsSection: AdsSection) => void;
109
+ onEmpty?: () => void;
110
+ onClicked?: (adsSection: AdsSection) => void;
111
+ onClosed?: (adsSection: AdsSection) => void;
112
+ onError?: () => void;
103
113
  };
104
114
  }
105
115
  export interface IVKVideoPlayerUICallbacks {
@@ -301,6 +311,12 @@ export declare const enum AdsPlaybackState {
301
311
  PLAYING = "playing",
302
312
  PAUSED = "paused"
303
313
  }
314
+ export type AdsTimeRemained = {
315
+ currentTime: number;
316
+ duration: number;
317
+ percent: number;
318
+ remained: number;
319
+ };
304
320
  export type VideoQualityForRender = {
305
321
  value: VideoQualityUI;
306
322
  displayValue: string;