@hyext/types-ext-sdk-hy 3.16.1 → 3.16.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.
Files changed (2) hide show
  1. package/index.d.ts +196 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -474,7 +474,7 @@ type DestroyAdReq = {
474
474
 
475
475
  /**
476
476
  * 关闭信息
477
- * @property isEnded - 是否看完
477
+ * @property isEnded - 是否看完, 1-看完, 0-未看完
478
478
  */
479
479
  type CloseInfo = {
480
480
  isEnded: boolean;
@@ -1724,6 +1724,129 @@ function onAppear(callback: LifeCallback): void;
1724
1724
  */
1725
1725
  function onDisappear(callback: LifeCallback): void;
1726
1726
 
1727
+ /**
1728
+ * audio模块
1729
+ */
1730
+ namespace audio {
1731
+ /**
1732
+ * 创建音频播放器
1733
+ * @param params - 传入参数
1734
+ * @returns 调用结果
1735
+ */
1736
+ function createAudio(params: CreateAudioReq): Promise<CreateAudioRsp>;
1737
+ /**
1738
+ * 监听音频播放器事件
1739
+ * @param params - 传入参数
1740
+ * @returns 调用结果
1741
+ */
1742
+ function onAudioNotices(params: OnAudioNoticesReq): Promise<void>;
1743
+ /**
1744
+ * 取消监听音频播放器事件
1745
+ * @param [params] - 传入参数
1746
+ * @returns 调用结果
1747
+ */
1748
+ function offAudioNotices(params?: OffAudioNoticesReq): Promise<void>;
1749
+ /**
1750
+ * 播放音频
1751
+ * @param params - 传入参数
1752
+ * @returns 调用结果
1753
+ */
1754
+ function playAudio(params: PlayAudioReq): Promise<void>;
1755
+ /**
1756
+ * 停止音频播放
1757
+ * @param params - 传入参数
1758
+ * @returns 调用结果
1759
+ */
1760
+ function stopAudio(params: StopAudioReq): Promise<void>;
1761
+ /**
1762
+ * 音频是否在播放中
1763
+ * @param params - 传入参数
1764
+ * @returns 调用结果
1765
+ */
1766
+ function isAudioPlaying(params: IsAudioPlayingReq): Promise<IsAudioPlayingRsp>;
1767
+ }
1768
+
1769
+ /**
1770
+ * 创建音频播放器参数
1771
+ * @property url - 音频地址
1772
+ */
1773
+ type CreateAudioReq = {
1774
+ url: string;
1775
+ };
1776
+
1777
+ /**
1778
+ * 创建音频播放器结果
1779
+ * @property audioId - 播放器实例播放器ID
1780
+ */
1781
+ type CreateAudioRsp = {
1782
+ audioId: string;
1783
+ };
1784
+
1785
+ /**
1786
+ * 音频播放器事件回调信息
1787
+ * @property audioId - 播放器实例ID
1788
+ * @property eventName - 事件名, ended-播放完毕, error-播放出错
1789
+ * @property data - 回调信息
1790
+ */
1791
+ type AudioEventInfo = {
1792
+ audioId: string;
1793
+ eventName: string;
1794
+ data: any;
1795
+ };
1796
+
1797
+ /**
1798
+ * @param info - 回调信息
1799
+ */
1800
+ type AudioEventCallback = (info: AudioEventInfo) => void;
1801
+
1802
+ /**
1803
+ * 监听音频播放器事件参数
1804
+ * @property callback - 音频播放器事件回调
1805
+ */
1806
+ type OnAudioNoticesReq = {
1807
+ callback: AudioEventCallback;
1808
+ };
1809
+
1810
+ /**
1811
+ * 取消监听音频播放器事件参数
1812
+ * @property [callback] - 音频播放器事件回调
1813
+ */
1814
+ type OffAudioNoticesReq = {
1815
+ callback?: AudioEventCallback;
1816
+ };
1817
+
1818
+ /**
1819
+ * 播放音频参数
1820
+ * @property audioId - 播放器实例ID
1821
+ */
1822
+ type PlayAudioReq = {
1823
+ audioId: string;
1824
+ };
1825
+
1826
+ /**
1827
+ * 停止播放参数
1828
+ * @property audioId - 播放器实例ID
1829
+ */
1830
+ type StopAudioReq = {
1831
+ audioId: string;
1832
+ };
1833
+
1834
+ /**
1835
+ * 音频是否在播放中参数
1836
+ * @property audioId - 播放器实例ID
1837
+ */
1838
+ type IsAudioPlayingReq = {
1839
+ audioId: string;
1840
+ };
1841
+
1842
+ /**
1843
+ * 音频是否在播放中结果
1844
+ * @property isPlaying - 是否在播放中
1845
+ */
1846
+ type IsAudioPlayingRsp = {
1847
+ isPlaying: boolean;
1848
+ };
1849
+
1727
1850
  /**
1728
1851
  * auth模块
1729
1852
  */
@@ -2602,6 +2725,7 @@ type ContextInfo = {
2602
2725
  * @property liveCompany - 交友陪玩直播间, 1-为交友陪玩直播间, 0-为非交友陪玩直播间
2603
2726
  * @property liveMode - 开播模式, kGame-【PC主播端】端游直播, kEntertainment-【PC主播端】娱乐直播, kMobile-【PC主播端】手游直播, kMakeFriends-【PC主播端】交友直播, kThirdParty-【PC主播端】第三方推流, kScreenCAP-【助手APP】录屏直播, kCamera-【助手APP】摄像头直播, kVoice-【助手APP】语音直播,
2604
2727
  * @property liveSubMode - 开播子模式, process-【PC主播端】端游直播-捕捉游戏画面, desktop-【PC主播端】端游直播-全屏捕捉, area-【PC主播端】端游直播-截取屏幕, window-【PC主播端】端游直播-窗口捕捉, adr-【PC主播端】手游直播-安卓手机, ios-【PC主播端】手游直播-苹果手机, audio-【PC主播端】交友直播-语音开播, video-【PC主播端】交友直播-视频开播, multiPlayersVideo-【PC主播端】派对模式,
2728
+ * @property liveId - 直播ID
2605
2729
  */
2606
2730
  type RespLiveInfo = {
2607
2731
  gameName: string;
@@ -2617,6 +2741,7 @@ type RespLiveInfo = {
2617
2741
  liveCompany: number;
2618
2742
  liveMode: string;
2619
2743
  liveSubMode: string;
2744
+ liveId: string;
2620
2745
  };
2621
2746
 
2622
2747
  /**
@@ -3938,6 +4063,12 @@ namespace feedback {
3938
4063
  * @returns 返回结果
3939
4064
  */
3940
4065
  function openFeedbackForm(params: FeedbackParams): Promise<void>;
4066
+ /**
4067
+ * 反馈
4068
+ * @param params - 请求参数
4069
+ * @returns 返回结果
4070
+ */
4071
+ function sendFeedback(params: SendFeedbackReq): Promise<SendFeedbackRsp>;
3941
4072
  }
3942
4073
 
3943
4074
  /**
@@ -3965,6 +4096,24 @@ type FeedbackParams = {
3965
4096
  param: string;
3966
4097
  };
3967
4098
 
4099
+ /**
4100
+ * 反馈请求参数
4101
+ * @property fbType - 反馈类型
4102
+ * @property fbContent - 反馈详情
4103
+ */
4104
+ type SendFeedbackReq = {
4105
+ fbType: string;
4106
+ fbContent: string;
4107
+ };
4108
+
4109
+ /**
4110
+ * 反馈结果
4111
+ * @property feedbackId - 反馈日志id
4112
+ */
4113
+ type SendFeedbackRsp = {
4114
+ feedbackId: string;
4115
+ };
4116
+
3968
4117
  /**
3969
4118
  * 文件系统
3970
4119
  */
@@ -4179,6 +4328,23 @@ type CleanResParams = {
4179
4328
  reserveMD5List: string[];
4180
4329
  };
4181
4330
 
4331
+ /**
4332
+ * 保存进度信息
4333
+ * @property url - 文件url
4334
+ * @property bytesTotal - 文件总大小,单位是字
4335
+ * @property bytesLoaded - 已加载的大小,单位是字节
4336
+ */
4337
+ type FileProgressInfo = {
4338
+ url: string;
4339
+ bytesTotal: number;
4340
+ bytesLoaded: number;
4341
+ };
4342
+
4343
+ /**
4344
+ * @param info - 保存进度信息
4345
+ */
4346
+ type SaveFileProgressCallback = (info: FileProgressInfo) => void;
4347
+
4182
4348
  /**
4183
4349
  * 本地文件信息
4184
4350
  * @property status - 状态码,0是成功,非0失败
@@ -4220,12 +4386,14 @@ type SaveFileInfo = {
4220
4386
  * @property fileList - 要保留的资源md5列表,至少传入一个
4221
4387
  * @property [authKeys] - 需要授权的场景值
4222
4388
  * @property callback - 单个文件保存结果回调
4389
+ * @property [progressCallback] - 单个文件保存进度回调
4223
4390
  */
4224
4391
  type SaveFilesReq = {
4225
4392
  type: string;
4226
4393
  fileList: SaveFileInfo[];
4227
4394
  authKeys?: string[];
4228
4395
  callback: SaveFileCallback;
4396
+ progressCallback?: SaveFileProgressCallback;
4229
4397
  };
4230
4398
 
4231
4399
  /**
@@ -8822,6 +8990,11 @@ namespace yyb {
8822
8990
  * @returns 调用结果
8823
8991
  */
8824
8992
  function offCloudGameMsgFromYYB(): Promise<void>;
8993
+ /**
8994
+ * 获取云游分配的服务器节点信息
8995
+ * @returns 节点数据
8996
+ */
8997
+ function getYYBCloudGameServerSource(): Promise<CloudGameServerSourceInfo>;
8825
8998
  }
8826
8999
 
8827
9000
  /**
@@ -8843,8 +9016,13 @@ type LaunchYYBCloudGameReq = {
8843
9016
  * @property cloudGameSource - 游戏来源
8844
9017
  * @property cloudGamePackageName - 游戏包名
8845
9018
  * @property entranceId - 游戏ID
8846
- * @property needShowFloatingWindow - 是否需要显示悬浮球
9019
+ * @property needShowFloatingWindow - 是否需要显示悬浮球, 1-显示, 0-不显示
8847
9020
  * @property gameIconUrl - 游戏图标链接
9021
+ * @property [needUseCustomLoadingUI] - 是否使用自定义加载页面, 1-是, 0-否
9022
+ * @property [loadBgUrl] - 加载过程的背景url
9023
+ * @property [loadMsg] - 加载过程的文案
9024
+ * @property [needObserPerformance] - 是否需要监听性能数据, 1-是, 0-否
9025
+ * @property [performanceFrequency] - 性能数据回调频控,单位秒
8848
9026
  */
8849
9027
  type StartYYBCloudGameReq = {
8850
9028
  bizIdDev: string;
@@ -8852,8 +9030,13 @@ type StartYYBCloudGameReq = {
8852
9030
  cloudGameSource: string;
8853
9031
  cloudGamePackageName: string;
8854
9032
  entranceId: string;
8855
- needShowFloatingWindow: boolean;
9033
+ needShowFloatingWindow: number;
8856
9034
  gameIconUrl: string;
9035
+ needUseCustomLoadingUI?: number;
9036
+ loadBgUrl?: string;
9037
+ loadMsg?: string;
9038
+ needObserPerformance?: number;
9039
+ performanceFrequency?: number;
8857
9040
  };
8858
9041
 
8859
9042
  /**
@@ -8879,5 +9062,15 @@ type OnYYBCloudGameMsgReq = {
8879
9062
  callback: YYBCloudGameMsgCallback;
8880
9063
  };
8881
9064
 
9065
+ /**
9066
+ * 节点数据
9067
+ * @property deviceArea - 节点信息,如guangzhou、shenzhen等
9068
+ * @property deviceId - 节点id
9069
+ */
9070
+ type CloudGameServerSourceInfo = {
9071
+ deviceArea: string;
9072
+ deviceId: string;
9073
+ };
9074
+
8882
9075
 
8883
9076
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "3.16.1",
3
+ "version": "3.16.2",
4
4
  "description": "TypeScript definitions for sdk",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",