@tencentcloud/trtc-cloud-wx 0.0.13 → 0.0.15

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 +1 -1
  2. package/trtc-cloud-wx.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencentcloud/trtc-cloud-wx",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "",
5
5
  "main": "./trtc-cloud-wx.js",
6
6
  "type": "module",
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.12";
817
+ var version = "0.0.13";
818
818
  var description = "";
819
819
  var main = "dist/trtc-cloud-wx.js";
820
820
  var module$1 = "dist/trtc-cloud-wx.js";
@@ -969,10 +969,10 @@ var TRTCCloud = /*#__PURE__*/function () {
969
969
  var _event$data2 = event.data,
970
970
  userID = _event$data2.userID;
971
971
  _event$data2.playerList;
972
+ _this2.InterfaceEventEmitter.emit('onRemoteUserLeaveRoom', userID, 0);
972
973
  _this2.emit('onUserVideoAvailable', userID, 0);
973
974
  _this2.emit('onUserSubStreamAvailable', userID, 0);
974
975
  _this2.emit('onRemoteUserLeaveRoom', userID, 0);
975
- _this2.InterfaceEventEmitter.emit('onRemoteUserLeaveRoom', userID, 0);
976
976
  });
977
977
  // 远端用户推送视频
978
978
  this.trtc.on(this.TRTC_EVENT.REMOTE_VIDEO_ADD, function (event) {
@@ -1178,6 +1178,7 @@ var TRTCCloud = /*#__PURE__*/function () {
1178
1178
  if (_this5.trtc.getPusherAttributes().videoPreview === true) {
1179
1179
  // 如果进房前有打开摄像头,需要开启视频上行,并抛出 onSendFirstLocalVideoFrame 事件
1180
1180
  var _pusher = _this5.trtc.setPusherAttributes({
1181
+ videoPreview: false,
1181
1182
  enableCamera: true
1182
1183
  });
1183
1184
  _this5.InterfaceEventEmitter.emit('pusherAttributesChange', {
@@ -1512,11 +1513,10 @@ var TRTCCloud = /*#__PURE__*/function () {
1512
1513
  }, {
1513
1514
  key: "setTRTCPlayerAttributes",
1514
1515
  value: function setTRTCPlayerAttributes(streamId, options) {
1516
+ var _a;
1515
1517
  logger.info('setTRTCPlayerAttributes with options: ', streamId, options);
1516
1518
  this.trtc.setPlayerAttributes(streamId, options);
1517
- var _this$trtc$getPlayerI = this.trtc.getPlayerInstance(streamId),
1518
- playerAttributes = _this$trtc$getPlayerI.playerAttributes;
1519
- return playerAttributes;
1519
+ return (_a = this.trtc.getPlayerInstance(streamId)) === null || _a === void 0 ? void 0 : _a.playerAttributes;
1520
1520
  }
1521
1521
  }, {
1522
1522
  key: "setVideoEncoderParam",