@seastart/srtc-web-sdk 0.1.1 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastart/srtc-web-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "srtc sdk for web",
5
5
  "main": "srtc.js",
6
6
  "module": "srtc.mjs",
package/srtc.d.mts CHANGED
@@ -66,6 +66,13 @@ declare abstract class BaseSRTC {
66
66
  * 取消订阅远端流
67
67
  */
68
68
  unsubscribeRemoteTrack(track: BaseTrack): Promise<void>;
69
+ /**
70
+ * 获取远端用户音视频流实例,一般用于订阅流后您没有持有返回的流实例,可以用此方法获取对应实例
71
+ * @param uid 用户id
72
+ * @param id 流轨道id,与desc二选一
73
+ * @param desc 流描述,与id二选一
74
+ */
75
+ getRemoteTrack(uid: string, id?: string, desc?: string): BaseTrack;
69
76
  }
70
77
  declare abstract class BaseTrack extends EventEmitter {
71
78
  constructor(info: BaseTrackInfo, uid: string);
@@ -425,6 +432,7 @@ export declare class SRTC extends BaseSRTC {
425
432
  * 取消订阅远端流
426
433
  */
427
434
  unsubscribeRemoteTrack(track: RemoteAudioMixTrack | RemoteAudioTrack | RemoteVideoTrack): Promise<void>;
435
+ getRemoteTrack(uid: string, id?: string, desc?: string): RemoteAudioTrack | RemoteVideoTrack;
428
436
  }
429
437
  /**
430
438
  * 摄像头预设参数
package/srtc.d.ts CHANGED
@@ -66,6 +66,13 @@ declare abstract class BaseSRTC {
66
66
  * 取消订阅远端流
67
67
  */
68
68
  unsubscribeRemoteTrack(track: BaseTrack): Promise<void>;
69
+ /**
70
+ * 获取远端用户音视频流实例,一般用于订阅流后您没有持有返回的流实例,可以用此方法获取对应实例
71
+ * @param uid 用户id
72
+ * @param id 流轨道id,与desc二选一
73
+ * @param desc 流描述,与id二选一
74
+ */
75
+ getRemoteTrack(uid: string, id?: string, desc?: string): BaseTrack;
69
76
  }
70
77
  declare abstract class BaseTrack extends EventEmitter {
71
78
  constructor(info: BaseTrackInfo, uid: string);
@@ -425,6 +432,7 @@ export declare class SRTC extends BaseSRTC {
425
432
  * 取消订阅远端流
426
433
  */
427
434
  unsubscribeRemoteTrack(track: RemoteAudioMixTrack | RemoteAudioTrack | RemoteVideoTrack): Promise<void>;
435
+ getRemoteTrack(uid: string, id?: string, desc?: string): RemoteAudioTrack | RemoteVideoTrack;
428
436
  }
429
437
  /**
430
438
  * 摄像头预设参数