quickvo-sdk-js 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -17,6 +17,10 @@
17
17
 
18
18
  本节介绍实现音视频互动的主体流程及必用的 API,SDK 提供的其他能力可参考“通信能力、房间能力、音频/视频能力”的相关功能点描述 ![音视频互动流程.png](/音视频互动流程.png)
19
19
 
20
+ ## 在线演示
21
+
22
+ [开发环境](https://dev-meet.quickvo.live) / [测试环境](https://test-meet.quickvo.live)
23
+
20
24
  ## 说明
21
25
 
22
26
  - 以下为快速接入并体验基本功能,如需要更详细的控制和使用请查阅 完整 api 章节。
package/dist/index.js CHANGED
@@ -8905,16 +8905,23 @@ class QuickVO extends Room {
8905
8905
  }
8906
8906
  {
8907
8907
  const _ = async (q) => {
8908
- await this.updateUsers([q.data.user]);
8908
+ const { user: k } = q.data, { id: $, tracks: e = [] } = k;
8909
+ await this.updateUserPermissions($, 3);
8910
+ const o = [];
8909
8911
  {
8910
- const k = q.data.user, { id: $, tracks: e = [] } = k;
8911
- await this.updateUsertracks($, e, !0), await this.updateUserPermissions($, 3);
8912
+ const { tracks: I } = await this.getUser($);
8913
+ for (const N of e) {
8914
+ const { mid: D, trackName: P } = N;
8915
+ if (I.find((L) => L.mid === D && L.trackName === P)) continue;
8916
+ o.push(N);
8917
+ }
8912
8918
  }
8913
- if (this.options.newPublishAutoSubscribe) {
8914
- const k = this.getTrackNamesFormTracks(q.data.user.tracks);
8915
- await this.subscribe(k);
8916
- } else
8917
- await this.emitNotifyUpdateUsers();
8919
+ if (o.length !== 0)
8920
+ if (await this.updateUsertracks($, o, !0), this.options.newPublishAutoSubscribe) {
8921
+ const I = this.getTrackNamesFormTracks(o);
8922
+ await this.subscribe(I);
8923
+ } else
8924
+ await this.emitNotifyUpdateUsers();
8918
8925
  };
8919
8926
  this.cwsIns.addNotify({ event: "onPublish", callback: _ }, !0);
8920
8927
  }