@vkontakte/videoplayer-core 2.0.171 → 2.0.172-beta.1

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.
Files changed (64) hide show
  1. package/es2015.cjs +19 -241
  2. package/es2015.esm.js +19 -241
  3. package/esnext.cjs +19 -241
  4. package/esnext.esm.js +19 -241
  5. package/evergreen.esm.js +19 -241
  6. package/package.json +2 -2
  7. package/types/player/Player.d.ts +5 -1
  8. package/types/player/types.d.ts +25 -5
  9. package/types/providers/DashLiveProvider/utils/LiveDashPlayer.d.ts +3 -0
  10. package/types/providers/DashProvider/baseDashProvider.d.ts +3 -9
  11. package/types/providers/DashProvider/lib/buffer.d.ts +6 -2
  12. package/types/providers/DashProvider/lib/player.d.ts +1 -0
  13. package/types/providers/DashProvider/lib/sourceBufferTaskQueue.d.ts +1 -2
  14. package/types/providers/DashProvider/lib/types.d.ts +2 -2
  15. package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +4 -9
  16. package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +4 -2
  17. package/types/providers/DashProviderVirtual/lib/buffer/sourceBufferTaskQueue.d.ts +3 -2
  18. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.versionA.d.ts +3 -1
  19. package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +3 -1
  20. package/types/providers/DashProviderVirtual/lib/types.d.ts +2 -2
  21. package/types/providers/ProviderContainer/Mayday/GraceTimeout.d.ts +17 -0
  22. package/types/providers/ProviderContainer/Mayday/heuristics/SegmentAppendHeuristic.d.ts +10 -0
  23. package/types/providers/ProviderContainer/Mayday/heuristics/StartupHangupHeuristic.d.ts +46 -0
  24. package/types/providers/ProviderContainer/Mayday/heuristics/TvFetcherErrorHeuristic.d.ts +10 -0
  25. package/types/providers/ProviderContainer/Mayday/index.d.ts +2 -1
  26. package/types/providers/ProviderContainer/Mayday/types.d.ts +2 -1
  27. package/types/providers/ProviderContainer/index.d.ts +0 -1
  28. package/types/providers/ProviderContainer/utils/formatsSupport.d.ts +0 -1
  29. package/types/providers/ProviderContainer/utils/playbackHangup.d.ts +6 -2
  30. package/types/providers/types.d.ts +4 -2
  31. package/types/providers/utils/Abr/abrController.d.ts +4 -1
  32. package/types/providers/utils/Abr/abrManager.d.ts +3 -0
  33. package/types/providers/utils/Abr/controllers/stallsController.d.ts +10 -3
  34. package/types/providers/utils/Abr/rules/audio/audioThroughputRule.d.ts +2 -2
  35. package/types/providers/utils/Abr/rules/audio/minAudioForVideoRule.d.ts +2 -2
  36. package/types/providers/utils/Abr/rules/baseRule.d.ts +2 -2
  37. package/types/providers/utils/Abr/rules/video/abandonRequestRule.d.ts +2 -2
  38. package/types/providers/utils/Abr/rules/video/bolaRule.d.ts +2 -2
  39. package/types/providers/utils/Abr/rules/video/bufferRule.d.ts +2 -2
  40. package/types/providers/utils/Abr/rules/video/fitsContainerRule.d.ts +2 -2
  41. package/types/providers/utils/Abr/rules/video/insufficientBufferRule.d.ts +2 -2
  42. package/types/providers/utils/Abr/rules/video/lowerLimitRule.d.ts +2 -2
  43. package/types/providers/utils/Abr/rules/video/stallsRule.d.ts +6 -2
  44. package/types/providers/utils/Abr/rules/video/throughputRule.d.ts +2 -2
  45. package/types/providers/utils/Abr/rules/video/tvDisabledVideoTrackRule.d.ts +2 -2
  46. package/types/providers/utils/Abr/rules/video/upperLimitRule.d.ts +2 -2
  47. package/types/providers/utils/Abr/selectTrackByRules.d.ts +23 -0
  48. package/types/providers/utils/Abr/types.d.ts +8 -10
  49. package/types/providers/utils/Abr/utils.d.ts +3 -2
  50. package/types/providers/utils/HTMLVideoElement/ElementSizeManager.d.ts +2 -2
  51. package/types/providers/utils/HTMLVideoElement/destroy.d.ts +1 -1
  52. package/types/providers/utils/HTMLVideoElement/observable.d.ts +2 -2
  53. package/types/providers/utils/HTMLVideoElement/pool.d.ts +2 -3
  54. package/types/providers/utils/restorePlaybackRateInSafari.d.ts +2 -2
  55. package/types/utils/ThroughputEstimator.d.ts +2 -0
  56. package/types/utils/buffer/isBrokenSegmentAppend.d.ts +3 -0
  57. package/types/utils/buffer/timeRangesToIntervals.d.ts +3 -0
  58. package/types/utils/timers.d.ts +2 -0
  59. package/types/utils/tuningConfig.d.ts +58 -37
  60. package/types/providers/ProviderContainer/Mayday/heuristics/HangupHeuristic.d.ts +0 -23
  61. package/types/providers/utils/Abr/rules/video/downloadTimeRule.d.ts +0 -15
  62. package/types/providers/utils/Abr/rules/video/failedVideoTrackRule.d.ts +0 -14
  63. package/types/utils/autoSelectTrack.d.ts +0 -37
  64. package/types/utils/buffer/dynamicBufferTarget.d.ts +0 -10
