@vkontakte/videoplayer 1.1.103 → 1.1.104-dev.ebda080eb.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.103",
3
+ "version": "1.1.104-dev.ebda080eb.0",
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.172",
47
- "@vkontakte/videoplayer-interactive": "1.0.78",
48
- "@vkontakte/videoplayer-shared": "1.0.101",
49
- "@vkontakte/videoplayer-statistics": "1.0.118"
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"
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 } from "./modules";
2
+ import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore, AudioVideoStreamsStore, SettingsStore, EpisodesStore, SeekStore, DebugLoggingStore } from "./modules";
3
3
  import type { IStoreContext } from "./modules/infrastructure";
4
4
  export interface ICompositionParams {
5
5
  legacyStore: IStore;
@@ -23,6 +23,8 @@ export interface ICompositionResult {
23
23
  audioVideoStreamsStore: AudioVideoStreamsStore;
24
24
  settingsStore: SettingsStore;
25
25
  episodesStore: EpisodesStore;
26
+ seekStore: SeekStore;
27
+ debugLoggingStore: DebugLoggingStore;
26
28
  };
27
29
  /** Очистка ресурсов */
28
30
  destroy(): void;
@@ -0,0 +1,3 @@
1
+ import type { DebugLoggingStore } from "./debugLoggingStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const debugLoggingModule: Module<DebugLoggingStore>;
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { DebugLoggingStore } from "./debugLoggingStore.store";
3
+ export declare const DEBUG_LOGGING_STORE_TOKEN: InjectionToken<DebugLoggingStore>;
@@ -0,0 +1,3 @@
1
+ export type { DebugLoggingStore, DebugLoggingStoreActions, DebugLoggingStoreDeps } from "./debugLoggingStore.store";
2
+ export { DEBUG_LOGGING_STORE_TOKEN } from "./debugLoggingStore.token";
3
+ export { debugLoggingModule } from "./debugLoggingStore.module";
@@ -33,3 +33,7 @@ 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";
@@ -0,0 +1,3 @@
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";
@@ -0,0 +1,8 @@
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>;
@@ -0,0 +1,83 @@
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;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { SeekStore } from "./seekStore.store";
3
+ export declare const SEEK_STORE_TOKEN: InjectionToken<SeekStore>;
@@ -92,7 +92,6 @@ export interface IUIState {
92
92
  playerSize: Writable<Size>;
93
93
  isMobile: Readable<boolean>;
94
94
  mobileNotReportControlHidden$: Readable<boolean>;
95
- scrubbingInProgress: Writable<boolean>;
96
95
  volumeChangingInProgress: Writable<boolean>;
97
96
  currentGridType$: Readable<GridTypes>;
98
97
  interactiveHideMobileControls: Writable<boolean>;
@@ -124,7 +123,6 @@ export interface IWebApi {
124
123
  }
125
124
  export interface IPlayerState {
126
125
  positionExact$: Readable<number>;
127
- positionWithScrubbing$: Readable<number>;
128
126
  duration$: Readable<number>;
129
127
  playbackState$: Readable<PlaybackState | undefined>;
130
128
  isBuffering$: Readable<boolean>;
@@ -179,13 +177,7 @@ export interface IStoreInternalActions {
179
177
  startVolumeChanging: () => void;
180
178
  stopVolumeChanging: () => void;
181
179
  togglePictureInPicture: () => void;
182
- startScrubbing: (progress: number) => void;
183
- progressScrubbing: (progress: number) => void;
184
- completeScrubbing: (progress: number, forcePrecise?: boolean, action?: ThinOneStat.ActionSeekType | SeekAction) => void;
185
180
  toggleChromecast: () => void;
186
- seekTime: (time: number, action: SeekAction, forcePrecise?: boolean) => void;
187
- seekEpisodeStartTime: (time: number) => void;
188
- seekToPercent: (percent: number, action: SeekAction) => void;
189
181
  switchToActiveLive: () => void;
190
182
  switchFromAdsToVideo: (callPlay?: boolean) => void;
191
183
  switchFromVideoToAds: () => void;
@@ -197,8 +189,6 @@ export interface IStoreInternalActions {
197
189
  getDebugTextData: () => string;
198
190
  getDebugPanelData: () => DebugData;
199
191
  getVideoElement: () => HTMLVideoElement | null;
200
- startLogging: () => void;
201
- stopLogging: () => void;
202
192
  videoRotate: (alphaDiff?: number) => void;
203
193
  downloadVideo: () => void;
204
194
  nextMovie: (movieId: number) => void;
@@ -227,8 +217,6 @@ export interface IStoreExternalActions {
227
217
  play: () => void;
228
218
  pause: () => void;
229
219
  stop: () => void;
230
- seekTime: (time: number) => void;
231
- seekEpisodeStartTime: (time: number) => void;
232
220
  setMuted: (muted: boolean) => void;
233
221
  setVolume: (volume: number) => void;
234
222
  updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>) => void;