ezuikit-flv 1.0.3-beta.2 → 2.0.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/CHANGELOG.md +7 -0
- package/README.md +82 -6
- package/decoder.js +22 -3
- package/index.js +25 -6
- package/package.json +2 -2
- package/types/_eventEmitter.d.ts +10 -0
- package/types/audio/audioContextLoader.d.ts +37 -18
- package/types/audio/index.d.ts +2 -2
- package/types/constant/index.d.ts +278 -268
- package/types/control/index.d.ts +1 -1
- package/types/control/observer.d.ts +1 -1
- package/types/index.d.ts +142 -84
- package/types/locales/en_US.d.ts +116 -0
- package/types/locales/zh_CN.d.ts +116 -0
- package/types/player/base-player.d.ts +38 -30
- package/types/player/commonLoader.d.ts +18 -4
- package/types/player/events.d.ts +4 -1
- package/types/player/hard-player/index.d.ts +3 -4
- package/types/player/hard-player/videoLoader.d.ts +3 -1
- package/types/player/index.d.ts +2 -2
- package/types/player/interface.d.ts +12 -8
- package/types/player/observer.d.ts +1 -1
- package/types/player/property.d.ts +1 -1
- package/types/player/soft-player/canvasLoader.d.ts +9 -13
- package/types/player/soft-player/index.d.ts +26 -27
- package/types/services/api.d.ts +1 -0
- package/types/services/constant.d.ts +1 -0
- package/types/services/index.d.ts +6 -0
- package/types/stream/fetchLoader.d.ts +3 -3
- package/types/typedefs.d.ts +10 -40
- package/types/utils/container.d.ts +1 -0
- package/types/utils/debug.d.ts +6 -6
|
@@ -1,278 +1,288 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export const MEDIA_SOURCE_UPDATE_END_TIMEOUT: number;
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
1
|
+
export declare const PLAYER_PLAY_PROTOCOL: {
|
|
2
|
+
websocket: number;
|
|
3
|
+
fetch: number;
|
|
4
|
+
webrtc: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const DEMUX_TYPE: {
|
|
7
|
+
flv: string;
|
|
8
|
+
m7s: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const FILE_SUFFIX: {
|
|
11
|
+
mp4: string;
|
|
12
|
+
webm: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const MEDIA_SOURCE_UPDATE_END_TIMEOUT: number;
|
|
15
|
+
export declare const DEFAULT_PLAYER_OPTIONS: {
|
|
16
|
+
videoBuffer: number;
|
|
17
|
+
videoBufferDelay: number;
|
|
18
|
+
scaleMode: number;
|
|
19
|
+
debug: boolean;
|
|
20
|
+
heartTimeout: number;
|
|
21
|
+
heartTimeoutReplayTimes: number;
|
|
22
|
+
timeout: number;
|
|
23
|
+
loadingTimeout: number;
|
|
24
|
+
loadingTimeoutDelay: number;
|
|
25
|
+
loadingTimeoutReplayTimes: number;
|
|
26
|
+
keepScreenOn: boolean;
|
|
27
|
+
muted: boolean;
|
|
28
|
+
hasAudio: boolean;
|
|
29
|
+
volume: number;
|
|
30
|
+
hasVideo: boolean;
|
|
31
|
+
decoder: string;
|
|
32
|
+
staticPath: string;
|
|
33
|
+
url: string;
|
|
34
|
+
rotate: number;
|
|
35
|
+
isLive: boolean;
|
|
36
|
+
forceNoOffscreen: boolean;
|
|
37
|
+
protocol: number;
|
|
38
|
+
demuxType: string;
|
|
39
|
+
useMSE: boolean;
|
|
40
|
+
wasmDecodeErrorReplay: boolean;
|
|
41
|
+
openWebglAlignment: boolean;
|
|
42
|
+
wasmDecodeAudioSyncVideo: boolean;
|
|
43
|
+
autoPlay: boolean;
|
|
44
|
+
loggerOptions: {
|
|
45
|
+
level: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const WORKER_CMD_TYPE: {
|
|
49
|
+
init: string;
|
|
50
|
+
initVideo: string;
|
|
51
|
+
render: string;
|
|
52
|
+
playAudio: string;
|
|
53
|
+
initAudio: string;
|
|
54
|
+
kBps: string;
|
|
55
|
+
decode: string;
|
|
56
|
+
audioCode: string;
|
|
57
|
+
videoCode: string;
|
|
58
|
+
wasmError: string;
|
|
59
|
+
};
|
|
60
|
+
export declare const WASM_ERROR: {
|
|
61
|
+
invalidNalUnitSize: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const MEDIA_TYPE: {
|
|
64
|
+
audio: number;
|
|
65
|
+
video: number;
|
|
66
|
+
};
|
|
67
|
+
export declare const FLV_MEDIA_TYPE: {
|
|
68
|
+
audio: number;
|
|
69
|
+
video: number;
|
|
70
|
+
};
|
|
71
|
+
export declare const WORKER_SEND_TYPE: {
|
|
72
|
+
init: string;
|
|
73
|
+
decode: string;
|
|
74
|
+
audioDecode: string;
|
|
75
|
+
videoDecode: string;
|
|
76
|
+
close: string;
|
|
77
|
+
updateConfig: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const EVENTS: {
|
|
80
|
+
fullscreenChange: string;
|
|
81
|
+
orientationChange: string;
|
|
82
|
+
decoderWorkerInit: string;
|
|
83
|
+
play: string;
|
|
84
|
+
playing: string;
|
|
85
|
+
pause: string;
|
|
86
|
+
mute: string;
|
|
87
|
+
load: string;
|
|
88
|
+
loading: string;
|
|
89
|
+
loaded: string;
|
|
90
|
+
videoInfo: string;
|
|
91
|
+
timeUpdate: string;
|
|
92
|
+
timeUpdateOSD: string;
|
|
93
|
+
audioInfo: string;
|
|
94
|
+
log: string;
|
|
95
|
+
error: string;
|
|
96
|
+
kBps: string;
|
|
97
|
+
timeout: string;
|
|
98
|
+
heartTimeout: string;
|
|
99
|
+
heartRetryTimes: string;
|
|
100
|
+
delayTimeout: string;
|
|
101
|
+
loadingTimeout: string;
|
|
102
|
+
loadingRetryTimes: string;
|
|
103
|
+
stats: string;
|
|
104
|
+
performance: string;
|
|
105
|
+
buffer: string;
|
|
106
|
+
videoFrame: string;
|
|
107
|
+
start: string;
|
|
108
|
+
metadata: string;
|
|
109
|
+
resize: string;
|
|
110
|
+
streamEnd: string;
|
|
111
|
+
streamSuccess: string;
|
|
112
|
+
streamMessage: string;
|
|
113
|
+
streamError: string;
|
|
114
|
+
volumechange: string;
|
|
115
|
+
audioCodecUnsupported: string;
|
|
116
|
+
unrecoverableEarlyEof: string;
|
|
117
|
+
destroy: string;
|
|
118
|
+
mseSourceOpen: string;
|
|
119
|
+
mseSourceClose: string;
|
|
120
|
+
mseSourceBufferError: string;
|
|
121
|
+
mseSourceBufferBusy: string;
|
|
122
|
+
mseSourceBufferFull: string;
|
|
123
|
+
videoWaiting: string;
|
|
124
|
+
videoTimeUpdate: string;
|
|
125
|
+
videoSyncAudio: string;
|
|
126
|
+
playToRenderTimes: string;
|
|
127
|
+
localVideoRecords: string;
|
|
128
|
+
getDefinitionListResult: string;
|
|
129
|
+
definitionChange: string;
|
|
130
|
+
definitionListChange: string;
|
|
131
|
+
playbackRateListChange: string;
|
|
132
|
+
playbackRateChange: string;
|
|
133
|
+
decoderLoaded: string;
|
|
134
|
+
end: string;
|
|
135
|
+
} & {
|
|
136
|
+
loading: string;
|
|
137
|
+
play: string;
|
|
138
|
+
capturePicture: string;
|
|
139
|
+
volumechange: string;
|
|
140
|
+
audioInfo: string;
|
|
141
|
+
videoInfo: string;
|
|
142
|
+
fullscreen: string;
|
|
143
|
+
exitFullscreen: string;
|
|
144
|
+
fullscreenChange: string;
|
|
145
|
+
resize: string;
|
|
146
|
+
orientationChange: string;
|
|
147
|
+
audioCodecUnsupported: string;
|
|
148
|
+
changeTheme: string;
|
|
149
|
+
changeRecType: string;
|
|
150
|
+
changeDefinition: string;
|
|
151
|
+
changeSpeed: string;
|
|
152
|
+
control: {
|
|
153
|
+
play: string;
|
|
154
|
+
capturePicture: string;
|
|
155
|
+
volumechange: string;
|
|
156
|
+
volumePanelOpenChange: string;
|
|
157
|
+
controlsBarOpenChange: string;
|
|
158
|
+
headerMoreShow: string;
|
|
159
|
+
footerMoreShow: string;
|
|
160
|
+
beforeMountControls: string;
|
|
161
|
+
mountedControls: string;
|
|
162
|
+
beforeUnmountControls: string;
|
|
163
|
+
unmountedControls: string;
|
|
164
|
+
changeRecType: string;
|
|
165
|
+
changeDefinition: string;
|
|
166
|
+
definitionPanelOpenChange: string;
|
|
167
|
+
changeSpeed: string;
|
|
168
|
+
speedPanelOpenChange: string;
|
|
169
|
+
};
|
|
170
|
+
theme: {
|
|
171
|
+
beforeDestroy: string;
|
|
172
|
+
destroyed: string;
|
|
173
|
+
};
|
|
174
|
+
message: string;
|
|
175
|
+
};
|
|
176
|
+
export declare const FLV_EVENTS: {
|
|
177
|
+
load: string;
|
|
178
|
+
timeUpdate: string;
|
|
179
|
+
videoInfo: string;
|
|
180
|
+
audioInfo: string;
|
|
181
|
+
error: string;
|
|
182
|
+
kBps: string;
|
|
183
|
+
log: string;
|
|
184
|
+
start: string;
|
|
185
|
+
delayTimeout: string;
|
|
186
|
+
fullscreen: string;
|
|
187
|
+
play: string;
|
|
188
|
+
pause: string;
|
|
189
|
+
mute: string;
|
|
190
|
+
stats: string;
|
|
191
|
+
volumechange: string;
|
|
192
|
+
performance: string;
|
|
193
|
+
playToRenderTimes: string;
|
|
194
|
+
};
|
|
195
|
+
export declare const EVENTS_ERROR: {
|
|
196
|
+
playError: string;
|
|
197
|
+
fetchError: string;
|
|
198
|
+
websocketError: string;
|
|
199
|
+
webcodecsH265NotSupport: string;
|
|
200
|
+
webcodecsDecodeError: string;
|
|
201
|
+
webcodecsWidthOrHeightChange: string;
|
|
202
|
+
mediaSourceH265NotSupport: string;
|
|
203
|
+
mediaSourceFull: string;
|
|
204
|
+
mseSourceBufferError: string;
|
|
205
|
+
mediaSourceAppendBufferError: string;
|
|
206
|
+
mediaSourceBufferListLarge: string;
|
|
207
|
+
mediaSourceAppendBufferEndTimeout: string;
|
|
208
|
+
wasmDecodeError: string;
|
|
209
|
+
webglAlignmentError: string;
|
|
210
|
+
};
|
|
211
|
+
export declare const WEBSOCKET_STATUS: {
|
|
212
|
+
notConnect: string;
|
|
213
|
+
open: string;
|
|
214
|
+
close: string;
|
|
215
|
+
error: string;
|
|
216
|
+
};
|
|
217
|
+
export declare const BUFFER_STATUS: {
|
|
218
|
+
empty: string;
|
|
219
|
+
buffering: string;
|
|
220
|
+
full: string;
|
|
221
|
+
};
|
|
222
|
+
export declare const SCREENSHOT_TYPE: {
|
|
223
|
+
download: string;
|
|
224
|
+
base64: string;
|
|
225
|
+
blob: string;
|
|
226
|
+
};
|
|
227
|
+
export declare const VIDEO_ENC_TYPE: {
|
|
216
228
|
7: string;
|
|
217
229
|
12: string;
|
|
218
230
|
};
|
|
219
|
-
export
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
export const AUDIO_ENC_TYPE: {
|
|
231
|
+
export declare const VIDEO_ENC_CODE: {
|
|
232
|
+
h264: number;
|
|
233
|
+
h265: number;
|
|
234
|
+
};
|
|
235
|
+
export declare const AUDIO_ENC_TYPE: {
|
|
224
236
|
10: string;
|
|
225
237
|
7: string;
|
|
226
238
|
8: string;
|
|
227
239
|
};
|
|
228
|
-
export
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
export const CONTROL_HEIGHT
|
|
234
|
-
export
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
export const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
let abort: string;
|
|
274
|
-
}
|
|
240
|
+
export declare const H265_NAL_TYPE: {
|
|
241
|
+
vps: number;
|
|
242
|
+
sps: number;
|
|
243
|
+
pps: number;
|
|
244
|
+
};
|
|
245
|
+
export declare const CONTROL_HEIGHT = 38;
|
|
246
|
+
export declare const SCALE_MODE_TYPE: {
|
|
247
|
+
full: number;
|
|
248
|
+
auto: number;
|
|
249
|
+
fullAuto: number;
|
|
250
|
+
};
|
|
251
|
+
export declare const CANVAS_RENDER_TYPE: {
|
|
252
|
+
webcodecs: string;
|
|
253
|
+
webgl: string;
|
|
254
|
+
offscreen: string;
|
|
255
|
+
};
|
|
256
|
+
export declare const ENCODED_VIDEO_TYPE: {
|
|
257
|
+
key: string;
|
|
258
|
+
delta: string;
|
|
259
|
+
};
|
|
260
|
+
export declare const MP4_CODECS: {
|
|
261
|
+
avc: string;
|
|
262
|
+
hev: string;
|
|
263
|
+
};
|
|
264
|
+
export declare const MEDIA_SOURCE_STATE: {
|
|
265
|
+
ended: string;
|
|
266
|
+
open: string;
|
|
267
|
+
closed: string;
|
|
268
|
+
};
|
|
269
|
+
export declare const FRAG_DURATION: number;
|
|
270
|
+
export declare const AUDIO_SYNC_VIDEO_DIFF = 1000;
|
|
271
|
+
export declare const HOT_KEY: {
|
|
272
|
+
esc: number;
|
|
273
|
+
arrowUp: number;
|
|
274
|
+
arrowDown: number;
|
|
275
|
+
};
|
|
276
|
+
export declare const WCS_ERROR: {
|
|
277
|
+
keyframeIsRequiredError: string;
|
|
278
|
+
canNotDecodeClosedCodec: string;
|
|
279
|
+
};
|
|
280
|
+
export declare const FETCH_ERROR: {
|
|
281
|
+
abortError1: string;
|
|
282
|
+
abortError2: string;
|
|
283
|
+
abort: string;
|
|
284
|
+
};
|
|
275
285
|
/**
|
|
276
286
|
* 开放平台https接口
|
|
277
287
|
*/
|
|
278
|
-
export const HTTP_ENV_DOMAIN
|
|
288
|
+
export declare const HTTP_ENV_DOMAIN = "https://open.ys7.com/";
|
package/types/control/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const _default: (player: any) => void;
|
|
2
2
|
export default _default;
|