@vkontakte/videoplayer-core 2.0.58 → 2.0.59

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-core",
3
- "version": "2.0.58",
3
+ "version": "2.0.59",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -1,135 +0,0 @@
1
- import { Milliseconds } from '@vkontakte/videoplayer-shared';
2
- import { IRepresentation } from '../types';
3
- interface IParams {
4
- videoElement: HTMLVideoElement;
5
- playerCallback: (...args: any) => void;
6
- config: {
7
- minBuffer: Milliseconds;
8
- lowLatencyMinBuffer: Milliseconds;
9
- minBufferSegments: number;
10
- lowLatencyMinBufferSegments: number;
11
- maxParallelRequests: number;
12
- };
13
- logger: (...args: any[]) => void;
14
- }
15
- export default class LiveDashPlayer {
16
- private paused;
17
- private autoQuality;
18
- private maxAutoQuality;
19
- private buffering;
20
- private destroyed;
21
- private videoPlayStarted;
22
- private lowLatency;
23
- private rep?;
24
- private bitrate;
25
- private manifest;
26
- private bitrateSwitcher?;
27
- private filesFetcher?;
28
- private sourceBuffer?;
29
- private mediaSource?;
30
- private currentManifestEntry?;
31
- private manifestRequest?;
32
- private manifestRefetchTimer?;
33
- private bufferStates;
34
- private downloadRate?;
35
- private sourceJitter;
36
- private chunkRateEstimator;
37
- private manifestUrl;
38
- private urlResolver;
39
- private params;
40
- constructor(params: IParams);
41
- attachSource(manifestUrl: string): void;
42
- /**
43
- * switch to auto quality
44
- */
45
- setAutoQualityEnabled(enabled: boolean): void;
46
- setMaxAutoQuality(height: number | undefined): void;
47
- /**
48
- * switch quality by name
49
- */
50
- switchByName(name: string): void;
51
- /**
52
- * seek to actual video position
53
- */
54
- catchUp(): void;
55
- stop(): void;
56
- pause(): void;
57
- play(onPlayNotAllowed?: () => void): void;
58
- startPlay(targetQ: IRepresentation, autoQuality: boolean): void;
59
- /**
60
- * destroy player
61
- */
62
- destroy(): void;
63
- reinit(newManifestUrl: string): void;
64
- /**
65
- * if all retries fail...
66
- */
67
- private _handleNetworkError;
68
- /**
69
- * Retry request
70
- */
71
- private _retryCallback;
72
- /**
73
- * how many seconds are there in the buffer
74
- */
75
- private _getBufferSizeSec;
76
- /**
77
- * send buffering notification to player
78
- */
79
- private _notifyBuffering;
80
- /**
81
- * initialize video tag, add necessary event listeners
82
- * @private
83
- */
84
- private _initVideo;
85
- /**
86
- * there may be small gaps of several milliseconds when switching quality
87
- * we jump over these gaps here
88
- */
89
- private _fixupStall;
90
- /**
91
- * return best quality for rate
92
- */
93
- private _selectQuality;
94
- private shouldPlay;
95
- /**
96
- * set video source
97
- */
98
- private _setVideoSrc;
99
- /**
100
- * initialize player with target quality
101
- */
102
- private _initPlayerWith;
103
- /**
104
- * represents specific quality stream
105
- */
106
- private _representation;
107
- /**
108
- * switch to quality
109
- * TODO: Если новое качество выше старого – переключиться сразу. Если хуже, доиграть буфер
110
- */
111
- private _switchToQuality;
112
- /**
113
- * check if quality is available
114
- */
115
- private _qualityAvailable;
116
- /**
117
- * analyze bitrate data and switch qualities accordingly
118
- */
119
- private _initBitrateSwitcher;
120
- /**
121
- * load and parse manifest file
122
- */
123
- private _fetchManifest;
124
- private _playVideoElement;
125
- /**
126
- * update internal state when manifest was received from remote
127
- */
128
- private _handleManifestUpdate;
129
- /**
130
- * schedule manifest update after delay
131
- */
132
- private _refetchManifest;
133
- private _initManifest;
134
- }
135
- export {};