@vkontakte/videoplayer-core 2.0.178 → 2.0.179-beta.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 +19 -17
- package/es2015.esm.js +19 -17
- package/esnext.cjs +18 -16
- package/esnext.esm.js +13 -11
- package/evergreen.esm.js +13 -11
- package/package.json +2 -2
- package/types/player/Player.d.ts +1 -1
- package/types/player/types.d.ts +2 -0
- package/types/providers/DashProvider/lib/buffer.d.ts +2 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +9 -4
- package/types/providers/DashProvider/lib/player.d.ts +1 -0
- package/types/providers/DashProviderVirtual/lib/buffer/types.d.ts +2 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts +3 -1
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/byteRangeVirtualBufferManager.d.ts +1 -0
- package/types/providers/DashProviderVirtual/lib/fetcher.d.ts +9 -4
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +5 -2
- package/types/providers/ProviderContainer/index.d.ts +3 -0
- package/types/providers/types.d.ts +2 -2
- package/types/providers/utils/Abr/abrController.d.ts +3 -1
- package/types/providers/utils/Abr/types.d.ts +5 -0
- package/types/providers/utils/segmentCache/IndexedDbSegmentCacheStorage.d.ts +54 -0
- package/types/providers/utils/segmentCache/MediaSegmentBatchCache.d.ts +59 -0
- package/types/providers/utils/segmentCache/constants.d.ts +20 -0
- package/types/providers/utils/segmentCache/index.d.ts +8 -0
- package/types/providers/utils/segmentCache/segmentCacheDb.d.ts +25 -0
- package/types/providers/utils/segmentCache/segmentCacheUtils.d.ts +25 -0
- package/types/providers/utils/segmentCache/types.d.ts +85 -0
- package/types/utils/tuningConfig.d.ts +2 -9
- package/types/providers/DashProvider/lib/urlsCache.d.ts +0 -23
- package/types/providers/DashProviderVirtual/lib/urlsCache.d.ts +0 -22
|
@@ -5,6 +5,7 @@ import { IOSPreferredFormat } from "../enums/IOSPreferredFormat";
|
|
|
5
5
|
import type { Byte, Kbps, Milliseconds, RecursivePartial, Seconds, TimerModule } from "@vkontakte/videoplayer-shared";
|
|
6
6
|
import { type ExactVideoQuality, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
import { AudioRuleName, VideoRuleName } from "../providers/utils/Abr/types";
|
|
8
|
+
import type { SegmentCacheConfig } from "../providers/utils/segmentCache/types";
|
|
8
9
|
export type ITuningConfig = {
|
|
9
10
|
/** @deprecated */
|
|
10
11
|
configName?: string[];
|
|
@@ -472,15 +473,6 @@ export type ITuningConfig = {
|
|
|
472
473
|
*/
|
|
473
474
|
handleExtendedNetworkErrorsSet?: boolean;
|
|
474
475
|
/**
|
|
475
|
-
* Кэшируем ответы от сервера руками, так как из за динамичесокй природы некоторых параметров в урле
|
|
476
|
-
* браузер это не может сделать.
|
|
477
|
-
*/
|
|
478
|
-
useUrlCacheMechanism?: boolean;
|
|
479
|
-
/**
|
|
480
|
-
* Очищаем кэш урлов при падение провайдера.
|
|
481
|
-
*/
|
|
482
|
-
dropUrlCacheWhenProviderCrashed?: boolean;
|
|
483
|
-
/**
|
|
484
476
|
* При смене/реините провайдера игнорируем результат того, смогло видео заиграть или нет.
|
|
485
477
|
*/
|
|
486
478
|
ignoreForcePlayResultWhenProviderChanged?: boolean;
|
|
@@ -508,6 +500,7 @@ export type ITuningConfig = {
|
|
|
508
500
|
* провайдер по-прежнему ждёт canplay, чтобы play() не вызывался до появления данных.
|
|
509
501
|
*/
|
|
510
502
|
readyOnLoadedMetadata: boolean;
|
|
503
|
+
segmentCache: SegmentCacheConfig;
|
|
511
504
|
};
|
|
512
505
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig>;
|
|
513
506
|
export declare const fillDefault: (partial: IOptionalTuningConfig) => ITuningConfig;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type CacheManager = {
|
|
2
|
-
get: () => Promise<Response | null>;
|
|
3
|
-
set: (response: Response) => void;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Пытаемся добиться кэширования вызовов.
|
|
7
|
-
* Сейчас есть проблема, что expires и sig меняются, хотя контент не меняется, поэтому ходим мимо кэша.
|
|
8
|
-
* Из за этого обрабатываем кэш вручную.
|
|
9
|
-
*/
|
|
10
|
-
export declare const createCacheManager: (url: string) => Promise<CacheManager>;
|
|
11
|
-
export declare function canUseCacheApi(): boolean;
|
|
12
|
-
export declare function normalizeUrl(url: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Проверяет, не просрочен ли кэшированный ответ
|
|
15
|
-
*/
|
|
16
|
-
export declare function isResponseExpired(response: Response): boolean;
|
|
17
|
-
export declare function cloneResponse(response: Response, url: string): Response;
|
|
18
|
-
/**
|
|
19
|
-
* Извлекает expires из оригинального URL (параметр expires1)
|
|
20
|
-
* Предполагается, что expires1 — timestamp в секундах
|
|
21
|
-
*/
|
|
22
|
-
export declare function getExpiresFromUrl(url: string): number;
|
|
23
|
-
export declare const dropUrlsCache: () => Promise<void>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type CacheManager = {
|
|
2
|
-
get: () => Promise<Response | null>;
|
|
3
|
-
set: (response: Response) => Promise<void>;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Пытаемся добиться кэширования вызовов.
|
|
7
|
-
* Сейчас есть проблема, что expires и sig меняются, хотя контент не меняется, поэтому ходим мимо кэша.
|
|
8
|
-
* Из за этого обрабатываем кэш вручную.
|
|
9
|
-
*/
|
|
10
|
-
export declare const createCacheManager: (url: string) => Promise<CacheManager>;
|
|
11
|
-
export declare function canUseCacheApi(): boolean;
|
|
12
|
-
export declare function normalizeUrl(url: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Проверяет, не просрочен ли кэшированный ответ
|
|
15
|
-
*/
|
|
16
|
-
export declare function isResponseExpired(response: Response): boolean;
|
|
17
|
-
export declare function cloneResponse(response: Response, url: string): Response;
|
|
18
|
-
/**
|
|
19
|
-
* Извлекает expires из оригинального URL (параметр expires1)
|
|
20
|
-
* Предполагается, что expires1 — timestamp в секундах
|
|
21
|
-
*/
|
|
22
|
-
export declare function getExpiresFromUrl(url: string): number;
|