@@ -1,15 +0,0 @@
1
- import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
2
- import type { IVideoTrack } from "../../../../../player/types";
3
- import type { Kbps, Milliseconds } from "@vkontakte/videoplayer-shared";
4
- import { LimitAboveRule } from "../limitAboveRule";
5
- import type { RulePhaseConfig } from "../../controllers/abrPhaseController";
6
- type DownloadTimeLogsArgs = [estimatedThroughput: Kbps, forwardBufferDuration: Milliseconds, simulatedFinalBufferMs: Milliseconds | null];
7
- export declare class DownloadTimeRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, DownloadTimeLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
8
- constructor(phaseConfig: RulePhaseConfig);
9
- execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
10
- private buildReferenceTimeline;
11
- private resolveLookaheadCount;
12
- private simulate;
13
- protected createLogMessage(selectedTrack: IVideoTrack, estimatedThroughput: Kbps, forwardBufferDuration: Milliseconds, simulatedFinalBufferMs: Milliseconds | null): string;
14
- }
15
- export {};
@@ -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 {};
@@ -1,37 +0,0 @@
1
- import type { ITuningConfig } from "./tuningConfig";
2
- import type { Kbps, Milliseconds, IRectangle, QualityLimits, IComponentLogger, Nullable } from "@vkontakte/videoplayer-shared";
3
- import { type ExactVideoQuality } from "@vkontakte/videoplayer-shared";
4
- import type { IAudioTrack, IBaseTrack, IVideoTrack } from "../player/types";
5
- interface IConstraints<T extends IBaseTrack> {
6
- container?: IRectangle;
7
- estimatedThroughput?: Kbps;
8
- tuning: ITuningConfig["autoTrackSelection"];
9
- limits?: QualityLimits;
10
- reserve?: Kbps;
11
- playbackRate?: number;
12
- forwardBufferHealth?: number;
13
- current?: T;
14
- failedVideoTrack?: Nullable<T>;
15
- visible?: boolean;
16
- history?: TrackHistory<T>;
17
- droppedVideoMaxQualityLimit?: ExactVideoQuality;
18
- stallsVideoMaxQualityLimit?: ExactVideoQuality;
19
- stallsPredictedThroughput?: Kbps;
20
- abrLogger: IComponentLogger;
21
- panelSize?: IRectangle;
22
- }
23
- export declare class TrackHistory<T extends IBaseTrack> {
24
- last: T | undefined;
25
- history: Record<IBaseTrack["id"], Milliseconds>;
26
- recordSelection(track: T): void;
27
- recordSwitch(track: T | undefined): void;
28
- clear(): void;
29
- }
30
- export declare const defaultEmptyArrayErrorMessage = "Assertion \"ABR Tracks is empty array\" failed";
31
- export declare const getMinPossibleAudioForVideoOld: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
32
- export declare const getMinPossibleAudioForVideoNew: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
33
- export declare const autoSelectVideoTrackNew: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, failedVideoTrack, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
34
- export declare const autoSelectVideoTrackOld: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, failedVideoTrack, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
35
- export declare const autoSelectAudioTrackForVideoOld: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
36
- export declare const autoSelectAudioTrackForVideoNew: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
37
- export {};
@@ -1,10 +0,0 @@
1
- import type { Kbps, Milliseconds, Nullable } from "@vkontakte/videoplayer-shared";
2
- import type { ITuningConfig } from "../tuningConfig";
3
- type DynamicBufferTargetConfig = ITuningConfig["dash"]["dynamicBufferTarget"];
4
- export interface IDynamicBufferTargetState {
5
- throughputKbps: Kbps;
6
- currentBitrateKbps: Nullable<Kbps>;
7
- baseTargetMs: Milliseconds;
8
- }
9
- export declare const computeDynamicBufferTarget: (state: IDynamicBufferTargetState, config: DynamicBufferTargetConfig) => Milliseconds;
10
- export {};