aliyun-rtc-sdk 6.12.1-beta.0 → 6.12.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.
@@ -227,8 +227,6 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
227
227
  protected slsReporter: SLSReporter;
228
228
  protected connectState: AliRtcConnectionStatus;
229
229
  protected networkError: boolean;
230
- private audioMixerPlugin;
231
- private dualVideoPlugin;
232
230
  private _audioOnlyMode;
233
231
  private _authInfoWillExpireTimer;
234
232
  private _authInfoExpiredTimer;
@@ -263,6 +261,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
263
261
  * 监听 Publisher 事件
264
262
  */
265
263
  private addPublisherListeners;
264
+ private occurError;
266
265
  /**
267
266
  * 监听 UM 事件
268
267
  */
@@ -295,6 +294,12 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
295
294
  */
296
295
  protected onNetworkRecovery(users?: JoinInfo[]): Promise<void>;
297
296
  private resumeSubList;
297
+ /**
298
+ * 重新订阅远端用户
299
+ * @param {string} userId
300
+ * @returns {Promise<void>}
301
+ */
302
+ retrySubscribe(userId: string): Promise<void>;
298
303
  /**
299
304
  * 处理网络异常
300
305
  * @param {AliRtcError} err
@@ -328,6 +333,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
328
333
  * @note 该接口只可以在加入频道之前调用,会议中不可以重新设置,离开频道后可以重新设置
329
334
  */
330
335
  setChannelProfile(channelProfile: AliRtcSdkChannelProfile): void;
336
+ private startAndPublishDefaultDevices;
331
337
  /**
332
338
  * 设置用户角色
333
339
  * @param {AliRtcSdkClientRole} clientRole 用户角色类型,默认值为 {@link AliRtcSdkClientRole.AliRtcSdkLive}(观众角色)
@@ -1224,11 +1230,19 @@ declare interface AliRtcEngineEventListener {
1224
1230
  rtcRemoteAudioStats: (stats: AliRtcRemoteAudioStats[]) => void;
1225
1231
  /**
1226
1232
  * @brief 错误通知
1233
+ * @deprecated 请使用 occurError
1227
1234
  * @details 如果engine出现error,通过这个回调通知app
1228
- * @param error 错误类型,参考 {@link org::webrtc::alirtcInterface::ErrorCodeEnum}
1235
+ * @param error 错误类型,参考 {@link AliRtcError}
1229
1236
  * @param message 错误消息
1230
1237
  */
1231
1238
  onOccurError: (error: AliRtcError) => void;
1239
+ /**
1240
+ * @brief 错误通知
1241
+ * @details 如果engine出现error,通过这个回调通知app
1242
+ * @param error 错误类型,参考 {@link AliRtcError}
1243
+ * @param message 错误消息
1244
+ */
1245
+ occurError: (error: AliRtcError) => void;
1232
1246
  /**
1233
1247
  * @brief 收到数据通道消息
1234
1248
  * @param uid 用户ID
@@ -1360,14 +1374,18 @@ export declare enum AliRtcErrorCode {
1360
1374
  /** 无可用的音频采集设备,检查是否接入了可用的麦克风,并检查系统设置中,该设备是否被禁用 */
1361
1375
  ERR_MIC_NOT_AVAILABLE = 17040393,
1362
1376
  /** 无可用的音频播放设备,检查是否接入了可用的扬声器或耳机,并检查系统设置中,该设备是否被禁用 */
1363
- ERR_SPEAKER_NO_AVAILABLE = 17040400,
1377
+ ERR_SPEAKER_NOT_AVAILABLE = 17040400,
1364
1378
  /****************************************************
1365
1379
  * 视频设备错误码
1366
1380
  ****************************************************/
1367
1381
  /** 采集设备初始化失败,检查系统相机是否可用,移动端App是否占用了相机 */
1368
1382
  ERR_CAMERA_OPEN_FAIL = 17039620,
1383
+ /** 采集设备未授权,建议去系统设置中,打开摄像头授权,并且重新加入频道 */
1384
+ ERR_CAMERA_AUTH_FAIL = 17039621,
1369
1385
  /** 采集过程中出现异常,Mac、Winodows电脑相机采集灯熄灭,设备被强制中断。建议重新加入频道或者重启App */
1370
1386
  ERR_CAMERA_INTERRUPT = 17039622,
