@vkontakte/videoplayer 1.1.104-dev.ebda080eb.0 → 1.1.104

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.104-dev.ebda080eb.0",
3
+ "version": "1.1.104",
4
4
  "author": "vk.ru",
5
5
  "description": "Videoplayer based on the vk.ru platform",
6
6
  "homepage": "https://vk.ru",
@@ -43,9 +43,9 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@adtech/rbadman": "2.2.57",
46
- "@vkontakte/videoplayer-core": "2.0.173-dev.ebda080eb.0",
47
- "@vkontakte/videoplayer-interactive": "1.0.79-dev.ebda080eb.0",
48
- "@vkontakte/videoplayer-shared": "1.0.102-dev.ebda080eb.0",
49
- "@vkontakte/videoplayer-statistics": "1.0.119-dev.ebda080eb.0"
46
+ "@vkontakte/videoplayer-core": "2.0.173",
47
+ "@vkontakte/videoplayer-interactive": "1.0.79",
48
+ "@vkontakte/videoplayer-shared": "1.0.102",
49
+ "@vkontakte/videoplayer-statistics": "1.0.119"
50
50
  }
51
51
  }
@@ -1,5 +1,5 @@
1
1
  import type { IStore } from "./index";
2
- import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore, AudioVideoStreamsStore, SettingsStore, EpisodesStore, SeekStore, DebugLoggingStore } from "./modules";
2
+ import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore, AudioVideoStreamsStore, SettingsStore, EpisodesStore } from "./modules";
3
3
  import type { IStoreContext } from "./modules/infrastructure";
