@hyext/types-ext-sdk-hy 3.14.1-beta.15 → 3.14.1-beta.18

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.
Files changed (2) hide show
  1. package/index.d.ts +32 -6
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3176,6 +3176,20 @@ type VibrateReq = {
3176
3176
  pattern: number[];
3177
3177
  };
3178
3178
 
3179
+ /**
3180
+ * 在 timeRange 时间内发送了 triggerCount 次大于 acceleration m/s² 的加速数据,并且角度变化超过 angle°,则触发
3181
+ * @property timeRange - 时间区间,单位秒
3182
+ * @property triggerCount - 临界次数
3183
+ * @property acceleration - 临界加速度,单位 m/s²
3184
+ * @property angle - 临界角度,单位「°」
3185
+ */
3186
+ type DeviceShakeOptions = {
3187
+ timeRange: number;
3188
+ triggerCount: number;
3189
+ acceleration: number;
3190
+ angle: number;
3191
+ };
3192
+
3179
3193
  /**
3180
3194
  * 设备摇一摇事件触发回调
3181
3195
  */
@@ -3183,11 +3197,11 @@ type DeviceShakeCallback = () => void;
3183
3197
 
3184
3198
  /**
3185
3199
  * 监听设备摇一摇事件参数
3186
- * @property speedThreshold - 摇一摇的速度阈值,可选,默认值待定,单位:m/s²
3200
+ * @property options - 触发参数
3187
3201
  * @property callback - 设备摇一摇事件触发的回调函数
3188
3202
  */
3189
3203
  type OnDeviceShakeShakeReq = {
3190
- speedThreshold: number;
3204
+ options: DeviceShakeOptions;
3191
3205
  callback: DeviceShakeCallback;
3192
3206
  };
3193
3207
 
@@ -8021,19 +8035,31 @@ type ComponentLayout = {
8021
8035
  height: number;
8022
8036
  };
8023
8037
 
8038
+ /**
8039
+ * 实时点播模式
8040
+ * @property url - 视频url
8041
+ * @property cdnName - CDN域名
8042
+ * @property isEnd - 是否是最后一个8视频,播放器播完状态会返回播放结束
8043
+ */
8044
+ type LiveVodModeInfo = {
8045
+ url: string;
8046
+ cdnName: string;
8047
+ isEnd: boolean;
8048
+ };
8049
+
8024
8050
  /**
8025
8051
  * 创建原生视频组件参数
8026
8052
  * @property url - 视频url
8027
8053
  * @property autoPlay - 可选,是否自动播放,默认是否
8028
8054
  * @property mutePlay - 可选,是否静音播放,默认是否
8029
- * @property liveVodMode - 是否开启实时点播模式
8055
+ * @property liveVodMode - 实时点播模式
8030
8056
  * @property layout - 视频组件布局
8031
8057
  */
8032
8058
  type CreateNativeVideoComponentReq = {
8033
8059
  url: string;
8034
8060
  autoPlay: boolean;
8035
8061
  mutePlay: boolean;
8036
- liveVodMode: boolean;
8062
+ liveVodMode: LiveVodModeInfo;
8037
8063
  layout: ComponentLayout;
8038
8064
  };
8039
8065
 
@@ -8043,7 +8069,7 @@ type CreateNativeVideoComponentReq = {
8043
8069
  * @property url - 视频url
8044
8070
  * @property autoPlay - 可选,是否自动播放,默认是否
8045
8071
  * @property mutePlay - 可选,是否静音播放,默认是否
8046
- * @property liveVodMode - 是否开启实时点播模式
8072
+ * @property liveVodMode - 实时点播模式
8047
8073
  * @property layout - 视频组件布局
8048
8074
  */
8049
8075
  type UpdateNativeVideoComponentReq = {
@@ -8051,7 +8077,7 @@ type UpdateNativeVideoComponentReq = {
8051
8077
  url: string;
8052
8078
  autoPlay: boolean;
8053
8079
  mutePlay: boolean;
8054
- liveVodMode: boolean;
8080
+ liveVodMode: LiveVodModeInfo;
8055
8081
  layout: ComponentLayout;
8056
8082
  };
8057
8083
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "3.14.1-beta.15",
3
+ "version": "3.14.1-beta.18",
4
4
  "description": "TypeScript definitions for @hyext/ext-sdk-hy",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",