1387
+ /** 无可用的视频采集设备,检查是否接入了可用的摄像头,并检查系统设置中,该设备是否被禁用 */
1388
+ ERR_CAMERA_NOT_AVAILABLE = 17039623,
1371
1389
  /** 渲染设备初始化失败,检查Windows端显卡驱动是否需要升级,移动端手机型号或者Android平板盒子等外设是否支持OpenGL */
1372
1390
  ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873,
1373
1391
  /** 渲染过程中出现异常,系统异常错误导致渲染引擎报错,重新加入频道或者重启App */
@@ -2129,6 +2147,11 @@ declare interface AudioLevelMonitorListener {
2129
2147
  audioLevel: (level: number) => void;
2130
2148
  }
2131
2149
 
2150
+ declare interface AudioMixerPluginOptions {
2151
+ audio?: number;
2152
+ screen?: number;
2153
+ }
2154
+
2132
2155
  /**
2133
2156
  * ------------------ 模式 ----- 采样率 ----- 声道 ----- 码率(kbps) -----
2134
2157
  *
@@ -2161,6 +2184,8 @@ declare class BizControl extends default_2<BizControlListener> {
2161
2184
  protected authInfo?: AliRtcAuthInfo;
2162
2185
  protected signalingManager: SignalingManager;
2163
2186
  pluginManager: PluginManager;
2187
+ private audioMixerPlugin?;
2188
+ private dualVideoPlugin?;
2164
2189
  protected slsReporter: SLSReporter;
2165
2190
  private statsMonitorId?;
2166
2191
  private autoSubAudio;
@@ -2288,6 +2313,8 @@ declare class BizControl extends default_2<BizControlListener> {
2288
2313
  updateScreenWant(uid: string, sub: boolean): void;
2289
2314
  private stopIndication;
2290
2315
  private startIndication;
2316
+ setEnableDualVideoStream(enabled: boolean, options?: AliRtcDualVideoPluginOptions): void;
2317
+ setAudioVolume(options: AudioMixerPluginOptions): void;
2291
2318
  enableAudioVolumeIndication(interval: number): void;
2292
2319
  setPlayoutVolume(volume: number): void;
2293
2320
  refreshAuthInfo(authInfo: AliRtcRefreshAuthInfo): void;
@@ -2630,7 +2657,8 @@ declare class LocalUser extends User {
2630
2657
  clear(): Promise<void>;
2631
2658
  resetElement(element: HTMLVideoElement): void;
2632
2659
  setPreviewElement(previewParams: PreviewConfig): void;
2633
- startDefaultDevicesCapture(audioOnly: boolean): Promise<void>;
2660
+ startDefaultCamera(audioOnly: boolean): Promise<void>;
2661
+ startDefaultAudio(): Promise<void>;
2634
2662
  /**
2635
2663
  * 为本地预览设置渲染元素和视频流
2636
2664
  * @param {AliRtcLocalView} view 渲染元素,null 则为停止显示
@@ -2865,8 +2893,9 @@ declare interface OSSToken {
2865
2893
 
2866
2894
  declare class PluginManager extends default_2<PluginManagerListener> {
2867
2895
  private plugins;
2868
- add(plugin: AliRtcPlugin, options: any): void;
2896
+ add(plugin: AliRtcPlugin, options?: any): void;
2869
2897
  remove(name: string): void;
2898
+ removeAll(): void;
2870
2899
  get(name: string): AliRtcPlugin | undefined;
2871
2900
  has(name: string): boolean;
2872
2901
  getAll(): AliRtcPlugin[];
@@ -2919,7 +2948,8 @@ declare type PublishOptions = StreamOptions & {
2919
2948
 
2920
2949
  declare enum PublishReason {
2921
2950
  MANUAL = 0,
2922
- JOINCHANNEL = 1
2951
+ JOIN_CHANNEL = 1,
2952
+ ROLE_CHANGE = 2
2923
2953
  }
2924
2954
 
2925
2955
  declare interface PublishStreamInfo {
@@ -3788,7 +3818,8 @@ declare enum SubscribeReason {
3788
3818
  Join = "join",
3789
3819
  Publish = "publish",
3790
3820
  User = "user",
3791
- Resume = "resume"
3821
+ Resume = "resume",
3822
+ Retry = "retry"
3792
3823
  }
3793
3824
 
3794
3825
  declare interface TimeRecorder {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliyun-rtc-sdk",
3
- "version": "6.12.1-beta.0",
3
+ "version": "6.12.1-beta.2",
4
4
  "type": "module",
5
5
  "description": "rtc web sdk of aliyun",
6
6
  "main": "dist/aliyun-rtc-sdk.js",