4
4
  export interface ICompositionParams {
5
5
  legacyStore: IStore;
@@ -23,8 +23,6 @@ export interface ICompositionResult {
23
23
  audioVideoStreamsStore: AudioVideoStreamsStore;
24
24
  settingsStore: SettingsStore;
25
25
  episodesStore: EpisodesStore;
26
- seekStore: SeekStore;
27
- debugLoggingStore: DebugLoggingStore;
28
26
  };
29
27
  /** Очистка ресурсов */
30
28
  destroy(): void;
@@ -33,7 +33,3 @@ export type { SettingsStoreDeps, SettingsStoreState, SettingsStoreActions, Setti
33
33
  export { settingsModule, SETTINGS_STORE_TOKEN } from "./settingsStore";
34
34
  export type { EpisodesStoreDeps, EpisodesStoreState, EpisodesStoreActions, EpisodesStoreExternalActions, EpisodesStore } from "./episodesStore";
35
35
  export { episodesModule, EPISODES_STORE_TOKEN } from "./episodesStore";
36
- export type { SeekStoreDeps, SeekStoreState, SeekStoreActions, SeekStoreExternalActions, SeekStore } from "./seekStore";
37
- export { seekModule, SEEK_STORE_TOKEN } from "./seekStore";
38
- export type { DebugLoggingStoreDeps, DebugLoggingStoreActions, DebugLoggingStore } from "./debugLoggingStore";
39
- export { debugLoggingModule, DEBUG_LOGGING_STORE_TOKEN } from "./debugLoggingStore";
@@ -92,6 +92,7 @@ export interface IUIState {
92
92
  playerSize: Writable<Size>;
93
93
  isMobile: Readable<boolean>;
94
94
  mobileNotReportControlHidden$: Readable<boolean>;
95
+ scrubbingInProgress: Writable<boolean>;
95
96
  volumeChangingInProgress: Writable<boolean>;
96
97
  currentGridType$: Readable<GridTypes>;
97
98
  interactiveHideMobileControls: Writable<boolean>;
@@ -123,6 +124,7 @@ export interface IWebApi {
123
124
  }
124
125
  export interface IPlayerState {
125
126
  positionExact$: Readable<number>;
127
+ positionWithScrubbing$: Readable<number>;
126
128
  duration$: Readable<number>;
127
129
  playbackState$: Readable<PlaybackState | undefined>;
128
130
  isBuffering$: Readable<boolean>;
@@ -177,7 +179,13 @@ export interface IStoreInternalActions {
177
179
  startVolumeChanging: () => void;
178
180
  stopVolumeChanging: () => void;
179
181
  togglePictureInPicture: () => void;
182
+ startScrubbing: (progress: number) => void;
183
+ progressScrubbing: (progress: number) => void;
184
+ completeScrubbing: (progress: number, forcePrecise?: boolean, action?: ThinOneStat.ActionSeekType | SeekAction) => void;
180
185
  toggleChromecast: () => void;
186
+ seekTime: (time: number, action: SeekAction, forcePrecise?: boolean) => void;
187
+ seekEpisodeStartTime: (time: number) => void;
188
+ seekToPercent: (percent: number, action: SeekAction) => void;
181
189
  switchToActiveLive: () => void;
182
190
  switchFromAdsToVideo: (callPlay?: boolean) => void;
183
191
  switchFromVideoToAds: () => void;
@@ -189,6 +197,8 @@ export interface IStoreInternalActions {
189
197
  getDebugTextData: () => string;
190
198
  getDebugPanelData: () => DebugData;
191
199
  getVideoElement: () => HTMLVideoElement | null;
200
+ startLogging: () => void;
201
+ stopLogging: () => void;
192
202
  videoRotate: (alphaDiff?: number) => void;
193
203
  downloadVideo: () => void;
194
204
  nextMovie: (movieId: number) => void;
@@ -217,6 +227,8 @@ export interface IStoreExternalActions {
217
227
  play: () => void;
218
228
  pause: () => void;
219
229
  stop: () => void;
230
+ seekTime: (time: number) => void;
231
+ seekEpisodeStartTime: (time: number) => void;
220
232
  setMuted: (muted: boolean) => void;
221
233
  setVolume: (volume: number) => void;
222
234
  updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>) => void;
@@ -1,3 +0,0 @@
1
- import type { DebugLoggingStore } from "./debugLoggingStore.store";
2
- import type { Module } from "../utils";
3
- export declare const debugLoggingModule: Module<DebugLoggingStore>;
@@ -1,20 +0,0 @@
1
- import type { ILogger } from "@vkontakte/videoplayer-shared";
2
- import type { IPlayer } from "@vkontakte/videoplayer-core";
3
- import type { IUIConfig } from "../../../config";
4
- export interface DebugLoggingStoreDeps {
5
- /** Плеер — источник sdk-логов */
6
- player: IPlayer;
7
- /** UI-логгер — источник ui-логов */
8
- logger: ILogger;
9
- /** Конфигурация UI — debugLog задаёт tag и цвета */
10
- config: IUIConfig;
11
- }
12
- export interface DebugLoggingStoreActions {
13
- startLogging(): void;
14
- stopLogging(): void;
15
- }
16
- export interface DebugLoggingStore {
17
- actions: DebugLoggingStoreActions;
18
- destroy(): void;
19
- }
20
- export declare const createDebugLoggingStore: (deps: DebugLoggingStoreDeps) => DebugLoggingStore;
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
- import type { DebugLoggingStore } from "./debugLoggingStore.store";
3
- export declare const DEBUG_LOGGING_STORE_TOKEN: InjectionToken<DebugLoggingStore>;
@@ -1,3 +0,0 @@
1
- export type { DebugLoggingStore, DebugLoggingStoreActions, DebugLoggingStoreDeps } from "./debugLoggingStore.store";
2
- export { DEBUG_LOGGING_STORE_TOKEN } from "./debugLoggingStore.token";
3
- export { debugLoggingModule } from "./debugLoggingStore.module";
@@ -1,3 +0,0 @@
1
- export type { SeekStore, SeekStoreState, SeekStoreActions, SeekStoreExternalActions, SeekStoreDeps } from "./seekStore.store";
2
- export { SEEK_STORE_TOKEN } from "./seekStore.token";
3
- export { seekModule } from "./seekStore.module";
@@ -1,8 +0,0 @@
1
- /**
2
- * Seek Store Module
3
- *
4
- * Композиция модуля через Dependency Injection.
5
- */
6
- import { type SeekStore } from "./seekStore.store";
7
- import type { Module } from "../utils";
8
- export declare const seekModule: Module<SeekStore>;
@@ -1,83 +0,0 @@
1
- /**
2
- * Seek Store Module
3
- *
4
- * Управляет перемоткой (seek) и скраббингом прогресс-бара.
5
- */
6
- import type { Readable, Writable } from "svelte/store";
7
- import type { IPlayer } from "@vkontakte/videoplayer-core";
8
- import { VideoFormat } from "@vkontakte/videoplayer-core";
9
- import type { IComponentLogger, ISubscription, ITracer, IValueObservable, IValueSubject } from "@vkontakte/videoplayer-shared";
10
- import { SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
11
- /**
12
- * Зависимости модуля seek
13
- */
14
- export interface SeekStoreDeps {
15
- /** Плеер */
16
- player: IPlayer;
17
- /** Подписки */
18
- subscription: ISubscription;
19
- /** Логгер */
20
- log: IComponentLogger;
21
- /** Трассировщик */
22
- tracer: ITracer;
23
- /** Текущая длительность */
24
- duration$: Readable<number>;
25
- /** Точная позиция воспроизведения */
26
- positionExact$: Readable<number>;
27
- /** Мобильное устройство */
28
- isMobile$: Readable<boolean>;
29
- /** Текущий формат видео */
30
- currentFormat$: Readable<VideoFormat | undefined>;
31
- /** Интерактивное время */
32
- isInteractiveTime$: IValueObservable<boolean> | undefined;
33
- /** Корректировка времени перемотки под интерактив */
34
- correctSeekTimeToInteractive: (time: number) => number;
35
- /** Событие перемотки для статистики */
36
- actionSeek$: IValueSubject<SeekAction | ThinOneStat.ActionSeekType>;
37
- /** Получение видео-элемента */
38
- getVideoElement: () => HTMLVideoElement | null;
39
- /** Колбэки */
40
- callbacks: {
41
- onPlay?: () => void;
42
- };
43
- }
44
- /**
45
- * Состояние модуля seek
46
- */
47
- export interface SeekStoreState {
48
- /** Позиция с учётом скраббинга */
49
- positionWithScrubbing$: Readable<number>;
50
- /** Идёт ли скраббинг */
51
- scrubbingInProgress: Writable<boolean>;
52
- }
53
- /**
54
- * Экшены модуля seek для внутреннего использования
55
- */
56
- export interface SeekStoreActions {
57
- seekTime: (time: number, action: SeekAction, forcePrecise?: boolean) => void;
58
- seekEpisodeStartTime: (time: number) => void;
59
- seekToPercent: (percent: number, action: ThinOneStat.ActionSeekType | SeekAction, forcePrecise?: boolean) => void;
60
- startScrubbing: (progress: number) => void;
61
- progressScrubbing: (progress: number) => void;
62
- completeScrubbing: (progress: number, forcePrecise?: boolean, action?: ThinOneStat.ActionSeekType | SeekAction) => void;
63
- }
64
- /**
65
- * Экшены модуля seek для внешнего использования
66
- */
67
- export interface SeekStoreExternalActions {
68
- seekTime: (time: number) => void;
69
- seekEpisodeStartTime: (time: number) => void;
70
- }
71
- /**
72
- * Результат создания seek store
73
- */
74
- export interface SeekStore {
75
- state: SeekStoreState;
76
- actions: SeekStoreActions;
77
- externalActions: SeekStoreExternalActions;
78
- destroy(): void;
79
- }
80
- /**
81
- * Создаёт seek store
82
- */
83
- export declare const createSeekStore: (deps: SeekStoreDeps) => SeekStore;
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
- import type { SeekStore } from "./seekStore.store";
3
- export declare const SEEK_STORE_TOKEN: InjectionToken<SeekStore>;