easy-player-pro 0.1.7 → 0.1.8
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type EasyPlayerProConfig } from "./config";
|
|
2
|
-
export type
|
|
2
|
+
export type VideoInfoType = {
|
|
3
3
|
encType: string;
|
|
4
4
|
encTypeCode: number;
|
|
5
5
|
height: number;
|
|
6
6
|
width: number;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type AudioInfoType = {
|
|
9
9
|
encTypeCode: string;
|
|
10
10
|
encType: string;
|
|
11
11
|
channels: number;
|
|
@@ -34,11 +34,11 @@ export declare class EasyPlayerPro {
|
|
|
34
34
|
/**
|
|
35
35
|
* 视频信息回调
|
|
36
36
|
*/
|
|
37
|
-
onVideoInfo: (videoInfo:
|
|
37
|
+
onVideoInfo: (videoInfo: VideoInfoType) => void;
|
|
38
38
|
/**
|
|
39
39
|
* 音频信息回调
|
|
40
40
|
*/
|
|
41
|
-
onAudioInfo: (audioInfo:
|
|
41
|
+
onAudioInfo: (audioInfo: AudioInfoType) => void;
|
|
42
42
|
/**
|
|
43
43
|
* 全屏事件
|
|
44
44
|
*/
|
|
@@ -170,11 +170,11 @@ export declare class EasyPlayerPro {
|
|
|
170
170
|
/**
|
|
171
171
|
* 获取视频信息
|
|
172
172
|
*/
|
|
173
|
-
getVideoInfo():
|
|
173
|
+
getVideoInfo(): VideoInfoType | null;
|
|
174
174
|
/**
|
|
175
175
|
* 获取音频信息
|
|
176
176
|
*/
|
|
177
|
-
getAudioInfo():
|
|
177
|
+
getAudioInfo(): AudioInfoType | null;
|
|
178
178
|
/**
|
|
179
179
|
* 设置语音对讲状态(PTZ需开启)
|
|
180
180
|
* @param isMic
|
|
@@ -189,3 +189,42 @@ export declare class EasyPlayerPro {
|
|
|
189
189
|
*/
|
|
190
190
|
destroy(): void;
|
|
191
191
|
}
|
|
192
|
+
export interface EasyPlayerProType {
|
|
193
|
+
isDestroy: boolean;
|
|
194
|
+
onPlay: () => void;
|
|
195
|
+
onPause: () => void;
|
|
196
|
+
onVideoInfo: (videoInfo: VideoInfoType) => void;
|
|
197
|
+
onAudioInfo: (audioInfo: AudioInfoType) => void;
|
|
198
|
+
onFullscreen: (isFullscreen: boolean) => void;
|
|
199
|
+
onMute: (isMute: boolean) => void;
|
|
200
|
+
onKBps: (KBps: number) => void;
|
|
201
|
+
onStretch: (isStretch: boolean) => void;
|
|
202
|
+
onPTZ: (ptz: any) => void;
|
|
203
|
+
onScreenshots: () => void;
|
|
204
|
+
onContextmenuClose: () => void;
|
|
205
|
+
onDecodeHevc: () => void;
|
|
206
|
+
onLiveEnd: () => void;
|
|
207
|
+
onTimeout: () => void;
|
|
208
|
+
onRecordEnd: () => void;
|
|
209
|
+
onRecordStart: () => void;
|
|
210
|
+
onQualityChange: (quality: string) => void;
|
|
211
|
+
onPlaybackSeek: () => void;
|
|
212
|
+
onPlaybackRate: () => void;
|
|
213
|
+
onTimestamps: () => void;
|
|
214
|
+
onError: (err: any) => void;
|
|
215
|
+
play: (url: string) => Promise<void>;
|
|
216
|
+
pause: () => void;
|
|
217
|
+
isPause: () => boolean;
|
|
218
|
+
setMute: (isMute: boolean) => void;
|
|
219
|
+
isMute: () => boolean | null;
|
|
220
|
+
screenshot: (name?: string, type?: string, rato?: number, format?: string) => string | Blob | null;
|
|
221
|
+
setFullscreen: (isFullscreen: boolean) => void;
|
|
222
|
+
exitFullscreen: () => void;
|
|
223
|
+
setQuality: (quality: string) => void;
|
|
224
|
+
setRate: (rate: number) => void;
|
|
225
|
+
seekTime: (time: number) => void;
|
|
226
|
+
getVideoInfo: () => VideoInfoType | null;
|
|
227
|
+
getAudioInfo: () => AudioInfoType | null;
|
|
228
|
+
setMic: (isMic: boolean) => void;
|
|
229
|
+
destroy: () => void;
|
|
230
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import './css/index.css';
|
|
2
2
|
import * as easyPlayer from './core/easy-player-pro';
|
|
3
|
-
|
|
4
|
-
export type
|
|
3
|
+
import type { EasyPlayerProConfig } from './core/config';
|
|
4
|
+
export type VideoInfoType = easyPlayer.VideoInfoType;
|
|
5
|
+
export type AudioInfoType = easyPlayer.AudioInfoType;
|
|
6
|
+
export type EasyPlayerProType = easyPlayer.EasyPlayerProType;
|
|
7
|
+
export type EasyPlayerProConfigType = EasyPlayerProConfig;
|
|
5
8
|
declare const _default: typeof easyPlayer.EasyPlayerPro;
|
|
6
9
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-player-pro",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "easy-player-pro 是一款能够同时支持HTTP、HTTP-FLV、HLS(m3u8)、WS、WEBRTC、FMP4视频直播与视频点播等多种协议,支持H.264、H.265、AAC、G711A、Mp3等多种音视频编码格式,支持MSE、WASM、WebCodec等多种解码方式,支持Windows、Linux、Android、iOS全平台终端的H5播放器,使用简单, 功能强大",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./lib/index.js",
|