aliyun-rtc-sdk 6.12.1-beta.1 → 6.12.1-beta.3

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.
@@ -135,7 +135,7 @@ export declare enum AliRtcDataMsgType {
135
135
 
136
136
  declare type AliRtcDualVideoPluginOptions = VideoScalerOptions;
137
137
 
138
- export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
138
+ declare class AliRtcEngine_2 extends default_2<AliRtcEngineEventListener> {
139
139
  /**
140
140
  * @ignore
141
141
  */
@@ -174,7 +174,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
174
174
  * @param key key 可选参与,用于创建多个实例
175
175
  * @details 该方法为同步调用,以单例的形式提供对象创建。
176
176
  */
177
- static getInstance(config?: AliRtcEngineConfig): AliRtcEngine;
177
+ static getInstance(config?: AliRtcEngineConfig): AliRtcEngine_2;
178
178
  static AliRtcSdkChannelProfile: typeof AliRtcSdkChannelProfile;
179
179
  static AliRtcSdkClientRole: typeof AliRtcSdkClientRole;
180
180
  static AliRtcVideoStreamType: typeof AliRtcVideoStreamType;
@@ -261,6 +261,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
261
261
  * 监听 Publisher 事件
262
262
  */
263
263
  private addPublisherListeners;
264
+ private occurError;
264
265
  /**
265
266
  * 监听 UM 事件
266
267
  */
@@ -1229,11 +1230,19 @@ declare interface AliRtcEngineEventListener {
1229
1230
  rtcRemoteAudioStats: (stats: AliRtcRemoteAudioStats[]) => void;
1230
1231
  /**
1231
1232
  * @brief 错误通知
1233
+ * @deprecated 请使用 occurError
1232
1234
  * @details 如果engine出现error,通过这个回调通知app
1233
- * @param error 错误类型,参考 {@link org::webrtc::alirtcInterface::ErrorCodeEnum}
1235
+ * @param error 错误类型,参考 {@link AliRtcError}
1234
1236
  * @param message 错误消息
1235
1237
  */
1236
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;
1237
1246
  /**
1238
1247
  * @brief 收到数据通道消息
1239
1248
  * @param uid 用户ID
@@ -1365,14 +1374,18 @@ export declare enum AliRtcErrorCode {
1365
1374
  /** 无可用的音频采集设备,检查是否接入了可用的麦克风,并检查系统设置中,该设备是否被禁用 */
1366
1375
  ERR_MIC_NOT_AVAILABLE = 17040393,
1367
1376
  /** 无可用的音频播放设备,检查是否接入了可用的扬声器或耳机,并检查系统设置中,该设备是否被禁用 */
1368
- ERR_SPEAKER_NO_AVAILABLE = 17040400,
1377
+ ERR_SPEAKER_NOT_AVAILABLE = 17040400,
1369
1378
  /****************************************************
1370
1379
  * 视频设备错误码
1371
1380
  ****************************************************/
1372
1381
  /** 采集设备初始化失败,检查系统相机是否可用,移动端App是否占用了相机 */
1373
1382
  ERR_CAMERA_OPEN_FAIL = 17039620,
1383
+ /** 采集设备未授权,建议去系统设置中,打开摄像头授权,并且重新加入频道 */
1384
+ ERR_CAMERA_AUTH_FAIL = 17039621,
1374
1385
  /** 采集过程中出现异常,Mac、Winodows电脑相机采集灯熄灭,设备被强制中断。建议重新加入频道或者重启App */
1375
1386
  ERR_CAMERA_INTERRUPT = 17039622,
1387
+ /** 无可用的视频采集设备,检查是否接入了可用的摄像头,并检查系统设置中,该设备是否被禁用 */
1388
+ ERR_CAMERA_NOT_AVAILABLE = 17039623,
1376
1389
  /** 渲染设备初始化失败,检查Windows端显卡驱动是否需要升级,移动端手机型号或者Android平板盒子等外设是否支持OpenGL */
1377
1390
  ERR_VIDEO_DISPLAY_OPEN_FAIL = 17039873,
1378
1391
  /** 渲染过程中出现异常,系统异常错误导致渲染引擎报错,重新加入频道或者重启App */
@@ -2374,9 +2387,6 @@ declare enum CodecType {
2374
2387
  UNKNOWN = ""
2375
2388
  }
2376
2389
 
2377
- declare const _default: typeof AliRtcEngine;
2378
- export default _default;
2379
-
2380
2390
  declare interface DeviceStatus {
2381
2391
  micOpen: boolean;
2382
2392
  micInterrupted: boolean;
@@ -3383,6 +3393,7 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
3383
3393
  dcConnectingPromise?: Promise<unknown>;
3384
3394
  private _publishingTracks;
3385
3395
  constructor(localStreamManager: LocalStreamManager, slsReporter: SLSReporter);
3396
+ private addRTSListener;
3386
3397
  get pcTraceId(): string;
3387
3398
  set localJoinTime(time: number);
3388
3399
  setEncodedInsertableStreams(enable: boolean): void;
@@ -3401,7 +3412,7 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
3401
3412
  getPublishAudioStats(streamUrl: string, msid?: string): Promise<unknown>;
3402
3413
  publishAdd(streamUrl: string, stream: LocalStream, callId: string, extra?: PublishExtraParams, isResume?: boolean, waitSender?: boolean, reason?: PublishReason): Promise<string>;
3403
3414
  publishDelete(streamUrl: string, options: PublishOptions): Promise<string>;
3404
- publishReplace(streamUrl: string, stream: LocalStream, extra?: PublishExtraParams): Promise<any>;
3415
+ publishReplace(streamUrl: string, stream: LocalStream, extra?: PublishExtraParams): Promise<string>;
3405
3416
  publishStop(streamUrl: string): Promise<string>;
3406
3417
  publishAddDataChannel(streamUrl: string): Promise<any>;
3407
3418
  publishStopDataChannel(streamUrl: string, datachannel: any): Promise<void>;
@@ -3579,7 +3590,7 @@ declare class SLSReporter {
3579
3590
  private static staticClient;
3580
3591
  private static getLogClient;
3581
3592
  static reportOSSUpload(sessionId: string, date: string, responseCode?: number): void;
3582
- constructor(engine: AliRtcEngine);
3593
+ constructor(engine: WrappedAliRtcEngine);
3583
3594
  /**
3584
3595
  * 开始建立连接
3585
3596
  * @param authInfo
@@ -3797,6 +3808,7 @@ declare interface SubConfig {
3797
3808
  }
3798
3809
 
3799
3810
  declare type SubscribeOptions = StreamOptions & {
3811
+ aMsid?: string;
3800
3812
  vMsid?: string;
3801
3813
  };
3802
3814
 
@@ -3919,4 +3931,10 @@ declare enum VideoStreamSource {
3919
3931
  Image = 2
3920
3932
  }
3921
3933
 
3934
+ declare const WrappedAliRtcEngine: typeof AliRtcEngine_2;
3935
+
3936
+ declare type WrappedAliRtcEngine = InstanceType<typeof AliRtcEngine_2>;
3937
+ export { WrappedAliRtcEngine as AliRtcEngine }
3938
+ export default WrappedAliRtcEngine;
3939
+
3922
3940
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliyun-rtc-sdk",
3
- "version": "6.12.1-beta.1",
3
+ "version": "6.12.1-beta.3",
4
4
  "type": "module",
5
5
  "description": "rtc web sdk of aliyun",
6
6
  "main": "dist/aliyun-rtc-sdk.js",
@@ -9,7 +9,7 @@
9
9
  "@aliyun-sls/web-sts-plugin": "^0.3.5",
10
10
  "@aliyun-sls/web-track-browser": "^0.3.5",
11
11
  "aliyun-queen-engine": "^6.3.3",
12
- "aliyun-rts-sdk": "2.9.1-beta.2",
12
+ "aliyun-rts-sdk": "2.9.1",
13
13
  "crypto-js": "^4.1.1",
14
14
  "dateformat": "^5.0.3",
15
15
  "eventemitter3": "^5.0.1",