@hyext/types-ext-sdk-hy 3.14.1-beta.8 → 3.14.1
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 +319 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -839,6 +839,17 @@ namespace advance {
|
|
|
839
839
|
* @returns 调用结果
|
|
840
840
|
*/
|
|
841
841
|
function getDynamicConfigString(params: GetDynamicConfigReq): Promise<GetDynamicConfigRsp>;
|
|
842
|
+
/**
|
|
843
|
+
* 获取免流标记
|
|
844
|
+
* @returns 调用结果
|
|
845
|
+
*/
|
|
846
|
+
function getFreeFlowFlag(): Promise<FreeFlowFlagRsp>;
|
|
847
|
+
/**
|
|
848
|
+
* 直接发送弹幕
|
|
849
|
+
* @param params - 参数
|
|
850
|
+
* @returns 调用结果
|
|
851
|
+
*/
|
|
852
|
+
function sendBarrage(params: SendBarrageReq): Promise<void>;
|
|
842
853
|
}
|
|
843
854
|
|
|
844
855
|
/**
|
|
@@ -1435,6 +1446,22 @@ type GetDynamicConfigReq = {
|
|
|
1435
1446
|
key: string;
|
|
1436
1447
|
};
|
|
1437
1448
|
|
|
1449
|
+
/**
|
|
1450
|
+
* 免流标记信息
|
|
1451
|
+
* @property flag - 免流标记, 0-无效, 1-腾讯免流卡, 2-阿里免流卡
|
|
1452
|
+
*/
|
|
1453
|
+
type FreeFlowFlagRsp = {
|
|
1454
|
+
flag: number;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* 发送弹幕信息
|
|
1459
|
+
* @property content - 弹幕内容
|
|
1460
|
+
*/
|
|
1461
|
+
type SendBarrageReq = {
|
|
1462
|
+
content: string;
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1438
1465
|
/**
|
|
1439
1466
|
* app模块
|
|
1440
1467
|
*/
|
|
@@ -2977,6 +3004,15 @@ namespace device {
|
|
|
2977
3004
|
* @param params - 输入参数
|
|
2978
3005
|
*/
|
|
2979
3006
|
function vibrate(params: VibrateReq): Promise<void>;
|
|
3007
|
+
/**
|
|
3008
|
+
* 监听设备摇一摇事件
|
|
3009
|
+
* @param params - 输入参数
|
|
3010
|
+
*/
|
|
3011
|
+
function onDeviceShakeShake(params: OnDeviceShakeShakeReq): Promise<void>;
|
|
3012
|
+
/**
|
|
3013
|
+
* 取消监听设备摇一摇事件
|
|
3014
|
+
*/
|
|
3015
|
+
function offDeviceShakeShake(): Promise<void>;
|
|
2980
3016
|
}
|
|
2981
3017
|
|
|
2982
3018
|
/**
|
|
@@ -3167,6 +3203,35 @@ type VibrateReq = {
|
|
|
3167
3203
|
pattern: number[];
|
|
3168
3204
|
};
|
|
3169
3205
|
|
|
3206
|
+
/**
|
|
3207
|
+
* 在 timeRange 时间内发送了 triggerCount 次大于 acceleration m/s² 的加速数据,并且角度变化超过 angle°,则触发
|
|
3208
|
+
* @property [timeRange] - 时间区间,单位秒,默认3s
|
|
3209
|
+
* @property [triggerCount] - 临界次数,默认8次
|
|
3210
|
+
* @property [acceleration] - 临界加速度,单位m/s²,默认15m/s²
|
|
3211
|
+
* @property [angle] - 临界角度,单位°,默认35°
|
|
3212
|
+
*/
|
|
3213
|
+
type DeviceShakeOptions = {
|
|
3214
|
+
timeRange?: number;
|
|
3215
|
+
triggerCount?: number;
|
|
3216
|
+
acceleration?: number;
|
|
3217
|
+
angle?: number;
|
|
3218
|
+
};
|
|
3219
|
+
|
|
3220
|
+
/**
|
|
3221
|
+
* 设备摇一摇事件触发回调
|
|
3222
|
+
*/
|
|
3223
|
+
type DeviceShakeCallback = () => void;
|
|
3224
|
+
|
|
3225
|
+
/**
|
|
3226
|
+
* 监听设备摇一摇事件参数
|
|
3227
|
+
* @property [options] - 触发参数
|
|
3228
|
+
* @property callback - 设备摇一摇事件触发的回调函数
|
|
3229
|
+
*/
|
|
3230
|
+
type OnDeviceShakeShakeReq = {
|
|
3231
|
+
options?: DeviceShakeOptions;
|
|
3232
|
+
callback: DeviceShakeCallback;
|
|
3233
|
+
};
|
|
3234
|
+
|
|
3170
3235
|
/**
|
|
3171
3236
|
* 逐步废弃
|
|
3172
3237
|
*/
|
|
@@ -5671,6 +5736,29 @@ namespace popup {
|
|
|
5671
5736
|
* @returns 调用结果
|
|
5672
5737
|
*/
|
|
5673
5738
|
function modeAvailable(params: ModeAvailableReq): Promise<ModeAvailableRsp>;
|
|
5739
|
+
/**
|
|
5740
|
+
* 进入弹窗队列
|
|
5741
|
+
* @param params - 参数
|
|
5742
|
+
* @returns 调用结果
|
|
5743
|
+
*/
|
|
5744
|
+
function popupEnQueue(params: PopupEnQueueReq): Promise<QueueInfo>;
|
|
5745
|
+
/**
|
|
5746
|
+
* 退出弹窗队列
|
|
5747
|
+
* @param params - 调用参数
|
|
5748
|
+
* @returns 调用结果
|
|
5749
|
+
*/
|
|
5750
|
+
function popupDeQueue(params: PopupDeQueueReq): Promise<void>;
|
|
5751
|
+
/**
|
|
5752
|
+
* 监听弹窗状态变化
|
|
5753
|
+
* @param params - 调用参数
|
|
5754
|
+
* @returns 调用结果
|
|
5755
|
+
*/
|
|
5756
|
+
function onPopupStatusChange(params: OnPopupStatusChangeReq): Promise<void>;
|
|
5757
|
+
/**
|
|
5758
|
+
* 取消监听弹窗状态变化
|
|
5759
|
+
* @returns 调用结果
|
|
5760
|
+
*/
|
|
5761
|
+
function offPopupStatusChange(): Promise<void>;
|
|
5674
5762
|
}
|
|
5675
5763
|
|
|
5676
5764
|
/**
|
|
@@ -5773,6 +5861,61 @@ type ModeAvailableRsp = {
|
|
|
5773
5861
|
isAvailable: boolean;
|
|
5774
5862
|
};
|
|
5775
5863
|
|
|
5864
|
+
/**
|
|
5865
|
+
* 队列信息
|
|
5866
|
+
* @property noticeKey - 回调标记,用来匹配消息
|
|
5867
|
+
* @property showTime - 实际展示时间,用于业务展示倒计时时间,单位是毫秒
|
|
5868
|
+
* @property reportParams - 上报参数,用于点击上报
|
|
5869
|
+
*/
|
|
5870
|
+
type QueueInfo = {
|
|
5871
|
+
noticeKey: string;
|
|
5872
|
+
showTime: number;
|
|
5873
|
+
reportParams: any;
|
|
5874
|
+
};
|
|
5875
|
+
|
|
5876
|
+
/**
|
|
5877
|
+
* 进入弹窗队列参数
|
|
5878
|
+
* @property liveroomPopupKey - 直播间弹窗key
|
|
5879
|
+
* @property showTime - 可选,业务想要的显示时间,单位是毫秒,默认值跟key的配置
|
|
5880
|
+
* @property additionReportParams - 可选,额外上报参数
|
|
5881
|
+
*/
|
|
5882
|
+
type PopupEnQueueReq = {
|
|
5883
|
+
liveroomPopupKey: string;
|
|
5884
|
+
showTime: number;
|
|
5885
|
+
additionReportParams: any;
|
|
5886
|
+
};
|
|
5887
|
+
|
|
5888
|
+
/**
|
|
5889
|
+
* 退出弹窗队列参数
|
|
5890
|
+
* @property liveroomPopupKey - 直播间弹窗key
|
|
5891
|
+
*/
|
|
5892
|
+
type PopupDeQueueReq = {
|
|
5893
|
+
liveroomPopupKey: string;
|
|
5894
|
+
};
|
|
5895
|
+
|
|
5896
|
+
/**
|
|
5897
|
+
* 弹窗状态变信息
|
|
5898
|
+
* @property noticeKey - 调用hyExt.popup.popupEnQueue时返回的标记,用来匹配是哪次setMode的回调
|
|
5899
|
+
* @property status - 状态, canShow-可以显示, shouldHide-需要隐藏(被顶掉)
|
|
5900
|
+
*/
|
|
5901
|
+
type PopupStatusNotice = {
|
|
5902
|
+
noticeKey: string;
|
|
5903
|
+
status: string;
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5906
|
+
/**
|
|
5907
|
+
* @param notice - 弹窗状态变信息
|
|
5908
|
+
*/
|
|
5909
|
+
type PopupStatusChange = (notice: PopupStatusNotice) => void;
|
|
5910
|
+
|
|
5911
|
+
/**
|
|
5912
|
+
* 监听弹窗状态变化参数
|
|
5913
|
+
* @property callback - 弹窗状态变化回调
|
|
5914
|
+
*/
|
|
5915
|
+
type OnPopupStatusChangeReq = {
|
|
5916
|
+
callback: PopupStatusChange;
|
|
5917
|
+
};
|
|
5918
|
+
|
|
5776
5919
|
/**
|
|
5777
5920
|
* 识别相关
|
|
5778
5921
|
*/
|
|
@@ -7721,6 +7864,47 @@ namespace ui {
|
|
|
7721
7864
|
* @returns 调用结果
|
|
7722
7865
|
*/
|
|
7723
7866
|
function showVideoPopup(params: ShowVideoPopupReq): Promise<void>;
|
|
7867
|
+
/**
|
|
7868
|
+
* 创建原生视频组件
|
|
7869
|
+
* @param params - 调用参数
|
|
7870
|
+
* @returns 调用结果
|
|
7871
|
+
*/
|
|
7872
|
+
function createNativeVideoComponent(params: CreateNativeVideoComponentReq): Promise<NativeVideoComponentRsp>;
|
|
7873
|
+
/**
|
|
7874
|
+
* 更新原生视频组件
|
|
7875
|
+
* @param params - 调用参数
|
|
7876
|
+
* @returns 调用结果
|
|
7877
|
+
*/
|
|
7878
|
+
function updateNativeVideoComponent(params: UpdateNativeVideoComponentReq): Promise<void>;
|
|
7879
|
+
/**
|
|
7880
|
+
* 销毁原生视频组件
|
|
7881
|
+
* @param params - 调用参数
|
|
7882
|
+
* @returns 调用结果
|
|
7883
|
+
*/
|
|
7884
|
+
function destroyNativeVideoComponent(params: DestroyNativeVideoComponentReq): Promise<void>;
|
|
7885
|
+
/**
|
|
7886
|
+
* 显示/隐藏负一屏
|
|
7887
|
+
* @param params - 调用参数
|
|
7888
|
+
* @returns 调用结果
|
|
7889
|
+
*/
|
|
7890
|
+
function setRecommendViewPointVisibility(params: SetRecommendViewPointVisibilityReq): Promise<void>;
|
|
7891
|
+
/**
|
|
7892
|
+
* 监听原生视频组件通知
|
|
7893
|
+
* @param params - 调用参数
|
|
7894
|
+
* @returns 调用结果
|
|
7895
|
+
*/
|
|
7896
|
+
function onNativeVideoComponentNotice(params: OnNativeVideoComponentNoticeReq): Promise<void>;
|
|
7897
|
+
/**
|
|
7898
|
+
* 取消监听原生视频组件通知
|
|
7899
|
+
* @returns 调用结果
|
|
7900
|
+
*/
|
|
7901
|
+
function offNativeVideoComponentNotice(): Promise<void>;
|
|
7902
|
+
/**
|
|
7903
|
+
* 控制原生视频组件
|
|
7904
|
+
* @param params - 调用参数
|
|
7905
|
+
* @returns 调用结果
|
|
7906
|
+
*/
|
|
7907
|
+
function doNativeVideoComponentAction(params: DoNativeVideoComponentActionReq): Promise<void>;
|
|
7724
7908
|
}
|
|
7725
7909
|
|
|
7726
7910
|
/**
|
|
@@ -7862,6 +8046,141 @@ type ShowVideoPopupReq = {
|
|
|
7862
8046
|
liveroomPopupKey: string;
|
|
7863
8047
|
};
|
|
7864
8048
|
|
|
8049
|
+
/**
|
|
8050
|
+
* 原生视频组件信息
|
|
8051
|
+
* @property componentId - 视频组件唯一id
|
|
8052
|
+
*/
|
|
8053
|
+
type NativeVideoComponentRsp = {
|
|
8054
|
+
componentId: string;
|
|
8055
|
+
};
|
|
8056
|
+
|
|
8057
|
+
/**
|
|
8058
|
+
* 更新原生视频组件参数
|
|
8059
|
+
* @property x - x坐标,相对于容器左上角,单位是点/像素
|
|
8060
|
+
* @property y - y坐标,相对于容器左上角,单位是点/像素
|
|
8061
|
+
* @property width - 宽度,单位是点/像素
|
|
8062
|
+
* @property height - 高度,单位是点/像素
|
|
8063
|
+
*/
|
|
8064
|
+
type ComponentLayout = {
|
|
8065
|
+
x: number;
|
|
8066
|
+
y: number;
|
|
8067
|
+
width: number;
|
|
8068
|
+
height: number;
|
|
8069
|
+
};
|
|
8070
|
+
|
|
8071
|
+
/**
|
|
8072
|
+
* 实时点播模式
|
|
8073
|
+
* @property url - 视频url
|
|
8074
|
+
* @property cdnName - CDN域名
|
|
8075
|
+
* @property isEnd - 是否是最后一个8视频,播放器播完状态会返回播放结束
|
|
8076
|
+
*/
|
|
8077
|
+
type LiveVodModeInfo = {
|
|
8078
|
+
url: string;
|
|
8079
|
+
cdnName: string;
|
|
8080
|
+
isEnd: boolean;
|
|
8081
|
+
};
|
|
8082
|
+
|
|
8083
|
+
/**
|
|
8084
|
+
* 配置信息
|
|
8085
|
+
* @property url - 视频url
|
|
8086
|
+
* @property channel - 点播视频品类ID
|
|
8087
|
+
* @property isFreeData - 是否免流
|
|
8088
|
+
* @property extraParam - 额外参数,key和value都是string
|
|
8089
|
+
*/
|
|
8090
|
+
type NativeVideoComponentConfig = {
|
|
8091
|
+
url: string;
|
|
8092
|
+
channel: string;
|
|
8093
|
+
isFreeData: boolean;
|
|
8094
|
+
extraParam: any;
|
|
8095
|
+
};
|
|
8096
|
+
|
|
8097
|
+
/**
|
|
8098
|
+
* 创建原生视频组件参数
|
|
8099
|
+
* @property [url] - 视频url
|
|
8100
|
+
* @property [autoPlay] - 可选,是否自动播放,默认是否
|
|
8101
|
+
* @property [mutePlay] - 可选,是否静音播放,默认是否
|
|
8102
|
+
* @property [liveVodMode] - 实时点播模式
|
|
8103
|
+
* @property [layout] - 视频组件布局
|
|
8104
|
+
* @property [config] - 配置信息
|
|
8105
|
+
*/
|
|
8106
|
+
type CreateNativeVideoComponentReq = {
|
|
8107
|
+
url?: string;
|
|
8108
|
+
autoPlay?: boolean;
|
|
8109
|
+
mutePlay?: boolean;
|
|
8110
|
+
liveVodMode?: LiveVodModeInfo;
|
|
8111
|
+
layout?: ComponentLayout;
|
|
8112
|
+
config?: NativeVideoComponentConfig;
|
|
8113
|
+
};
|
|
8114
|
+
|
|
8115
|
+
/**
|
|
8116
|
+
* 更新原生视频组件参数
|
|
8117
|
+
* @property componentId - 视频组件唯一id
|
|
8118
|
+
* @property [url] - 视频url
|
|
8119
|
+
* @property [autoPlay] - 可选,是否自动播放,默认是否
|
|
8120
|
+
* @property [mutePlay] - 可选,是否静音播放,默认是否
|
|
8121
|
+
* @property [liveVodMode] - 实时点播模式
|
|
8122
|
+
* @property [layout] - 视频组件布局
|
|
8123
|
+
*/
|
|
8124
|
+
type UpdateNativeVideoComponentReq = {
|
|
8125
|
+
componentId: string;
|
|
8126
|
+
url?: string;
|
|
8127
|
+
autoPlay?: boolean;
|
|
8128
|
+
mutePlay?: boolean;
|
|
8129
|
+
liveVodMode?: LiveVodModeInfo;
|
|
8130
|
+
layout?: ComponentLayout;
|
|
8131
|
+
};
|
|
8132
|
+
|
|
8133
|
+
/**
|
|
8134
|
+
* 销毁原生视频组件参数
|
|
8135
|
+
* @property componentId - 视频组件唯一id
|
|
8136
|
+
*/
|
|
8137
|
+
type DestroyNativeVideoComponentReq = {
|
|
8138
|
+
componentId: string;
|
|
8139
|
+
};
|
|
8140
|
+
|
|
8141
|
+
/**
|
|
8142
|
+
* 显示/隐藏负一屏参数
|
|
8143
|
+
* @property visible - 显示/隐藏
|
|
8144
|
+
*/
|
|
8145
|
+
type SetRecommendViewPointVisibilityReq = {
|
|
8146
|
+
visible: boolean;
|
|
8147
|
+
};
|
|
8148
|
+
|
|
8149
|
+
/**
|
|
8150
|
+
* 原生视频组件通知信息
|
|
8151
|
+
* @property componentId - 原生视频组件id
|
|
8152
|
+
* @property eventName - 事件名
|
|
8153
|
+
* @property message - 事件消息
|
|
8154
|
+
*/
|
|
8155
|
+
type NativeVideoComponentNotice = {
|
|
8156
|
+
componentId: string;
|
|
8157
|
+
eventName: string;
|
|
8158
|
+
message: string;
|
|
8159
|
+
};
|
|
8160
|
+
|
|
8161
|
+
/**
|
|
8162
|
+
* @param notice - 原生视频组件通知信息
|
|
8163
|
+
*/
|
|
8164
|
+
type NativeVideoComponentNoticeCallback = (notice: NativeVideoComponentNotice) => void;
|
|
8165
|
+
|
|
8166
|
+
/**
|
|
8167
|
+
* 监听原生视频组件通知参数
|
|
8168
|
+
* @property callback - 原生视频组件通知回调
|
|
8169
|
+
*/
|
|
8170
|
+
type OnNativeVideoComponentNoticeReq = {
|
|
8171
|
+
callback: NativeVideoComponentNoticeCallback;
|
|
8172
|
+
};
|
|
8173
|
+
|
|
8174
|
+
/**
|
|
8175
|
+
* 控制原生视频组件参数
|
|
8176
|
+
* @property action - 操作, play-开始, pause-暂停, resume-继续
|
|
8177
|
+
* @property componentId - 视频组件唯一 id
|
|
8178
|
+
*/
|
|
8179
|
+
type DoNativeVideoComponentActionReq = {
|
|
8180
|
+
action: string;
|
|
8181
|
+
componentId: string;
|
|
8182
|
+
};
|
|
8183
|
+
|
|
7865
8184
|
/**
|
|
7866
8185
|
* HY vidoe
|
|
7867
8186
|
*/
|