Skip to content

Commit 44db347

Browse files
committed
version: 9.0.5-beta.2
1 parent 2272a3a commit 44db347

9 files changed

Lines changed: 163 additions & 182 deletions

File tree

dist/adapter.esm.js

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter.js

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter.umd.js

Lines changed: 15 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.esm.js

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.umd.js

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/types/adapter.d.ts

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import * as StreamIO from '@ezuikit/stream-io';
2+
import StreamIO__default from '@ezuikit/stream-io';
3+
import * as I18n from '@ezuikit/utils-i18n';
4+
import I18n__default from '@ezuikit/utils-i18n';
15
import * as _ezuikit_utils_service_dist_types_fetch from '@ezuikit/utils-service/dist/types/fetch';
26
import { LoggerCls } from '@ezuikit/utils-logger/dist/types/logger';
37
import { LoggerOptions } from '@ezuikit/utils-logger';
4-
import * as I18n from '@ezuikit/utils-i18n';
5-
import I18n__default from '@ezuikit/utils-i18n';
68
import Service, { DeviceCapacityRes, DeviceInfoRes } from '@ezuikit/utils-service';
79
import { EzopenURL } from '@ezuikit/utils-tools';
810
import { PlayerPluginRecord } from '@ezuikit/player-plugin-record';
@@ -767,7 +769,7 @@ declare class EZopenPlayer extends EventEmitter {
767769
currentTime: number;
768770
/** 视频总时长,单位秒 */
769771
duration: number;
770-
_oStreamClient: StreamClient;
772+
_oStreamClient: StreamIO__default;
771773
_aHead: Uint8Array;
772774
/** @private */
773775
_detectTimer: any;
@@ -1043,62 +1045,6 @@ declare class EZopenPlayer extends EventEmitter {
10431045
get segments(): any;
10441046
}
10451047

1046-
declare class StreamClient {
1047-
private readonly _player;
1048-
private _streamClient;
1049-
_streamUUID: string;
1050-
constructor(player: EZopenPlayer);
1051-
private _getStreamClientFactory;
1052-
/**
1053-
* @description 开流, 此时设备的流还没有发出来
1054-
* @param {string} szUrl 取流路径,如ws://hostname:port/channel
1055-
* @param {object} oParams 取流需要涉及的相关参数
1056-
* @param {function} cbMessage 消息回调函数
1057-
* @param {function} cbClose 关闭回调
1058-
* @param {function} cbError 错误回调
1059-
* @returns {Promise<string>} 返回Promise对象 // 取流uuid,用于区分每条取流连接
1060-
*/
1061-
openStream(szUrl: string, oParams: object, cbMessage: (msg: object) => void, cbClose: (id?: string) => void, cbError: (id?: string, msg?: any) => void): Promise<string>;
1062-
/**
1063-
* @description 开始取流
1064-
*
1065-
* @param {string} id websocket id,在openStream的时候生成
1066-
* @param {string} szStartTime 开始时间
1067-
* @param {string} szStopTime 结束时间
1068-
* @param {function} cbMessage 码流回调函数
1069-
*
1070-
* @returns {Promise<unknown>} 返回Promise对象
1071-
*/
1072-
startPlay(id?: string): Promise<void>;
1073-
/**
1074-
* @description 设置播放速度
1075-
* @param rate 播放速度
1076-
* @param uuid websocket id,在openStream的时候生成
1077-
* @returns
1078-
*/
1079-
setPlayRate(rate: number, id?: string): Promise<void>;
1080-
/**
1081-
* @description 定位回放
1082-
*
1083-
* @param {string} id websocket id在openStream的时候生成
1084-
* @param {string} startTime 开始时间
1085-
* @param {string} stopTime 结束时间
1086-
*
1087-
* @returns {Promise<unknown>} Promise
1088-
*/
1089-
seek(startTime: string, stopTime: string, id?: string): Promise<void>;
1090-
/**
1091-
* @description 停止所有流
1092-
* @returns
1093-
*/
1094-
stopAll(): Promise<void>;
1095-
/**
1096-
* @description 客户端销毁
1097-
*/
1098-
destroy(): void;
1099-
advance(): any;
1100-
}
1101-
11021048
declare class JSPlugin {
11031049
constructor(props: any);
11041050
iWidth: any;
@@ -1109,8 +1055,10 @@ declare class JSPlugin {
11091055
_recordPlugin: any;
11101056
nWidth: number;
11111057
nHeight: number;
1112-
oStreamClient: StreamClient;
1058+
oStreamClient: StreamIO.default;
11131059
g_port: number;
1060+
get isHls(): boolean;
1061+
get isLive(): boolean;
11141062
get bPlay(): boolean;
11151063
get iRate(): number;
11161064
set playURL(url: string);

dist/types/index.d.ts

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import I18n from '@ezuikit/utils-i18n';
55
import Service, { DeviceCapacityRes, DeviceInfoRes } from '@ezuikit/utils-service';
66
import { EzopenURL } from '@ezuikit/utils-tools';
77
import { PlayerPluginRecord } from '@ezuikit/player-plugin-record';
8+
import StreamIO from '@ezuikit/stream-io';
89
import EventEmitter from 'eventemitter3';
910

1011
/**
@@ -108,62 +109,6 @@ interface IBufferItem {
108109
duration: number;
109110
}
110111

111-
declare class StreamClient {
112-
private readonly _player;
113-
private _streamClient;
114-
_streamUUID: string;
115-
constructor(player: EZopenPlayer);
116-
private _getStreamClientFactory;
117-
/**
118-
* @description 开流, 此时设备的流还没有发出来
119-
* @param {string} szUrl 取流路径,如ws://hostname:port/channel
120-
* @param {object} oParams 取流需要涉及的相关参数
121-
* @param {function} cbMessage 消息回调函数
122-
* @param {function} cbClose 关闭回调
123-
* @param {function} cbError 错误回调
124-
* @returns {Promise<string>} 返回Promise对象 // 取流uuid,用于区分每条取流连接
125-
*/
126-
openStream(szUrl: string, oParams: object, cbMessage: (msg: object) => void, cbClose: (id?: string) => void, cbError: (id?: string, msg?: any) => void): Promise<string>;
127-
/**
128-
* @description 开始取流
129-
*
130-
* @param {string} id websocket id,在openStream的时候生成
131-
* @param {string} szStartTime 开始时间
132-
* @param {string} szStopTime 结束时间
133-
* @param {function} cbMessage 码流回调函数
134-
*
135-
* @returns {Promise<unknown>} 返回Promise对象
136-
*/
137-
startPlay(id?: string): Promise<void>;
138-
/**
139-
* @description 设置播放速度
140-
* @param rate 播放速度
141-
* @param uuid websocket id,在openStream的时候生成
142-
* @returns
143-
*/
144-
setPlayRate(rate: number, id?: string): Promise<void>;
145-
/**
146-
* @description 定位回放
147-
*
148-
* @param {string} id websocket id在openStream的时候生成
149-
* @param {string} startTime 开始时间
150-
* @param {string} stopTime 结束时间
151-
*
152-
* @returns {Promise<unknown>} Promise
153-
*/
154-
seek(startTime: string, stopTime: string, id?: string): Promise<void>;
155-
/**
156-
* @description 停止所有流
157-
* @returns
158-
*/
159-
stopAll(): Promise<void>;
160-
/**
161-
* @description 客户端销毁
162-
*/
163-
destroy(): void;
164-
advance(): any;
165-
}
166-
167112
declare class ESCanvas {
168113
constructor(szCanvasId: any);
169114
m_iCanvasWidth: any;
@@ -822,7 +767,7 @@ declare class EZopenPlayer extends EventEmitter {
822767
currentTime: number;
823768
/** 视频总时长,单位秒 */
824769
duration: number;
825-
_oStreamClient: StreamClient;
770+
_oStreamClient: StreamIO;
826771
_aHead: Uint8Array;
827772
/** @private */
828773
_detectTimer: any;
@@ -1098,6 +1043,62 @@ declare class EZopenPlayer extends EventEmitter {
10981043
get segments(): any;
10991044
}
11001045

1046+
declare class StreamClient {
1047+
private readonly _player;
1048+
private _streamClient;
1049+
_streamUUID: string;
1050+
constructor(player: EZopenPlayer);
1051+
private _getStreamClientFactory;
1052+
/**
1053+
* @description 开流, 此时设备的流还没有发出来
1054+
* @param {string} szUrl 取流路径,如ws://hostname:port/channel
1055+
* @param {object} oParams 取流需要涉及的相关参数
1056+
* @param {function} cbMessage 消息回调函数
1057+
* @param {function} cbClose 关闭回调
1058+
* @param {function} cbError 错误回调
1059+
* @returns {Promise<string>} 返回Promise对象 // 取流uuid,用于区分每条取流连接
1060+
*/
1061+
openStream(szUrl: string, oParams: object, cbMessage: (msg: object) => void, cbClose: (id?: string) => void, cbError: (id?: string, msg?: any) => void): any;
1062+
/**
1063+
* @description 开始取流
1064+
*
1065+
* @param {string} id websocket id,在openStream的时候生成
1066+
* @param {string} szStartTime 开始时间
1067+
* @param {string} szStopTime 结束时间
1068+
* @param {function} cbMessage 码流回调函数
1069+
*
1070+
* @returns {Promise<unknown>} 返回Promise对象
1071+
*/
1072+
startPlay(id?: string): any;
1073+
/**
1074+
* @description 设置播放速度
1075+
* @param rate 播放速度
1076+
* @param uuid websocket id,在openStream的时候生成
1077+
* @returns
1078+
*/
1079+
setPlayRate(rate: number, id?: string): any;
1080+
/**
1081+
* @description 定位回放
1082+
*
1083+
* @param {string} id websocket id在openStream的时候生成
1084+
* @param {string} startTime 开始时间
1085+
* @param {string} stopTime 结束时间
1086+
*
1087+
* @returns {Promise<unknown>} Promise
1088+
*/
1089+
seek(startTime: string, stopTime: string, id?: string): any;
1090+
/**
1091+
* @description 停止所有流
1092+
* @returns
1093+
*/
1094+
stopAll(): any;
1095+
/**
1096+
* @description 客户端销毁
1097+
*/
1098+
destroy(): void;
1099+
advance(): any;
1100+
}
1101+
11011102
interface IStreamClient {
11021103
/**
11031104
* @description 开流, 此时设备的流还没有发出来

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ezuikit/player-ezopen",
3-
"version": "9.0.5-beta.1",
3+
"version": "9.0.5-beta.2",
44
"description": "萤石ezopne协议播放器",
55
"main": "dist/index.js",
66
"umd": "dist/index.umd.js",

0 commit comments

Comments
 (0)