@tencentcloud/trtc-cloud-wx 0.0.11 → 0.0.13
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 +13 -3
package/package.json
CHANGED
package/trtc-cloud-wx.js
CHANGED
|
@@ -814,7 +814,7 @@ var Logger = /*#__PURE__*/function () {
|
|
|
814
814
|
var logger = new Logger();
|
|
815
815
|
|
|
816
816
|
var name = "@tencentcloud/trtc-cloud-wx";
|
|
817
|
-
var version = "0.0.
|
|
817
|
+
var version = "0.0.12";
|
|
818
818
|
var description = "";
|
|
819
819
|
var main = "dist/trtc-cloud-wx.js";
|
|
820
820
|
var module$1 = "dist/trtc-cloud-wx.js";
|
|
@@ -1175,8 +1175,17 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1175
1175
|
_this5.isEnterRoom = true;
|
|
1176
1176
|
var endTime = new Date().getTime();
|
|
1177
1177
|
_this5.emit('onEnterRoom', endTime - startTime);
|
|
1178
|
-
if (_this5.trtc.getPusherAttributes().
|
|
1179
|
-
|
|
1178
|
+
if (_this5.trtc.getPusherAttributes().videoPreview === true) {
|
|
1179
|
+
// 如果进房前有打开摄像头,需要开启视频上行,并抛出 onSendFirstLocalVideoFrame 事件
|
|
1180
|
+
var _pusher = _this5.trtc.setPusherAttributes({
|
|
1181
|
+
enableCamera: true
|
|
1182
|
+
});
|
|
1183
|
+
_this5.InterfaceEventEmitter.emit('pusherAttributesChange', {
|
|
1184
|
+
pusher: _pusher,
|
|
1185
|
+
callback: function callback() {
|
|
1186
|
+
_this5.emit('onSendFirstLocalVideoFrame', exports.TRTCVideoStreamType.TRTCVideoStreamTypeBig);
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1180
1189
|
}
|
|
1181
1190
|
},
|
|
1182
1191
|
fail: function fail() {
|
|
@@ -1224,6 +1233,7 @@ var TRTCCloud = /*#__PURE__*/function () {
|
|
|
1224
1233
|
var tempRole = this.role;
|
|
1225
1234
|
this.role = role;
|
|
1226
1235
|
if (tempRole === role || role === exports.TRTCRoleType.TRTCRoleAnchor) {
|
|
1236
|
+
logger.info('switchRole success');
|
|
1227
1237
|
this.emit('onSwitchRole', 0, '');
|
|
1228
1238
|
return;
|
|
1229
1239
|
}
|