@vkontakte/videoplayer-core 2.0.169 → 2.0.170-dev.593b919e2.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 +46 -50
- package/es2015.esm.js +59 -63
- package/esnext.cjs +56 -60
- package/esnext.esm.js +56 -60
- package/evergreen.esm.js +47 -51
- package/package.json +2 -2
- package/types/providers/DashProvider/baseDashProvider.d.ts +0 -2
- package/types/providers/DashProvider/lib/buffer.d.ts +2 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +6 -4
- package/types/providers/DashProvider/lib/player.d.ts +1 -0
- package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +0 -1
- 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 +6 -4
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +2 -0
- package/types/providers/ProviderContainer/index.d.ts +3 -1
- package/types/providers/utils/Abr/types.d.ts +0 -2
- package/types/providers/utils/segmentCache/IndexedDbSegmentCacheStorage.d.ts +52 -0
- package/types/providers/utils/segmentCache/SegmentCache.d.ts +40 -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 +74 -0
- package/types/utils/autoSelectTrack.d.ts +3 -4
- package/types/utils/tuningConfig.d.ts +2 -11
- package/types/providers/DashProvider/lib/urlsCache.d.ts +0 -23
- package/types/providers/DashProviderVirtual/lib/urlsCache.d.ts +0 -22
- package/types/providers/utils/Abr/rules/video/failedVideoTrackRule.d.ts +0 -14
|
@@ -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;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IRuleInitContext, IVideoAbrContext } from "../../types";
|
|
2
|
-
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
|
-
import type { Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
import { LimitAboveRule } from "../limitAboveRule";
|
|
5
|
-
import type { RulePhaseConfig } from "../../controllers/abrPhaseController";
|
|
6
|
-
type FailedVideoTracLogsArgs = [banTrack: Nullable<IVideoTrack>];
|
|
7
|
-
export declare class FailedVideoTrackRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, FailedVideoTracLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
8
|
-
protected banTrack: Nullable<IVideoTrack>;
|
|
9
|
-
constructor(phaseConfig: RulePhaseConfig);
|
|
10
|
-
init(initContext: IRuleInitContext): void;
|
|
11
|
-
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
12
|
-
protected createLogMessage(selectedTrack: IVideoTrack, banTrack: Nullable<IVideoTrack>): string;
|
|
13
|
-
}
|
|
14
|
-
export {};
|