@hyext/types-ext-sdk-hy 3.20.1-beta.1 → 3.20.1-beta.2
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.d.ts +40 -43
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2528,22 +2528,22 @@ type SafeAreaInfo = {
|
|
|
2528
2528
|
* @property screenWidth - 屏幕宽度
|
|
2529
2529
|
* @property screenHeight - 屏幕高度
|
|
2530
2530
|
* @property isLandscape - 屏幕是否是横屏高度
|
|
2531
|
-
* @property
|
|
2531
|
+
* @property pixelRatio - 设备像素比
|
|
2532
2532
|
* @property windowWidth - 可使用窗口宽度,单位 px
|
|
2533
2533
|
* @property windowHeight - 可使用窗口高度,单位 px
|
|
2534
|
-
* @property
|
|
2535
|
-
* @property
|
|
2534
|
+
* @property statusBarHeight - 状态栏的高度,单位 px
|
|
2535
|
+
* @property screenTop - 窗口上边缘的 y 值
|
|
2536
2536
|
* @property [safeArea] - 在竖屏正方向下的安全区域。部分机型没有安全区域概念,则不返回 safeArea 字段
|
|
2537
2537
|
*/
|
|
2538
2538
|
type Consts = {
|
|
2539
2539
|
screenWidth: number;
|
|
2540
2540
|
screenHeight: number;
|
|
2541
2541
|
isLandscape: boolean;
|
|
2542
|
-
pixelRatio
|
|
2542
|
+
pixelRatio: number;
|
|
2543
2543
|
windowWidth: number;
|
|
2544
2544
|
windowHeight: number;
|
|
2545
|
-
statusBarHeight
|
|
2546
|
-
screenTop
|
|
2545
|
+
statusBarHeight: number;
|
|
2546
|
+
screenTop: number;
|
|
2547
2547
|
safeArea?: SafeAreaInfo;
|
|
2548
2548
|
};
|
|
2549
2549
|
|
|
@@ -2559,14 +2559,14 @@ namespace context {
|
|
|
2559
2559
|
* @param callback - 收到消息时回调 返回消息内容
|
|
2560
2560
|
* @returns 调用结果
|
|
2561
2561
|
*/
|
|
2562
|
-
function on(topic: string, callback: ContextOnCallback):
|
|
2562
|
+
function on(topic: string, callback: ContextOnCallback): void;
|
|
2563
2563
|
/**
|
|
2564
2564
|
* 取消监听直播间消息
|
|
2565
2565
|
* @param topic - 宿主消息名, activated-小程序激活, subscribeSubmit-【观众端】当前观众订阅状态发生变化, giftSubmit-【观众端】当前观众送礼, barrageSubmit-当前用户发送弹幕, unzipProgress-每个任务的解压进度, userInteract-用户交互信息, openCoinPanelClosed-能量豆弹窗关闭, uiVisibilityStateChange-工具栏状态
|
|
2566
2566
|
* @param [callback] - 收到消息时回调 返回消息内容
|
|
2567
2567
|
* @returns 调用结果
|
|
2568
2568
|
*/
|
|
2569
|
-
function off(topic: string, callback?: ContextOnCallback):
|
|
2569
|
+
function off(topic: string, callback?: ContextOnCallback): void;
|
|
2570
2570
|
/**
|
|
2571
2571
|
* 显示互动通道入口红点
|
|
2572
2572
|
* @returns 返回是否显示成功
|
|
@@ -3115,7 +3115,7 @@ type StreamerInfo = {
|
|
|
3115
3115
|
streamerNick: string;
|
|
3116
3116
|
streamerAvatarUrl: string;
|
|
3117
3117
|
streamerSex: number;
|
|
3118
|
-
streamerRoomId:
|
|
3118
|
+
streamerRoomId: string;
|
|
3119
3119
|
streamerLevel: number;
|
|
3120
3120
|
streamerUnionId: string;
|
|
3121
3121
|
};
|
|
@@ -3142,10 +3142,10 @@ type ContextInfo = {
|
|
|
3142
3142
|
* @property template - 直播间模版, MobileLiveRoom-颜值, FMLiveRoom-多人语音, MatchLiveRoom-赛事, TVLiveRoom-虎牙电视台, GameRoom-游戏, ImmerseRoom-沉浸式, MultiLinkVideoRoom-派对
|
|
3143
3143
|
* @property sourceType - 直播间来源
|
|
3144
3144
|
* @property liveImmersion - 沉浸式直播间, 1-为沉浸式直播间, 0-为非沉浸式直播间
|
|
3145
|
-
* @property
|
|
3146
|
-
* @property
|
|
3147
|
-
* @property
|
|
3148
|
-
* @property
|
|
3145
|
+
* @property liveCompany - 交友陪玩直播间, 1-为交友陪玩直播间, 0-为非交友陪玩直播间
|
|
3146
|
+
* @property liveMode - 开播模式, kGame-【PC主播端】端游直播, kEntertainment-【PC主播端】娱乐直播, kMobile-【PC主播端】手游直播, kMakeFriends-【PC主播端】交友直播, kThirdParty-【PC主播端】第三方推流, kScreenCAP-【助手APP】录屏直播, kCamera-【助手APP】摄像头直播, kVoice-【助手APP】语音直播,
|
|
3147
|
+
* @property liveSubMode - 开播子模式, process-【PC主播端】端游直播-捕捉游戏画面, desktop-【PC主播端】端游直播-全屏捕捉, area-【PC主播端】端游直播-截取屏幕, window-【PC主播端】端游直播-窗口捕捉, adr-【PC主播端】手游直播-安卓手机, ios-【PC主播端】手游直播-苹果手机, audio-【PC主播端】交友直播-语音开播, video-【PC主播端】交友直播-视频开播, multiPlayersVideo-【PC主播端】派对模式,
|
|
3148
|
+
* @property liveId - 直播ID
|
|
3149
3149
|
*/
|
|
3150
3150
|
type RespLiveInfo = {
|
|
3151
3151
|
gameName: string;
|
|
@@ -3158,10 +3158,10 @@ type RespLiveInfo = {
|
|
|
3158
3158
|
template: string;
|
|
3159
3159
|
sourceType: number;
|
|
3160
3160
|
liveImmersion: number;
|
|
3161
|
-
liveCompany
|
|
3162
|
-
liveMode
|
|
3163
|
-
liveSubMode
|
|
3164
|
-
liveId
|
|
3161
|
+
liveCompany: number;
|
|
3162
|
+
liveMode: string;
|
|
3163
|
+
liveSubMode: string;
|
|
3164
|
+
liveId: string;
|
|
3165
3165
|
};
|
|
3166
3166
|
|
|
3167
3167
|
/**
|
|
@@ -4188,22 +4188,22 @@ type SafeArea = {
|
|
|
4188
4188
|
* @property screenWidth - 屏幕宽度
|
|
4189
4189
|
* @property screenHeight - 屏幕高度
|
|
4190
4190
|
* @property isLandscape - 屏幕是否是横屏高度
|
|
4191
|
-
* @property
|
|
4191
|
+
* @property pixelRatio - 设备像素比
|
|
4192
4192
|
* @property windowWidth - 可使用窗口宽度,单位 px
|
|
4193
4193
|
* @property windowHeight - 可使用窗口高度,单位 px
|
|
4194
|
-
* @property
|
|
4195
|
-
* @property
|
|
4194
|
+
* @property statusBarHeight - 状态栏的高度,单位 px
|
|
4195
|
+
* @property screenTop - 窗口上边缘的 y 值
|
|
4196
4196
|
* @property [safeArea] - 在竖屏正方向下的安全区域。部分机型没有安全区域概念,则不返回 safeArea 字段
|
|
4197
4197
|
*/
|
|
4198
4198
|
type WindowInfo = {
|
|
4199
4199
|
screenWidth: number;
|
|
4200
4200
|
screenHeight: number;
|
|
4201
4201
|
isLandscape: boolean;
|
|
4202
|
-
pixelRatio
|
|
4202
|
+
pixelRatio: number;
|
|
4203
4203
|
windowWidth: number;
|
|
4204
4204
|
windowHeight: number;
|
|
4205
|
-
statusBarHeight
|
|
4206
|
-
screenTop
|
|
4205
|
+
statusBarHeight: number;
|
|
4206
|
+
screenTop: number;
|
|
4207
4207
|
safeArea?: SafeArea;
|
|
4208
4208
|
};
|
|
4209
4209
|
|
|
@@ -6521,24 +6521,21 @@ namespace ob {
|
|
|
6521
6521
|
* @param callback - 收到消息时回调
|
|
6522
6522
|
* @returns 调用结果
|
|
6523
6523
|
*/
|
|
6524
|
-
function on(topic: string, callback: OBCallback):
|
|
6524
|
+
function on(topic: string, callback: OBCallback): void;
|
|
6525
6525
|
/**
|
|
6526
6526
|
* 取消监听ob消息
|
|
6527
6527
|
* @param topic - 消息名 matchStatusChange-比赛状态改变(默认), perspectiveChange-当前视角改变
|
|
6528
6528
|
* @param [callback] - 调用ob.on()时传入的函数的引用
|
|
6529
6529
|
* @returns 调用结果
|
|
6530
6530
|
*/
|
|
6531
|
-
function off(topic: string, callback?: OBCallback):
|
|
6531
|
+
function off(topic: string, callback?: OBCallback): void;
|
|
6532
6532
|
}
|
|
6533
6533
|
|
|
6534
6534
|
/**
|
|
6535
|
-
*
|
|
6536
|
-
* @property [state] - 状态值
|
|
6537
|
-
* @property status - 状态值
|
|
6535
|
+
* @property state - 状态值
|
|
6538
6536
|
*/
|
|
6539
|
-
type
|
|
6540
|
-
state
|
|
6541
|
-
status: string;
|
|
6537
|
+
type MatchInfo = {
|
|
6538
|
+
state: string;
|
|
6542
6539
|
};
|
|
6543
6540
|
|
|
6544
6541
|
/**
|
|
@@ -6565,12 +6562,12 @@ type PerspectiveParams = {
|
|
|
6565
6562
|
|
|
6566
6563
|
/**
|
|
6567
6564
|
* 视角信息
|
|
6568
|
-
* @property
|
|
6569
|
-
* @property
|
|
6565
|
+
* @property pid - 视角id
|
|
6566
|
+
* @property name - 视角名称
|
|
6570
6567
|
*/
|
|
6571
6568
|
type PerspectiveInfo = {
|
|
6572
|
-
pid
|
|
6573
|
-
name
|
|
6569
|
+
pid: number;
|
|
6570
|
+
name: string;
|
|
6574
6571
|
};
|
|
6575
6572
|
|
|
6576
6573
|
/**
|
|
@@ -6589,14 +6586,14 @@ namespace observer {
|
|
|
6589
6586
|
* @param callback - 收到消息时回调 返回对应消息名的后台消息content
|
|
6590
6587
|
* @returns 调用结果
|
|
6591
6588
|
*/
|
|
6592
|
-
function on(topic: string, callback: ObserverCallback):
|
|
6589
|
+
function on(topic: string, callback: ObserverCallback): void;
|
|
6593
6590
|
/**
|
|
6594
6591
|
* 取消监听后台消息
|
|
6595
6592
|
* @param topic - 消息名
|
|
6596
6593
|
* @param [callback] - 消息回调
|
|
6597
6594
|
* @returns 调用结果
|
|
6598
6595
|
*/
|
|
6599
|
-
function off(topic: string, callback?: ObserverCallback):
|
|
6596
|
+
function off(topic: string, callback?: ObserverCallback): void;
|
|
6600
6597
|
/**
|
|
6601
6598
|
* 触发小程序消息
|
|
6602
6599
|
* @param topic - 小程序消息名
|
|
@@ -7160,14 +7157,14 @@ namespace player {
|
|
|
7160
7157
|
* @param callback - 事件回调
|
|
7161
7158
|
* @returns 调用结果
|
|
7162
7159
|
*/
|
|
7163
|
-
function on(topic: string, callback: (...params: any[]) => any):
|
|
7160
|
+
function on(topic: string, callback: (...params: any[]) => any): void;
|
|
7164
7161
|
/**
|
|
7165
7162
|
* 取消事件监听
|
|
7166
7163
|
* @param topic - 事件名 waiting-waiting, seeking-seeking, seeked-seeked, playing-playing, ended-ended, canplay-canplay, loadedmetadata-loadedmetadata, pause-pause, play-play, timeupdate-timeupdate, videoFrameReduceStart-videoFrameReduceStart, videoFrameGrowEnd-videoFrameGrowEnd
|
|
7167
7164
|
* @param [callback] - 事件回调
|
|
7168
7165
|
* @returns 调用结果
|
|
7169
7166
|
*/
|
|
7170
|
-
function off(topic: string, callback?: (...params: any[]) => any):
|
|
7167
|
+
function off(topic: string, callback?: (...params: any[]) => any): void;
|
|
7171
7168
|
/**
|
|
7172
7169
|
* 切换当前直播间线路
|
|
7173
7170
|
* @param params - 切换线路参数
|
|
@@ -7348,13 +7345,13 @@ type CurrentLineInfo = {
|
|
|
7348
7345
|
|
|
7349
7346
|
/**
|
|
7350
7347
|
* 视频信息
|
|
7351
|
-
* @property
|
|
7352
|
-
* @property
|
|
7348
|
+
* @property duration - 视频时长
|
|
7349
|
+
* @property currentTime - 当前播放时间
|
|
7353
7350
|
* @property isPlaying - 是否正在播放
|
|
7354
7351
|
*/
|
|
7355
7352
|
type VideoInfo = {
|
|
7356
|
-
duration
|
|
7357
|
-
currentTime
|
|
7353
|
+
duration: number;
|
|
7354
|
+
currentTime: number;
|
|
7358
7355
|
isPlaying: boolean;
|
|
7359
7356
|
};
|
|
7360
7357
|
|