ezuikit-flv 1.0.3-alpha.16 → 1.0.3-alpha.17
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/decoder.js +2 -2
- package/index.js +5 -5
- package/package.json +1 -1
- package/types/constant/index.d.ts +0 -9
- package/types/index.d.ts +16 -2
- package/types/player/base-player.d.ts +0 -1
- package/types/player/hard-player/index.d.ts +0 -6
- package/types/player/interface.d.ts +0 -2
- package/types/player/soft-player/index.d.ts +0 -5
- package/types/typedefs.d.ts +0 -10
- package/types/utils/debug.d.ts +1 -1
package/package.json
CHANGED
|
@@ -17,12 +17,9 @@ export namespace DEFAULT_PLAYER_OPTIONS {
|
|
|
17
17
|
export let videoBufferDelay: number;
|
|
18
18
|
export let scaleMode: number;
|
|
19
19
|
export let debug: boolean;
|
|
20
|
-
export let loadingTimeout: number;
|
|
21
20
|
export let heartTimeout: number;
|
|
22
21
|
export let timeout: number;
|
|
23
|
-
export let loadingTimeoutReplay: boolean;
|
|
24
22
|
export let heartTimeoutReplay: boolean;
|
|
25
|
-
export let loadingTimeoutReplayTimes: number;
|
|
26
23
|
export let heartTimeoutReplayTimes: number;
|
|
27
24
|
export let keepScreenOn: boolean;
|
|
28
25
|
export let isMute: boolean;
|
|
@@ -105,8 +102,6 @@ export namespace EVENTS {
|
|
|
105
102
|
let timeout_1: string;
|
|
106
103
|
export { timeout_1 as timeout };
|
|
107
104
|
export let delayTimeout: string;
|
|
108
|
-
let loadingTimeout_1: string;
|
|
109
|
-
export { loadingTimeout_1 as loadingTimeout };
|
|
110
105
|
export let stats: string;
|
|
111
106
|
export let performance: string;
|
|
112
107
|
export let buffer: string;
|
|
@@ -155,10 +150,6 @@ export namespace FLV_EVENTS {
|
|
|
155
150
|
export { log_1 as log };
|
|
156
151
|
import start_1 = EVENTS.start;
|
|
157
152
|
export { start_1 as start };
|
|
158
|
-
import timeout_2 = EVENTS.timeout;
|
|
159
|
-
export { timeout_2 as timeout };
|
|
160
|
-
import loadingTimeout_2 = EVENTS.loadingTimeout;
|
|
161
|
-
export { loadingTimeout_2 as loadingTimeout };
|
|
162
153
|
import delayTimeout_1 = EVENTS.delayTimeout;
|
|
163
154
|
export { delayTimeout_1 as delayTimeout };
|
|
164
155
|
let fullscreen_1: string;
|
package/types/index.d.ts
CHANGED
|
@@ -44,7 +44,6 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
44
44
|
static ROTATE: number[];
|
|
45
45
|
/** */
|
|
46
46
|
static TIMEOUT: {
|
|
47
|
-
loadingTimeout: string;
|
|
48
47
|
delayTimeout: string;
|
|
49
48
|
};
|
|
50
49
|
/**
|
|
@@ -81,7 +80,6 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
81
80
|
services: Services;
|
|
82
81
|
_opt: FlvOptions;
|
|
83
82
|
$container: any;
|
|
84
|
-
_loadingTimeoutReplayTimes: number;
|
|
85
83
|
_heartTimeoutReplayTimes: number;
|
|
86
84
|
events: Events;
|
|
87
85
|
_videoInfo: {};
|
|
@@ -280,6 +278,10 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
280
278
|
* flv.play()
|
|
281
279
|
*/
|
|
282
280
|
play(options?: (string | FlvOptions) | undefined): Promise<any>;
|
|
281
|
+
/**
|
|
282
|
+
* @private
|
|
283
|
+
*/
|
|
284
|
+
private __play;
|
|
283
285
|
/**
|
|
284
286
|
* @description 播放
|
|
285
287
|
* @private
|
|
@@ -288,6 +290,18 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
288
290
|
* @returns {Promise<unknown>}
|
|
289
291
|
*/
|
|
290
292
|
private _play;
|
|
293
|
+
/**
|
|
294
|
+
* @private
|
|
295
|
+
*/
|
|
296
|
+
private _onDelayTimeout;
|
|
297
|
+
/**
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
private _onStreamSuccess;
|
|
301
|
+
/**
|
|
302
|
+
* @private
|
|
303
|
+
*/
|
|
304
|
+
private _onStreamError;
|
|
291
305
|
/**
|
|
292
306
|
* @description 重新调整视图大小
|
|
293
307
|
* @param {number=} width 宽
|
|
@@ -22,7 +22,6 @@ export default class HardPlayer extends BasePlayer {
|
|
|
22
22
|
_opt: RequiredFlvOptions;
|
|
23
23
|
_checkHeartTimeout: number;
|
|
24
24
|
_stats: any;
|
|
25
|
-
_checkLoadingTimeout: number;
|
|
26
25
|
control: Control;
|
|
27
26
|
width: number;
|
|
28
27
|
height: number;
|
|
@@ -69,12 +68,7 @@ export default class HardPlayer extends BasePlayer {
|
|
|
69
68
|
* @description 心跳检查,如果渲染间隔暂停了多少时间之后,就会抛出异常
|
|
70
69
|
*/
|
|
71
70
|
checkHeartTimeout(): void;
|
|
72
|
-
/**
|
|
73
|
-
* @description 检查等待时间 (loading 等待时间)
|
|
74
|
-
*/
|
|
75
|
-
checkLoadingTimeout(): void;
|
|
76
71
|
handleRender(): void;
|
|
77
|
-
clearCheckLoadingTimeout(): void;
|
|
78
72
|
/**
|
|
79
73
|
*
|
|
80
74
|
* @param options
|
|
@@ -63,11 +63,6 @@ export default class SoftPlayer extends BasePlayer {
|
|
|
63
63
|
checkHeartTimeout(): void;
|
|
64
64
|
checkStatsInterval(): void;
|
|
65
65
|
clearCheckHeartTimeout(): void;
|
|
66
|
-
/**
|
|
67
|
-
* @description 检查等待时间 (loading 等待时间)
|
|
68
|
-
*/
|
|
69
|
-
checkLoadingTimeout(): void;
|
|
70
|
-
clearCheckLoadingTimeout(): void;
|
|
71
66
|
clearStatsInterval(): void;
|
|
72
67
|
handleRender(): void;
|
|
73
68
|
updateStats(options: any): void;
|
package/types/typedefs.d.ts
CHANGED
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
* @property {number=} timeout 设置超时时长, 单位秒, 在连接成功之前(loading)和播放中途(heart),如果超过设定时长无数据返回,则回调timeout事件。默认 10
|
|
17
17
|
* @property {number=} heartTimeout 设置超时时长, 单位秒, 播放中途,如果超过设定时长无数据返回,则回调timeout事件。默认 5
|
|
18
18
|
* @property {number=} heartTimeoutReplayTimes `heartTimeoutReplay` 重试次数。默认 5
|
|
19
|
-
* @property {number=} loadingTimeout 设置超时时长, 单位秒。默认 10
|
|
20
|
-
* @property {boolean=} loadingTimeoutReplay 是否开启loading超时之后自动再播放, 默认 true
|
|
21
19
|
* @property {boolean=} keepScreenOn 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常。默认 false
|
|
22
20
|
* @property {boolean=} isMute 是否静音,默认是关闭声音播放的。默认 true
|
|
23
21
|
* @property {boolean=} useMSE 是否开启MediaSource硬解码。视频编码只支持H.264视频(Safari on iOS不支持)。默认 false
|
|
@@ -107,14 +105,6 @@ export type FlvOptions = {
|
|
|
107
105
|
* `heartTimeoutReplay` 重试次数。默认 5
|
|
108
106
|
*/
|
|
109
107
|
heartTimeoutReplayTimes?: number | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* 设置超时时长, 单位秒。默认 10
|
|
112
|
-
*/
|
|
113
|
-
loadingTimeout?: number | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* 是否开启loading超时之后自动再播放, 默认 true
|
|
116
|
-
*/
|
|
117
|
-
loadingTimeoutReplay?: boolean | undefined;
|
|
118
108
|
/**
|
|
119
109
|
* 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常。默认 false
|
|
120
110
|
*/
|
package/types/utils/debug.d.ts
CHANGED