dingrtc 3.9.18 → 3.9.20

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.
package/dist/index.d.ts CHANGED
@@ -2190,7 +2190,8 @@ declare class DingRTCClient extends EventEmitter<IClientEvents> {
2190
2190
  private syncStatTimer;
2191
2191
  private clientStatSync;
2192
2192
  private currentClientState;
2193
- constructor();
2193
+ private deviceChecker;
2194
+ constructor(plugins?: Record<string, any>);
2194
2195
  /**
2195
2196
  * 远端用户信息列表,包含频道中各个远端用户的用户 ID 和轨道信息。
2196
2197
  *
@@ -2225,6 +2226,7 @@ declare class DingRTCClient extends EventEmitter<IClientEvents> {
2225
2226
  * @returns
2226
2227
  */
2227
2228
  emit<T extends keyof IClientEvents>(event: T, ...args: any): boolean;
2229
+ startPlugin(pluginName: string, options?: Record<string, any>): Promise<any>;
2228
2230
  /**
2229
2231
  * 加入频道,在同一个频道内的用户可以互相通话。
2230
2232
  *
@@ -3316,8 +3318,13 @@ declare class Track extends EventEmitter<ITrackEvent> {
3316
3318
  setSource(source: VideoSourceInfo | AudioSourceInfo): void;
3317
3319
  /**
3318
3320
  * 停止播放
3321
+ * @deprecated 用户很容易跟close接口混淆,使用stopPlay更加明确含义
3319
3322
  */
3320
3323
  stop(element?: string | HTMLElement): void;
3324
+ /**
3325
+ * 停止播放
3326
+ */
3327
+ stopPlay(element?: string | HTMLElement): void;
3321
3328
  protected innnerPlay(param: InnerPlayConfig): void;
3322
3329
  /**
3323
3330
  * 获取媒体轨道
@@ -3647,6 +3654,13 @@ declare class LocalAudioTrack extends LocalTrack {
3647
3654
  * 播放本地音频轨道。
3648
3655
  */
3649
3656
  play(): void;
3657
+ /**
3658
+ * 替换音视频轨道
3659
+ * @param track 音视频轨道
3660
+ * @param stopOldTrack 是否停止上一个轨道
3661
+ * @override
3662
+ */
3663
+ replaceTrack(track: MediaStreamTrack, stopOldTrack?: boolean): void;
3650
3664
  }
3651
3665
  /**
3652
3666
  * 本地摄像头视频轨道,继承于 LocalVideoTrack,并在此基础上提供了更换采集设备/调整编码参数的功能。
@@ -3796,7 +3810,7 @@ declare class DingRTC extends EventEmitter<IGlobalEvent> {
3796
3810
  /**
3797
3811
  * 创建一个客户端实例以进行 RTC 通信
3798
3812
  */
3799
- createClient(): DingRTCClient;
3813
+ createClient(plugins?: any[]): DingRTCClient;
3800
3814
  /**
3801
3815
  * 检查 DingRtc Web SDK 对正在使用的浏览器的适配情况。
3802
3816
  *