ezuikit-flv 1.0.2-alpha.5 → 1.0.2-alpha.7
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/index.js +3 -3
- package/package.json +6 -2
- package/types/index.d.ts +36 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ezuikit-flv",
|
|
3
|
-
"version": "1.0.2-alpha.
|
|
3
|
+
"version": "1.0.2-alpha.7",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./types",
|
|
6
6
|
"author": "Ezviz-OpenBiz",
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
"README.md",
|
|
14
14
|
"types"
|
|
15
15
|
],
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/Ezviz-OpenBiz/EZUIKit-flv/issues"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/Ezviz-OpenBiz/EZUIKit-flv",
|
|
16
20
|
"publishConfig": {
|
|
17
21
|
"access": "public",
|
|
18
22
|
"registry": "https://registry.npmjs.org/"
|
|
19
23
|
}
|
|
20
|
-
}
|
|
24
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export default EzuikitFlv;
|
|
|
9
9
|
* })
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
declare class EzuikitFlv extends
|
|
12
|
+
declare class EzuikitFlv extends BasePlayer {
|
|
13
13
|
/**
|
|
14
14
|
* @description ERROR
|
|
15
15
|
* @static
|
|
@@ -30,7 +30,10 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
30
30
|
mediaSourceAppendBufferError: string;
|
|
31
31
|
mediaSourceBufferListLarge: string;
|
|
32
32
|
mediaSourceAppendBufferEndTimeout: string;
|
|
33
|
-
wasmDecodeError: string;
|
|
33
|
+
wasmDecodeError: string; /**
|
|
34
|
+
* @description 绑定事件
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
34
37
|
webglAlignmentError: string;
|
|
35
38
|
};
|
|
36
39
|
/** */
|
|
@@ -38,6 +41,12 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
38
41
|
loadingTimeout: string;
|
|
39
42
|
delayTimeout: string;
|
|
40
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* @private
|
|
46
|
+
* @param {FlvOptions} options
|
|
47
|
+
* @returns {FlvOptions}
|
|
48
|
+
*/
|
|
49
|
+
private static _setOptions;
|
|
41
50
|
static version: string;
|
|
42
51
|
/**
|
|
43
52
|
* @description 静态方法 判断是否支持播放地址
|
|
@@ -61,17 +70,23 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
61
70
|
* @param {FlvOptions} options
|
|
62
71
|
*/
|
|
63
72
|
constructor(options: FlvOptions);
|
|
73
|
+
event: {
|
|
74
|
+
on: <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => this;
|
|
75
|
+
emit: <T_1 extends string | symbol>(event: T_1, ...args: any[]) => boolean;
|
|
76
|
+
eventNames: () => (string | symbol)[];
|
|
77
|
+
listeners: <T_2 extends string | symbol>(event: T_2) => ((...args: any[]) => void)[];
|
|
78
|
+
off: <T_3 extends string | symbol>(event: T_3, fn?: (...args: any[]) => void, context?: any, once?: boolean) => this;
|
|
79
|
+
once: <T_4 extends string | symbol>(event: T_4, fn: (...args: any[]) => void, context?: any) => this;
|
|
80
|
+
listenerCount: (event: string | symbol) => number;
|
|
81
|
+
addListener: <T_5 extends string | symbol>(event: T_5, fn: (...args: any[]) => void, context?: any) => this;
|
|
82
|
+
removeListener: <T_6 extends string | symbol>(event: T_6, fn?: (...args: any[]) => void, context?: any, once?: boolean) => this;
|
|
83
|
+
removeAllListeners: (event?: string | symbol) => this;
|
|
84
|
+
};
|
|
64
85
|
_opt: FlvOptions;
|
|
65
86
|
$container: any;
|
|
66
87
|
_loadingTimeoutReplayTimes: number;
|
|
67
88
|
_heartTimeoutReplayTimes: number;
|
|
68
89
|
events: Events;
|
|
69
|
-
/**
|
|
70
|
-
* @description 销毁
|
|
71
|
-
* @example
|
|
72
|
-
* flv.destroy()
|
|
73
|
-
*/
|
|
74
|
-
destroy(): void;
|
|
75
90
|
player: Player;
|
|
76
91
|
/**
|
|
77
92
|
* @description 初始化播放
|
|
@@ -100,6 +115,11 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
100
115
|
* flv.setDebug(false)
|
|
101
116
|
*/
|
|
102
117
|
setDebug(value: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* @description 设置日志
|
|
120
|
+
* @param {object} options 日志设置 {level: 'INFO' | 'LOG' | 'WARN' | 'ERROR'}
|
|
121
|
+
* @returns {void}
|
|
122
|
+
*/
|
|
103
123
|
setLogger(opt?: {}): void;
|
|
104
124
|
/**
|
|
105
125
|
* @description 关闭声音
|
|
@@ -115,14 +135,6 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
115
135
|
* flv.openSound() //
|
|
116
136
|
*/
|
|
117
137
|
openSound(): void;
|
|
118
|
-
/**
|
|
119
|
-
* @description 设置音量
|
|
120
|
-
* @param {number} value 音量 0~1
|
|
121
|
-
* @returns {void}
|
|
122
|
-
* @example
|
|
123
|
-
* flv.setVolume(0.5)
|
|
124
|
-
*/
|
|
125
|
-
setVolume(value: number): void;
|
|
126
138
|
set volume(value: any);
|
|
127
139
|
get volume(): any;
|
|
128
140
|
/**
|
|
@@ -182,12 +194,12 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
182
194
|
private clearView;
|
|
183
195
|
/**
|
|
184
196
|
* @description 播放
|
|
185
|
-
* @param {FlvOptions=} options
|
|
197
|
+
* @param {(string | FlvOptions)=} options
|
|
186
198
|
* @returns {Promise}
|
|
187
199
|
* @example
|
|
188
200
|
* flv.play()
|
|
189
201
|
*/
|
|
190
|
-
play(options?: FlvOptions): Promise<any>;
|
|
202
|
+
play(options?: (string | FlvOptions) | undefined): Promise<any>;
|
|
191
203
|
/**
|
|
192
204
|
* @description 播放
|
|
193
205
|
* @private
|
|
@@ -248,27 +260,18 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
248
260
|
*/
|
|
249
261
|
fullScreen(): Promise<any>;
|
|
250
262
|
/**
|
|
251
|
-
* @description
|
|
252
|
-
* @returns {Promise}
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
* flv.fullscreen() // 全屏
|
|
256
|
-
*/
|
|
257
|
-
fullscreen(): Promise<any>;
|
|
258
|
-
/**
|
|
259
|
-
* @description 取消全屏播放视频
|
|
263
|
+
* @description 退出全屏播放视频
|
|
260
264
|
* @returns {Promise}
|
|
261
265
|
* @example
|
|
262
|
-
* flv.cancelFullScreen() //
|
|
266
|
+
* flv.cancelFullScreen() // 退出全屏
|
|
263
267
|
*/
|
|
264
268
|
cancelFullScreen(): Promise<any>;
|
|
265
269
|
/**
|
|
266
|
-
* @description
|
|
270
|
+
* @description 退出全屏播放视频
|
|
271
|
+
* @private
|
|
267
272
|
* @returns {Promise}
|
|
268
|
-
* @example
|
|
269
|
-
* flv.exitFullscreen() // 全屏
|
|
270
273
|
*/
|
|
271
|
-
|
|
274
|
+
private _exitFullscreen;
|
|
272
275
|
/**
|
|
273
276
|
* @description 获取播放器的状态
|
|
274
277
|
* @returns {PlayerState} 播放器的状态
|
|
@@ -281,12 +284,7 @@ declare class EzuikitFlv extends EventEmitter<string | symbol, any> {
|
|
|
281
284
|
* @returns {object}
|
|
282
285
|
*/
|
|
283
286
|
getOptions(): object;
|
|
284
|
-
/**
|
|
285
|
-
* @description 获取版本
|
|
286
|
-
* @returns {string}
|
|
287
|
-
*/
|
|
288
|
-
getVersion(): string;
|
|
289
287
|
}
|
|
290
|
-
import
|
|
288
|
+
import BasePlayer from '@ezuikit/player-base';
|
|
291
289
|
import Events from './utils/events';
|
|
292
290
|
import Player from './player';
|