@tencentcloud/trtc-cloud-wx 1.0.1 → 1.0.2-beta.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/package.json +1 -1
- package/trtc-cloud-wx.js +17 -7
package/package.json
CHANGED
package/trtc-cloud-wx.js
CHANGED
|
@@ -796,7 +796,6 @@ var TaskMachine = /*#__PURE__*/function () {
|
|
|
796
796
|
key: "resetPusherTasks",
|
|
797
797
|
value: function resetPusherTasks() {
|
|
798
798
|
this.isProcessing = false;
|
|
799
|
-
this.pusherDomReady = false;
|
|
800
799
|
this.pusherTaskQueue.forEach(function (task) {
|
|
801
800
|
task.resolve();
|
|
802
801
|
});
|
|
@@ -1413,7 +1412,7 @@ var Logger = /*#__PURE__*/function () {
|
|
|
1413
1412
|
var logger = new Logger();
|
|
1414
1413
|
|
|
1415
1414
|
var name = "@tencentcloud/trtc-cloud-wx";
|
|
1416
|
-
var version = "1.0.1";
|
|
1415
|
+
var version = "1.0.2-beta.1";
|
|
1417
1416
|
var description = "";
|
|
1418
1417
|
var main = "dist/trtc-cloud-wx.js";
|
|
1419
1418
|
var module$1 = "dist/trtc-cloud-wx.js";
|
|
@@ -1502,6 +1501,7 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1502
1501
|
this.isOpenCamera = false;
|
|
1503
1502
|
this.currentSoundMode = exports.TRTCAudioRoute.TRTC_AUDIO_ROUTE_SPEAKER;
|
|
1504
1503
|
this.audioVolumeEvaluation = 0;
|
|
1504
|
+
this.encsmall = 0;
|
|
1505
1505
|
this.allTimer = {};
|
|
1506
1506
|
this.renderMap = new Map();
|
|
1507
1507
|
this.logger = logger;
|
|
@@ -1785,6 +1785,14 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1785
1785
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1786
1786
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1787
1787
|
case 0:
|
|
1788
|
+
if (!this.isEnterRoom) {
|
|
1789
|
+
_context2.next = 3;
|
|
1790
|
+
break;
|
|
1791
|
+
}
|
|
1792
|
+
logger.warn('You are already in the room, please exit the current room first.');
|
|
1793
|
+
return _context2.abrupt("return");
|
|
1794
|
+
case 3:
|
|
1795
|
+
this.trtc.createPusher({});
|
|
1788
1796
|
startTime = new Date().getTime();
|
|
1789
1797
|
sdkAppId = params.sdkAppId, userId = params.userId, userSig = params.userSig, roomId = params.roomId, strRoomId = params.strRoomId, role = params.role, privateMapKey = params.privateMapKey;
|
|
1790
1798
|
logger.setInfo({
|
|
@@ -1795,7 +1803,7 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1795
1803
|
logger.info('enterRoom with options: ', JSON.stringify(params), scene);
|
|
1796
1804
|
this.userId = userId;
|
|
1797
1805
|
this.isEnterRoom = true;
|
|
1798
|
-
_context2.next =
|
|
1806
|
+
_context2.next = 12;
|
|
1799
1807
|
return this.setAttributes({
|
|
1800
1808
|
params: {
|
|
1801
1809
|
sdkAppID: sdkAppId,
|
|
@@ -1808,10 +1816,11 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1808
1816
|
scene: translateTRTCAppScene(scene),
|
|
1809
1817
|
enableMic: false,
|
|
1810
1818
|
enableCamera: false,
|
|
1811
|
-
videoPreview: false
|
|
1819
|
+
videoPreview: false,
|
|
1820
|
+
encsmall: this.encsmall
|
|
1812
1821
|
}
|
|
1813
1822
|
}, 'enterRoom');
|
|
1814
|
-
case
|
|
1823
|
+
case 12:
|
|
1815
1824
|
this.trtc.getPusherInstance().start({
|
|
1816
1825
|
success: function success() {
|
|
1817
1826
|
return __awaiter(_this6, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -1849,7 +1858,7 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1849
1858
|
_this6.emit('onEnterRoom', -1);
|
|
1850
1859
|
}
|
|
1851
1860
|
});
|
|
1852
|
-
case
|
|
1861
|
+
case 13:
|
|
1853
1862
|
case "end":
|
|
1854
1863
|
return _context2.stop();
|
|
1855
1864
|
}
|
|
@@ -2826,7 +2835,8 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
2826
2835
|
}, {
|
|
2827
2836
|
key: "enableSmallVideoStream",
|
|
2828
2837
|
value: function enableSmallVideoStream(enable, params) {
|
|
2829
|
-
|
|
2838
|
+
logger.info('enableSmallVideoStream with options: ', enable, JSON.stringify(params));
|
|
2839
|
+
this.encsmall = enable ? 1 : 0;
|
|
2830
2840
|
}
|
|
2831
2841
|
/**
|
|
2832
2842
|
* 调用实验性 API 接口
|