@tencentcloud/trtc-cloud-wx 0.0.20-beta.3 → 0.0.20-beta.4

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/trtc-cloud-wx.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencentcloud/trtc-cloud-wx",
3
- "version": "0.0.20-beta.3",
3
+ "version": "0.0.20-beta.4",
4
4
  "description": "",
5
5
  "main": "./trtc-cloud-wx.js",
6
6
  "type": "module",
@@ -10,6 +10,6 @@
10
10
  "dependencies": {
11
11
  "aegis-mp-sdk": "^1.37.7",
12
12
  "eventemitter3": "^5.0.0",
13
- "trtc-wx-sdk": "1.1.6-beta.1"
13
+ "trtc-wx-sdk": "1.1.6-beta.2"
14
14
  }
15
15
  }
package/trtc-cloud-wx.js CHANGED
@@ -777,6 +777,12 @@ var TaskMachine = /*#__PURE__*/function () {
777
777
  this.isProcessing = false;
778
778
  this.pusherDomReady = false;
779
779
  this.pusherTaskQueue.length = 0;
780
+ this.resetPusherTasks();
781
+ for (var key in this.playerTasks) {
782
+ if (this.playerTasks[key]) {
783
+ this.resetPlayerTasks(key);
784
+ }
785
+ }
780
786
  this.playerTasks = {};
781
787
  }
782
788
  }, {
@@ -784,12 +790,18 @@ var TaskMachine = /*#__PURE__*/function () {
784
790
  value: function resetPusherTasks() {
785
791
  this.isProcessing = false;
786
792
  this.pusherDomReady = false;
793
+ this.pusherTaskQueue.forEach(function (task) {
794
+ task.resolve();
795
+ });
787
796
  this.pusherTaskQueue.length = 0;
788
797
  }
789
798
  }, {
790
799
  key: "resetPlayerTasks",
791
800
  value: function resetPlayerTasks(view) {
792
801
  if (this.playerTasks[view]) {
802
+ this.playerTasks[view].taskQueue.forEach(function (task) {
803
+ task.resolve();
804
+ });
793
805
  this.playerTasks[view].taskQueue.length = 0;
794
806
  this.playerTasks[view].isProcessing = false;
795
807
  this.playerTasks[view].domReady = false;