@vkontakte/videoplayer-core 2.0.178-dev.e3b3fe921.0 → 2.0.178
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 +10 -12
- package/es2015.esm.js +16 -18
- package/esnext.cjs +10 -12
- package/esnext.esm.js +10 -12
- package/evergreen.esm.js +10 -12
- package/package.json +2 -2
- package/types/providers/utils/Abr/abrController.d.ts +1 -3
- package/types/providers/utils/Abr/types.d.ts +0 -5
- package/types/providers/utils/HTMLVideoElement/pool.d.ts +2 -2
- package/types/utils/tuningConfig.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.178
|
|
3
|
+
"version": "2.0.178",
|
|
4
4
|
"author": "vk.ru",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.ru platform",
|
|
6
6
|
"homepage": "https://vk.ru",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"**/*.d.ts"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@vkontakte/videoplayer-shared": "1.0.107
|
|
45
|
+
"@vkontakte/videoplayer-shared": "1.0.107"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAbrController, IAbrRule, IBaseAbrControllerContext, IRuleInitContext, RuleLogData } from "./types";
|
|
2
2
|
import type { IBaseTrack } from "../../../player/types";
|
|
3
3
|
export declare const formatRuleLog: ({ name, ...logData }: RuleLogData) => string;
|
|
4
4
|
export default class AbrController<
|
|
@@ -8,9 +8,7 @@ export default class AbrController<
|
|
|
8
8
|
private history;
|
|
9
9
|
private rules;
|
|
10
10
|
private _context;
|
|
11
|
-
private _limitSources;
|
|
12
11
|
get context(): C;
|
|
13
|
-
get limitSources(): AbrLimitSources;
|
|
14
12
|
init(rules: IAbrRule<T, C>[], initContext: IRuleInitContext): void;
|
|
15
13
|
destroy(): void;
|
|
16
14
|
updateContext(context: C): void;
|
|
@@ -5,10 +5,6 @@ import type { Representation, Segment } from "../parsers/types";
|
|
|
5
5
|
import type { ElementSizeManager } from "../HTMLVideoElement/ElementSizeManager";
|
|
6
6
|
import type { IObservableMediaElement } from "../HTMLVideoElement/observable";
|
|
7
7
|
import type { AbrPhase } from "./controllers/abrPhaseController";
|
|
8
|
-
export type AbrLimitSources = {
|
|
9
|
-
readonly above: string | undefined;
|
|
10
|
-
readonly below: string | undefined;
|
|
11
|
-
};
|
|
12
8
|
export declare enum RuleConfidence {
|
|
13
9
|
Low = 0,
|
|
14
10
|
Normal = 1,
|
|
@@ -101,7 +97,6 @@ export interface IAbrController<T extends IBaseTrack> {
|
|
|
101
97
|
destroy(): void;
|
|
102
98
|
updateContext(context: IBaseAbrControllerContext): void;
|
|
103
99
|
autoSelectTrack(rules?: IAbrRule<T, IBaseAbrControllerContext>[]): T;
|
|
104
|
-
readonly limitSources: AbrLimitSources;
|
|
105
100
|
}
|
|
106
101
|
export interface IBaseAbrControllerContext extends IVideoTracksContext {
|
|
107
102
|
currentVideoTrack: Nullable<IVideoTrack>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ITuningConfig } from "../../../utils/tuningConfig";
|
|
2
|
-
type DisposeConstraints = Pick<ITuningConfig, "reuseOwnVideoElement" | "clearAudioElementOnDispose">;
|
|
3
|
-
export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, reuseOwnVideoElement }: ITuningConfig) => HTMLVideoElement;
|
|
2
|
+
type DisposeConstraints = Pick<ITuningConfig, "reuseOwnVideoElementOnBackgroundTabOnly" | "reuseOwnVideoElement" | "clearAudioElementOnDispose">;
|
|
3
|
+
export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, reuseOwnVideoElement, reuseOwnVideoElementOnBackgroundTabOnly }: ITuningConfig) => HTMLVideoElement;
|
|
4
4
|
export declare const initializeAudio: (element: HTMLAudioElement) => HTMLAudioElement;
|
|
5
5
|
export declare const dispose: (element: HTMLMediaElement, constraints: DisposeConstraints) => void;
|
|
6
6
|
export {};
|
|
@@ -465,6 +465,7 @@ export type ITuningConfig = {
|
|
|
465
465
|
* (Скорее всего имеет смысл включить такой же флаг в настройках ui)
|
|
466
466
|
*/
|
|
467
467
|
reuseOwnVideoElement?: boolean;
|
|
468
|
+
reuseOwnVideoElementOnBackgroundTabOnly?: boolean;
|
|
468
469
|
/**
|
|
469
470
|
* Обрабатываем все сетевые ошибки, которые приходят с бэка.
|
|
470
471
|
* на http 500 не падаем в краш.
|