@hyext/types-ext-sdk-hy 3.14.1-beta.20 → 3.14.1-beta.22

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 +74 -30
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -844,6 +844,12 @@ namespace advance {
844
844
  * @returns 调用结果
845
845
  */
846
846
  function getFreeFlowFlag(): Promise<FreeFlowFlagRsp>;
847
+ /**
848
+ * 直接发送弹幕
849
+ * @param params - 参数
850
+ * @returns 调用结果
851
+ */
852
+ function sendBarrage(params: SendBarrageReq): Promise<void>;
847
853
  }
848
854
 
849
855
  /**
@@ -1448,6 +1454,14 @@ type FreeFlowFlagRsp = {
1448
1454
  flag: number;
1449
1455
  };
1450
1456
 
1457
+ /**
1458
+ * 发送弹幕信息
1459
+ * @property content - 弹幕内容
1460
+ */
1461
+ type SendBarrageReq = {
1462
+ content: string;
1463
+ };
1464
+
1451
1465
  /**
1452
1466
  * app模块
1453
1467
  */
@@ -3191,16 +3205,16 @@ type VibrateReq = {
3191
3205
 
3192
3206
  /**
3193
3207
  * 在 timeRange 时间内发送了 triggerCount 次大于 acceleration m/s² 的加速数据,并且角度变化超过 angle°,则触发
3194
- * @property timeRange - 时间区间,单位秒
3195
- * @property triggerCount - 临界次数
3196
- * @property acceleration - 临界加速度,单位 m/s²
3197
- * @property angle - 临界角度,单位「°」
3208
+ * @property [timeRange] - 时间区间,单位秒,默认3s
3209
+ * @property [triggerCount] - 临界次数,默认8次
3210
+ * @property [acceleration] - 临界加速度,单位m/s²,默认15m/s²
3211
+ * @property [angle] - 临界角度,单位°,默认35°
3198
3212
  */
3199
3213
  type DeviceShakeOptions = {
3200
- timeRange: number;
3201
- triggerCount: number;
3202
- acceleration: number;
3203
- angle: number;
3214
+ timeRange?: number;
3215
+ triggerCount?: number;
3216
+ acceleration?: number;
3217
+ angle?: number;
3204
3218
  };
3205
3219
 
3206
3220
  /**
@@ -3210,11 +3224,11 @@ type DeviceShakeCallback = () => void;
3210
3224
 
3211
3225
  /**
3212
3226
  * 监听设备摇一摇事件参数
3213
- * @property options - 触发参数
3227
+ * @property [options] - 触发参数
3214
3228
  * @property callback - 设备摇一摇事件触发的回调函数
3215
3229
  */
3216
3230
  type OnDeviceShakeShakeReq = {
3217
- options: DeviceShakeOptions;
3231
+ options?: DeviceShakeOptions;
3218
3232
  callback: DeviceShakeCallback;
3219
3233
  };
3220
3234
 
@@ -7885,6 +7899,12 @@ namespace ui {
7885
7899
  * @returns 调用结果
7886
7900
  */
7887
7901
  function offNativeVideoComponentNotice(): Promise<void>;
7902
+ /**
7903
+ * 控制原生视频组件
7904
+ * @param params - 调用参数
7905
+ * @returns 调用结果
7906
+ */
7907
+ function doNativeVideoComponentAction(params: DoNativeVideoComponentActionReq): Promise<void>;
7888
7908
  }
7889
7909
 
7890
7910
  /**
@@ -8061,37 +8081,53 @@ type LiveVodModeInfo = {
8061
8081
  };
8062
8082
 
8063
8083
  /**
8064
- * 创建原生视频组件参数
8084
+ * 配置信息
8065
8085
  * @property url - 视频url
8066
- * @property autoPlay - 可选,是否自动播放,默认是否
8067
- * @property mutePlay - 可选,是否静音播放,默认是否
8068
- * @property liveVodMode - 实时点播模式
8069
- * @property layout - 视频组件布局
8086
+ * @property channel - 点播视频品类ID
8087
+ * @property isFreeData - 是否免流
8088
+ * @property extraParam - 额外参数,key和value都是string
8070
8089
  */
8071
- type CreateNativeVideoComponentReq = {
8090
+ type NativeVideoComponentConfig = {
8072
8091
  url: string;
8073
- autoPlay: boolean;
8074
- mutePlay: boolean;
8075
- liveVodMode: LiveVodModeInfo;
8076
- layout: ComponentLayout;
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;
8077
8113
  };
8078
8114
 
8079
8115
  /**
8080
8116
  * 更新原生视频组件参数
8081
8117
  * @property componentId - 视频组件唯一id
8082
- * @property url - 视频url
8083
- * @property autoPlay - 可选,是否自动播放,默认是否
8084
- * @property mutePlay - 可选,是否静音播放,默认是否
8085
- * @property liveVodMode - 实时点播模式
8086
- * @property layout - 视频组件布局
8118
+ * @property [url] - 视频url
8119
+ * @property [autoPlay] - 可选,是否自动播放,默认是否
8120
+ * @property [mutePlay] - 可选,是否静音播放,默认是否
8121
+ * @property [liveVodMode] - 实时点播模式
8122
+ * @property [layout] - 视频组件布局
8087
8123
  */
8088
8124
  type UpdateNativeVideoComponentReq = {
8089
8125
  componentId: string;
8090
- url: string;
8091
- autoPlay: boolean;
8092
- mutePlay: boolean;
8093
- liveVodMode: LiveVodModeInfo;
8094
- layout: ComponentLayout;
8126
+ url?: string;
8127
+ autoPlay?: boolean;
8128
+ mutePlay?: boolean;
8129
+ liveVodMode?: LiveVodModeInfo;
8130
+ layout?: ComponentLayout;
8095
8131
  };
8096
8132
 
8097
8133
  /**
@@ -8135,6 +8171,14 @@ type OnNativeVideoComponentNoticeReq = {
8135
8171
  callback: NativeVideoComponentNoticeCallback;
8136
8172
  };
8137
8173
 
8174
+ /**
8175
+ * 控制原生视频组件参数
8176
+ * @property action - 操作, play-开始, pause-暂停, resume-继续
8177
+ */
8178
+ type DoNativeVideoComponentActionReq = {
8179
+ action: string;
8180
+ };
8181
+
8138
8182
  /**
8139
8183
  * HY vidoe
8140
8184
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "3.14.1-beta.20",
3
+ "version": "3.14.1-beta.22",
4
4
  "description": "TypeScript definitions for @hyext/ext-sdk-hy",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",