zbzt-live-sdk 0.7.1 → 0.8.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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * zbzt-live-sdk.js v0.7.1
3
- * 2024-6-28 lanlonggang
2
+ * zbzt-live-sdk.js v0.8.1
3
+ * 2024-7-1 lanlonggang
4
4
  * Released By TAL Live.
5
5
  */
6
6
  import axios$2 from 'axios';
@@ -16642,7 +16642,7 @@ var urls = {
16642
16642
  api: 'api.weclassroom.com',
16643
16643
  report: 's.weclassroom.com'
16644
16644
  };
16645
- var version = '0.7.1';
16645
+ var version = '0.8.1';
16646
16646
  var liveExt = {
16647
16647
  name: 'live',
16648
16648
  version: '1.0.0.0'
@@ -20084,44 +20084,88 @@ function _startScreenPreview() {
20084
20084
  }));
20085
20085
  return _startScreenPreview.apply(this, arguments);
20086
20086
  }
20087
+ function restartCaptureScreen() {
20088
+ return _restartCaptureScreen.apply(this, arguments);
20089
+ }
20090
+ function _restartCaptureScreen() {
20091
+ _restartCaptureScreen = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
20092
+ var oldStream, res;
20093
+ return regenerator.wrap(function _callee32$(_context32) {
20094
+ while (1) switch (_context32.prev = _context32.next) {
20095
+ case 0:
20096
+ defaultApi$1.writeLog('ZEGO:: restartCaptureScreen');
20097
+ if (screenStream) {
20098
+ _context32.next = 4;
20099
+ break;
20100
+ }
20101
+ defaultApi$1.writeLog('ZEGO:: restartCaptureScreen screenStream is not exist', null, 'error');
20102
+ return _context32.abrupt("return");
20103
+ case 4:
20104
+ oldStream = screenStream;
20105
+ screenStream = null;
20106
+ // 重新创建屏幕共享流
20107
+ _context32.next = 8;
20108
+ return startScreenPreview();
20109
+ case 8:
20110
+ // 销毁并停止发布旧的屏幕共享流
20111
+ zg.destroyStream(oldStream);
20112
+ zg.stopPublishingStream(screenStreamId);
20113
+ // 重新发布新的屏幕共享流
20114
+ res = zg.startPublishingStream(screenStreamId, screenStream);
20115
+ if (!res) {
20116
+ NOTICE.pushStreamError({
20117
+ streamId: streamId
20118
+ });
20119
+ }
20120
+ if (screenConstraints.captureView) {
20121
+ screenStream.playVideo(screenConstraints.captureView);
20122
+ }
20123
+ case 13:
20124
+ case "end":
20125
+ return _context32.stop();
20126
+ }
20127
+ }, _callee32);
20128
+ }));
20129
+ return _restartCaptureScreen.apply(this, arguments);
20130
+ }
20087
20131
  function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
20088
20132
  return _initPullFlow.apply(this, arguments);
20089
20133
  }
20090
20134
  function _initPullFlow() {
20091
- _initPullFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId, domId, mute, pInfo, notAutoPlay, audioOnly) {
20135
+ _initPullFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId, domId, mute, pInfo, notAutoPlay, audioOnly) {
20092
20136
  var playChannel, remoteStream;
20093
- return regenerator.wrap(function _callee32$(_context32) {
20094
- while (1) switch (_context32.prev = _context32.next) {
20137
+ return regenerator.wrap(function _callee33$(_context33) {
20138
+ while (1) switch (_context33.prev = _context33.next) {
20095
20139
  case 0:
20096
20140
  defaultApi$1.writeLog("ZEGO:: initPullFlow_start ,streamId :".concat(streamId, ", domId: ").concat(domId, ", mute: ").concat(mute, ", pInfo: ").concat(pInfo, ", notAutoPlay: ").concat(notAutoPlay, ", audioOnly: ").concat(audioOnly));
20097
20141
  // NOTE 1. 重置埋点数据
20098
20142
  playChannel = _initPullData(streamId); // NOTE 5. 配置拉流参数
20099
20143
  //是否拉取声音
20100
- _context32.next = 4;
20144
+ _context33.next = 4;
20101
20145
  return activateAudioPlayStream(streamId, !mute);
20102
20146
  case 4:
20103
- _context32.next = 6;
20147
+ _context33.next = 6;
20104
20148
  return activateVideoPlayStream(streamId, !audioOnly);
20105
20149
  case 6:
20106
- _context32.next = 8;
20150
+ _context33.next = 8;
20107
20151
  return playStream(streamId, playChannel, pInfo);
20108
20152
  case 8:
20109
- remoteStream = _context32.sent;
20153
+ remoteStream = _context33.sent;
20110
20154
  streamIdToStream[streamId] = remoteStream;
20111
20155
  window.remoteStream = remoteStream;
20112
20156
  // 创建视图
20113
- _context32.next = 13;
20157
+ _context33.next = 13;
20114
20158
  return startLocalOrRemotePreview(false, streamId, domId, mute);
20115
20159
  case 13:
20116
- return _context32.abrupt("return", {
20160
+ return _context33.abrupt("return", {
20117
20161
  videoSrc: '',
20118
20162
  playerId: playChannel
20119
20163
  });
20120
20164
  case 14:
20121
20165
  case "end":
20122
- return _context32.stop();
20166
+ return _context33.stop();
20123
20167
  }
20124
- }, _callee32);
20168
+ }, _callee33);
20125
20169
  }));
20126
20170
  return _initPullFlow.apply(this, arguments);
20127
20171
  }
@@ -20172,14 +20216,14 @@ function startMixtStream(_x45) {
20172
20216
  return _startMixtStream.apply(this, arguments);
20173
20217
  }
20174
20218
  function _startMixtStream() {
20175
- _startMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(args) {
20219
+ _startMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(args) {
20176
20220
  var streamID, taskID, url;
20177
- return regenerator.wrap(function _callee33$(_context33) {
20178
- while (1) switch (_context33.prev = _context33.next) {
20221
+ return regenerator.wrap(function _callee34$(_context34) {
20222
+ while (1) switch (_context34.prev = _context34.next) {
20179
20223
  case 0:
20180
20224
  streamID = args.streamID, taskID = args.taskID, url = args.url;
20181
20225
  defaultApi$1.writeLog("avsdk ZEGO::startMixerTask taskID: ".concat(taskID, " streamID: ").concat(streamID, ", url: ").concat(url));
20182
- return _context33.abrupt("return", zg.startMixerTask({
20226
+ return _context34.abrupt("return", zg.startMixerTask({
20183
20227
  taskID: taskID,
20184
20228
  inputList: [{
20185
20229
  streamID: streamID,
@@ -20203,9 +20247,9 @@ function _startMixtStream() {
20203
20247
  }));
20204
20248
  case 3:
20205
20249
  case "end":
20206
- return _context33.stop();
20250
+ return _context34.stop();
20207
20251
  }
20208
- }, _callee33);
20252
+ }, _callee34);
20209
20253
  }));
20210
20254
  return _startMixtStream.apply(this, arguments);
20211
20255
  }
@@ -20220,24 +20264,24 @@ function stopMixtStream(_x46) {
20220
20264
  * @return Promise | void
20221
20265
  */
20222
20266
  function _stopMixtStream() {
20223
- _stopMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(taskId) {
20224
- return regenerator.wrap(function _callee34$(_context34) {
20225
- while (1) switch (_context34.prev = _context34.next) {
20267
+ _stopMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(taskId) {
20268
+ return regenerator.wrap(function _callee35$(_context35) {
20269
+ while (1) switch (_context35.prev = _context35.next) {
20226
20270
  case 0:
20227
20271
  if (taskId) {
20228
- _context34.next = 3;
20272
+ _context35.next = 3;
20229
20273
  break;
20230
20274
  }
20231
20275
  defaultApi$1.writeLog("avsdk ZEGO::stopMixerTask taskID:".concat(taskId, " is not exist"), null, 'error');
20232
- return _context34.abrupt("return");
20276
+ return _context35.abrupt("return");
20233
20277
  case 3:
20234
20278
  defaultApi$1.writeLog("avsdk ZEGO::stopMixerTask taskID: ".concat(taskId));
20235
- return _context34.abrupt("return", zg.stopMixerTask(taskId));
20279
+ return _context35.abrupt("return", zg.stopMixerTask(taskId));
20236
20280
  case 5:
20237
20281
  case "end":
20238
- return _context34.stop();
20282
+ return _context35.stop();
20239
20283
  }
20240
- }, _callee34);
20284
+ }, _callee35);
20241
20285
  }));
20242
20286
  return _stopMixtStream.apply(this, arguments);
20243
20287
  }
@@ -20245,10 +20289,10 @@ function playStream(_x47, _x48, _x49) {
20245
20289
  return _playStream.apply(this, arguments);
20246
20290
  }
20247
20291
  function _playStream() {
20248
- _playStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(streamId, uiChnIndex, pInfo) {
20292
+ _playStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, uiChnIndex, pInfo) {
20249
20293
  var streamInfo;
20250
- return regenerator.wrap(function _callee35$(_context35) {
20251
- while (1) switch (_context35.prev = _context35.next) {
20294
+ return regenerator.wrap(function _callee36$(_context36) {
20295
+ while (1) switch (_context36.prev = _context36.next) {
20252
20296
  case 0:
20253
20297
  if (typeof pInfo === 'undefined') {
20254
20298
  // SEI
@@ -20256,7 +20300,7 @@ function _playStream() {
20256
20300
  }
20257
20301
  streamInfo = streamIdRtcPlayerInfo1[streamId];
20258
20302
  defaultApi$1.writeLog("avsdk ZEGO::PlayStream streamId: ".concat(streamId, " streamInfo: ").concat(JSON.stringify(streamInfo)));
20259
- return _context35.abrupt("return", zg.startPlayingStream(streamId, {
20303
+ return _context36.abrupt("return", zg.startPlayingStream(streamId, {
20260
20304
  // TODO 拉流参数配置
20261
20305
  // video: !!!audioOnly,
20262
20306
  video: streamInfo.video_type,
@@ -20265,9 +20309,9 @@ function _playStream() {
20265
20309
  }));
20266
20310
  case 4:
20267
20311
  case "end":
20268
- return _context35.stop();
20312
+ return _context36.stop();
20269
20313
  }
20270
- }, _callee35);
20314
+ }, _callee36);
20271
20315
  }));
20272
20316
  return _playStream.apply(this, arguments);
20273
20317
  }
@@ -20275,10 +20319,10 @@ function stopPlayStream(_x50, _x51) {
20275
20319
  return _stopPlayStream.apply(this, arguments);
20276
20320
  }
20277
20321
  function _stopPlayStream() {
20278
- _stopPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, recovery) {
20322
+ _stopPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId, recovery) {
20279
20323
  var dom;
20280
- return regenerator.wrap(function _callee36$(_context36) {
20281
- while (1) switch (_context36.prev = _context36.next) {
20324
+ return regenerator.wrap(function _callee37$(_context37) {
20325
+ while (1) switch (_context37.prev = _context37.next) {
20282
20326
  case 0:
20283
20327
  console.warn('[停止拉流]', streamId);
20284
20328
  delete streamIdRtcPlayerInfo[streamId];
@@ -20299,9 +20343,9 @@ function _stopPlayStream() {
20299
20343
  } catch (error) {}
20300
20344
  case 7:
20301
20345
  case "end":
20302
- return _context36.stop();
20346
+ return _context37.stop();
20303
20347
  }
20304
- }, _callee36);
20348
+ }, _callee37);
20305
20349
  }));
20306
20350
  return _stopPlayStream.apply(this, arguments);
20307
20351
  }
@@ -20321,10 +20365,10 @@ function leaveRoom(_x52) {
20321
20365
  return _leaveRoom.apply(this, arguments);
20322
20366
  }
20323
20367
  function _leaveRoom() {
20324
- _leaveRoom = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(type) {
20368
+ _leaveRoom = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(type) {
20325
20369
  var key;
20326
- return regenerator.wrap(function _callee37$(_context37) {
20327
- while (1) switch (_context37.prev = _context37.next) {
20370
+ return regenerator.wrap(function _callee38$(_context38) {
20371
+ while (1) switch (_context38.prev = _context38.next) {
20328
20372
  case 0:
20329
20373
  globalVariables.localPreviewDomId = null;
20330
20374
  // NOTE 1. 停止声浪监听 WEB端无需单独停止
@@ -20362,9 +20406,9 @@ function _leaveRoom() {
20362
20406
  window.zg = null;
20363
20407
  case 15:
20364
20408
  case "end":
20365
- return _context37.stop();
20409
+ return _context38.stop();
20366
20410
  }
20367
- }, _callee37);
20411
+ }, _callee38);
20368
20412
  }));
20369
20413
  return _leaveRoom.apply(this, arguments);
20370
20414
  }
@@ -20372,19 +20416,19 @@ function leaveRoomWithChangeSDK() {
20372
20416
  return _leaveRoomWithChangeSDK.apply(this, arguments);
20373
20417
  }
20374
20418
  function _leaveRoomWithChangeSDK() {
20375
- _leaveRoomWithChangeSDK = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
20419
+ _leaveRoomWithChangeSDK = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
20376
20420
  var localPreviewDomId;
20377
- return regenerator.wrap(function _callee38$(_context38) {
20378
- while (1) switch (_context38.prev = _context38.next) {
20421
+ return regenerator.wrap(function _callee39$(_context39) {
20422
+ while (1) switch (_context39.prev = _context39.next) {
20379
20423
  case 0:
20380
20424
  localPreviewDomId = globalVariables.localPreviewDomId;
20381
20425
  leaveRoom();
20382
20426
  globalVariables.localPreviewDomId = localPreviewDomId;
20383
20427
  case 3:
20384
20428
  case "end":
20385
- return _context38.stop();
20429
+ return _context39.stop();
20386
20430
  }
20387
- }, _callee38);
20431
+ }, _callee39);
20388
20432
  }));
20389
20433
  return _leaveRoomWithChangeSDK.apply(this, arguments);
20390
20434
  }
@@ -20392,10 +20436,10 @@ function playerSnapShot(_x53) {
20392
20436
  return _playerSnapShot.apply(this, arguments);
20393
20437
  }
20394
20438
  function _playerSnapShot() {
20395
- _playerSnapShot = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39(streamId) {
20439
+ _playerSnapShot = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId) {
20396
20440
  var uri;
20397
- return regenerator.wrap(function _callee39$(_context39) {
20398
- while (1) switch (_context39.prev = _context39.next) {
20441
+ return regenerator.wrap(function _callee40$(_context40) {
20442
+ while (1) switch (_context40.prev = _context40.next) {
20399
20443
  case 0:
20400
20444
  defaultApi$1.writeLog("avsdk ZEGO::playerSnapShot streamId: ".concat(streamId));
20401
20445
  if (streamId === localStreamId) {
@@ -20403,12 +20447,12 @@ function _playerSnapShot() {
20403
20447
  } else {
20404
20448
  uri = screenStream.takeStreamSnapshot();
20405
20449
  }
20406
- return _context39.abrupt("return", util.getImageDataFromURL(uri));
20450
+ return _context40.abrupt("return", util.getImageDataFromURL(uri));
20407
20451
  case 3:
20408
20452
  case "end":
20409
- return _context39.stop();
20453
+ return _context40.stop();
20410
20454
  }
20411
- }, _callee39);
20455
+ }, _callee40);
20412
20456
  }));
20413
20457
  return _playerSnapShot.apply(this, arguments);
20414
20458
  }
@@ -20421,10 +20465,10 @@ function activateAudioPlayStream(_x54, _x55) {
20421
20465
  * @param streamid:String 被拉取的流的 id,必选
20422
20466
  */
20423
20467
  function _activateAudioPlayStream() {
20424
- _activateAudioPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId, bActive) {
20468
+ _activateAudioPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, bActive) {
20425
20469
  var stream, view;
20426
- return regenerator.wrap(function _callee40$(_context40) {
20427
- while (1) switch (_context40.prev = _context40.next) {
20470
+ return regenerator.wrap(function _callee41$(_context41) {
20471
+ while (1) switch (_context41.prev = _context41.next) {
20428
20472
  case 0:
20429
20473
  // NOTE WEB无此接口,此处业务侧应该是想达到是否渲染音视频的目的。所以web端先拉流,再按此设置值渲染
20430
20474
  // NOTE 关联代码 streamview.play()
@@ -20432,11 +20476,11 @@ function _activateAudioPlayStream() {
20432
20476
  resetStreamIdRtcPlayerInfo1(streamId);
20433
20477
  }
20434
20478
  if (!(streamIdRtcPlayerInfo1[streamId].audio_type === bActive)) {
20435
- _context40.next = 4;
20479
+ _context41.next = 4;
20436
20480
  break;
20437
20481
  }
20438
20482
  defaultApi$1.writeLog("avsdk ZEGO::activateAudioPlayStream streamId: ".concat(streamId, " bActive: ").concat(bActive, " is not changed"));
20439
- return _context40.abrupt("return");
20483
+ return _context41.abrupt("return");
20440
20484
  case 4:
20441
20485
  streamIdRtcPlayerInfo1[streamId].audio_type = bActive;
20442
20486
  /**
@@ -20444,10 +20488,10 @@ function _activateAudioPlayStream() {
20444
20488
  */
20445
20489
  stream = streamIdToStream[streamId];
20446
20490
  if (!stream) {
20447
- _context40.next = 9;
20491
+ _context41.next = 9;
20448
20492
  break;
20449
20493
  }
20450
- _context40.next = 9;
20494
+ _context41.next = 9;
20451
20495
  return zg.mutePlayStreamAudio(streamId, !bActive);
20452
20496
  case 9:
20453
20497
  view = streamIdToStreamView[streamId];
@@ -20456,9 +20500,9 @@ function _activateAudioPlayStream() {
20456
20500
  }
20457
20501
  case 11:
20458
20502
  case "end":
20459
- return _context40.stop();
20503
+ return _context41.stop();
20460
20504
  }
20461
- }, _callee40);
20505
+ }, _callee41);
20462
20506
  }));
20463
20507
  return _activateAudioPlayStream.apply(this, arguments);
20464
20508
  }
@@ -20466,15 +20510,15 @@ function pullAudioFlow(_x56, _x57) {
20466
20510
  return _pullAudioFlow.apply(this, arguments);
20467
20511
  }
20468
20512
  function _pullAudioFlow() {
20469
- _pullAudioFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, operation) {
20513
+ _pullAudioFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, operation) {
20470
20514
  var dom, div;
20471
- return regenerator.wrap(function _callee41$(_context41) {
20472
- while (1) switch (_context41.prev = _context41.next) {
20515
+ return regenerator.wrap(function _callee42$(_context42) {
20516
+ while (1) switch (_context42.prev = _context42.next) {
20473
20517
  case 0:
20474
20518
  // NOTE 1. 数据埋点、上报
20475
20519
  defaultApi$1.writeLog("pullAudioFlow -- operation ".concat(operation, " streamId ").concat(streamId));
20476
20520
  if (streamId) {
20477
- _context41.next = 3;
20521
+ _context42.next = 3;
20478
20522
  break;
20479
20523
  }
20480
20524
  throw new Error('pullAudioFlow -- streamId is not allowed to be empty');
@@ -20500,20 +20544,20 @@ function _pullAudioFlow() {
20500
20544
  ;
20501
20545
  // NOTE 2. 正式拉流;
20502
20546
  if (streamIdToStream[streamId]) {
20503
- _context41.next = 11;
20547
+ _context42.next = 11;
20504
20548
  break;
20505
20549
  }
20506
- _context41.next = 10;
20550
+ _context42.next = 10;
20507
20551
  return zg.startPlayingStream(streamId, {
20508
20552
  video: false
20509
20553
  });
20510
20554
  case 10:
20511
- streamIdToStream[streamId] = _context41.sent;
20555
+ streamIdToStream[streamId] = _context42.sent;
20512
20556
  case 11:
20513
20557
  ;
20514
20558
  // NOTE 3. 流挂载到body上
20515
20559
  if (operation) {
20516
- _context41.next = 20;
20560
+ _context42.next = 20;
20517
20561
  break;
20518
20562
  }
20519
20563
  try {
@@ -20526,16 +20570,16 @@ function _pullAudioFlow() {
20526
20570
  div.style.display = 'none';
20527
20571
  div.id = streamId;
20528
20572
  document.body.appendChild(div);
20529
- _context41.next = 20;
20573
+ _context42.next = 20;
20530
20574
  return startLocalOrRemotePreview(false, streamId, streamId);
20531
20575
  case 20:
20532
- _context41.next = 22;
20576
+ _context42.next = 22;
20533
20577
  return zg.mutePlayStreamAudio(streamId, operation);
20534
20578
  case 22:
20535
20579
  case "end":
20536
- return _context41.stop();
20580
+ return _context42.stop();
20537
20581
  }
20538
- }, _callee41);
20582
+ }, _callee42);
20539
20583
  }));
20540
20584
  return _pullAudioFlow.apply(this, arguments);
20541
20585
  }
@@ -20543,33 +20587,33 @@ function activateVideoPlayStream(_x58, _x59) {
20543
20587
  return _activateVideoPlayStream.apply(this, arguments);
20544
20588
  }
20545
20589
  function _activateVideoPlayStream() {
20546
- _activateVideoPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, bActive) {
20547
- return regenerator.wrap(function _callee42$(_context42) {
20548
- while (1) switch (_context42.prev = _context42.next) {
20590
+ _activateVideoPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, bActive) {
20591
+ return regenerator.wrap(function _callee43$(_context43) {
20592
+ while (1) switch (_context43.prev = _context43.next) {
20549
20593
  case 0:
20550
20594
  // NOTE WEB无此接口,此处业务侧应该是想达到是否渲染音视频的目的。所以web端先拉流,再按此设置值渲染
20551
20595
  if (!streamIdRtcPlayerInfo1[streamId]) {
20552
20596
  resetStreamIdRtcPlayerInfo1(streamId);
20553
20597
  }
20554
20598
  if (!(streamIdRtcPlayerInfo1[streamId].video_type === bActive)) {
20555
- _context42.next = 4;
20599
+ _context43.next = 4;
20556
20600
  break;
20557
20601
  }
20558
20602
  defaultApi$1.writeLog("avsdk ZEGO::activateVideoPlayStream streamId: ".concat(streamId, " bActive: ").concat(bActive, " is not changed"));
20559
- return _context42.abrupt("return");
20603
+ return _context43.abrupt("return");
20560
20604
  case 4:
20561
20605
  streamIdRtcPlayerInfo1[streamId].video_type = bActive;
20562
20606
  if (!streamIdToStream[streamId]) {
20563
- _context42.next = 8;
20607
+ _context43.next = 8;
20564
20608
  break;
20565
20609
  }
20566
- _context42.next = 8;
20610
+ _context43.next = 8;
20567
20611
  return zg.mutePlayStreamVideo(streamId, !bActive);
20568
20612
  case 8:
20569
20613
  case "end":
20570
- return _context42.stop();
20614
+ return _context43.stop();
20571
20615
  }
20572
- }, _callee42);
20616
+ }, _callee43);
20573
20617
  }));
20574
20618
  return _activateVideoPlayStream.apply(this, arguments);
20575
20619
  }
@@ -21092,6 +21136,7 @@ var zegosdk = {
21092
21136
  getSpeakerSimpleVolume: getSpeakerSimpleVolume,
21093
21137
  setSpeakerSimpleVolume: setSpeakerSimpleVolume,
21094
21138
  setSpeakerSimpleMute: setSpeakerSimpleMute,
21139
+ restartCaptureScreen: restartCaptureScreen,
21095
21140
  setPreviewView: setPreviewView,
21096
21141
  // native端是先设置视图再预览,WEB不需要设置视图,无此功能
21097
21142
  startPreview: startPreview,
@@ -21490,7 +21535,7 @@ var InvalidTokenError_1 = InvalidTokenError;
21490
21535
  lib.InvalidTokenError = InvalidTokenError_1;
21491
21536
 
21492
21537
  var StaticConfig = {
21493
- agentVersion: "OmniRTC_Web_V1.1.3-peiyou.2",
21538
+ agentVersion: "OmniRTC_Web_V1.1.4-peiyou.0",
21494
21539
  logVersion: 1,
21495
21540
  serviceType: 320,
21496
21541
  logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
@@ -32798,16 +32843,16 @@ var VolcCoreRTC = /** @class */ (function () {
32798
32843
  var localVideoTrack, localAudioTrack, screenVideoTrack, screenAudioTrack;
32799
32844
  return __generator(this, function (_a) {
32800
32845
  switch (_a.label) {
32801
- case 0: return [4 /*yield*/, this._engine.stopScreenCapture()];
32846
+ case 0:
32847
+ // await this._engine.stopScreenCapture();
32848
+ return [4 /*yield*/, this._handleScreenVideoTrackInitConfig(config)];
32802
32849
  case 1:
32803
- _a.sent();
32804
- return [4 /*yield*/, this._handleScreenVideoTrackInitConfig(config)];
32805
- case 2:
32850
+ // await this._engine.stopScreenCapture();
32806
32851
  _a.sent();
32807
32852
  return [4 /*yield*/, this._engine.startScreenCapture({
32808
32853
  enableAudio: withAudio !== 'disable',
32809
32854
  })];
32810
- case 3:
32855
+ case 2:
32811
32856
  _a.sent();
32812
32857
  localVideoTrack = this._engine.getLocalStreamTrack(StreamIndex.STREAM_INDEX_SCREEN, 'video');
32813
32858
  localAudioTrack = this._engine.getLocalStreamTrack(StreamIndex.STREAM_INDEX_SCREEN, 'audio');
@@ -34932,10 +34977,10 @@ function getToken$1(_x7, _x8, _x9, _x10) {
34932
34977
  * @returns {string}
34933
34978
  */
34934
34979
  function _getToken$1() {
34935
- _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(appid, room, user, planid) {
34980
+ _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee53(appid, room, user, planid) {
34936
34981
  var querys;
34937
- return regenerator.wrap(function _callee52$(_context52) {
34938
- while (1) switch (_context52.prev = _context52.next) {
34982
+ return regenerator.wrap(function _callee53$(_context53) {
34983
+ while (1) switch (_context53.prev = _context53.next) {
34939
34984
  case 0:
34940
34985
  querys = {
34941
34986
  appid: appid,
@@ -34943,12 +34988,12 @@ function _getToken$1() {
34943
34988
  room: room,
34944
34989
  user: formatUserId(user)
34945
34990
  };
34946
- return _context52.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
34991
+ return _context53.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
34947
34992
  case 2:
34948
34993
  case "end":
34949
- return _context52.stop();
34994
+ return _context53.stop();
34950
34995
  }
34951
- }, _callee52);
34996
+ }, _callee53);
34952
34997
  }));
34953
34998
  return _getToken$1.apply(this, arguments);
34954
34999
  }
@@ -36496,7 +36541,38 @@ var startScreenCapture = /*#__PURE__*/function () {
36496
36541
  return _ref24.apply(this, arguments);
36497
36542
  };
36498
36543
  }();
36499
-
36544
+ var restartCaptureScreen$1 = /*#__PURE__*/function () {
36545
+ var _ref25 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
36546
+ return regenerator.wrap(function _callee25$(_context25) {
36547
+ while (1) switch (_context25.prev = _context25.next) {
36548
+ case 0:
36549
+ defaultApi$1.writeLog('avsdk TALRTC::restartCaptureScreen');
36550
+ if (screenTrack) {
36551
+ _context25.next = 4;
36552
+ break;
36553
+ }
36554
+ defaultApi$1.writeLog('avsdk TALRTC::restartCaptureScreen - screenTrack is not exist', null, 'error');
36555
+ return _context25.abrupt("return");
36556
+ case 4:
36557
+ screenTrack.removeAllListeners();
36558
+ _context25.next = 7;
36559
+ return startScreenCapture();
36560
+ case 7:
36561
+ if (screenPreviewDomId) {
36562
+ screenTrack.play(screenPreviewDomId, {
36563
+ fit: 'contain'
36564
+ });
36565
+ }
36566
+ case 8:
36567
+ case "end":
36568
+ return _context25.stop();
36569
+ }
36570
+ }, _callee25);
36571
+ }));
36572
+ return function restartCaptureScreen() {
36573
+ return _ref25.apply(this, arguments);
36574
+ };
36575
+ }();
36500
36576
  /**
36501
36577
  * @function 停止屏幕采集
36502
36578
  * @return Promise | void
@@ -36507,20 +36583,20 @@ var stopScreenCapture = function stopScreenCapture() {
36507
36583
  // return callMethod('StopScreenCapture', {});
36508
36584
  };
36509
36585
  var startDeviceCheckerPreview$1 = /*#__PURE__*/function () {
36510
- var _ref25 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25(streamId, domId) {
36511
- return regenerator.wrap(function _callee25$(_context25) {
36512
- while (1) switch (_context25.prev = _context25.next) {
36586
+ var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26(streamId, domId) {
36587
+ return regenerator.wrap(function _callee26$(_context26) {
36588
+ while (1) switch (_context26.prev = _context26.next) {
36513
36589
  case 0:
36514
36590
  defaultApi$1.writeLog("avsdk TALRTC::startDeviceCheckerPreview -- streamId: ".concat(streamId, ", domId: ").concat(domId));
36515
36591
  if (domId) {
36516
- _context25.next = 4;
36592
+ _context26.next = 4;
36517
36593
  break;
36518
36594
  }
36519
36595
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - domId is required', null, 'error');
36520
36596
  throw new Error('avsdk TALRTC::startDeviceCheckerPreview - domId is required');
36521
36597
  case 4:
36522
36598
  if (streamId) {
36523
- _context25.next = 7;
36599
+ _context26.next = 7;
36524
36600
  break;
36525
36601
  }
36526
36602
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - streamId is required', null, 'error');
@@ -36528,22 +36604,22 @@ var startDeviceCheckerPreview$1 = /*#__PURE__*/function () {
36528
36604
  case 7:
36529
36605
  deviceCheckerDomId = domId;
36530
36606
  if (!(streamId === localStreamId$1)) {
36531
- _context25.next = 12;
36607
+ _context26.next = 12;
36532
36608
  break;
36533
36609
  }
36534
- _context25.next = 11;
36610
+ _context26.next = 11;
36535
36611
  return talrtc.createCameraVideoTrack({
36536
36612
  cameraId: window.zbztAVSDK_device_checker_init.camera.use,
36537
36613
  encoderConfig: videoEncoderConfig
36538
36614
  });
36539
36615
  case 11:
36540
- deviceCheckerTrack = _context25.sent;
36616
+ deviceCheckerTrack = _context26.sent;
36541
36617
  case 12:
36542
36618
  if (!(streamId === screenStreamId$1)) {
36543
- _context25.next = 16;
36619
+ _context26.next = 16;
36544
36620
  break;
36545
36621
  }
36546
- _context25.next = 15;
36622
+ _context26.next = 15;
36547
36623
  return talrtc.createScreenVideoTrack({
36548
36624
  encoderConfig: {
36549
36625
  width: SCREEN_CONSTRAINTS.width,
@@ -36553,19 +36629,19 @@ var startDeviceCheckerPreview$1 = /*#__PURE__*/function () {
36553
36629
  screenSourceType: 'application'
36554
36630
  }, 'disable');
36555
36631
  case 15:
36556
- deviceCheckerTrack = _context25.sent;
36632
+ deviceCheckerTrack = _context26.sent;
36557
36633
  case 16:
36558
36634
  deviceCheckerTrack.play(domId, {
36559
36635
  fit: 'contain'
36560
36636
  });
36561
36637
  case 17:
36562
36638
  case "end":
36563
- return _context25.stop();
36639
+ return _context26.stop();
36564
36640
  }
36565
- }, _callee25);
36641
+ }, _callee26);
36566
36642
  }));
36567
36643
  return function startDeviceCheckerPreview(_x24, _x25) {
36568
- return _ref25.apply(this, arguments);
36644
+ return _ref26.apply(this, arguments);
36569
36645
  };
36570
36646
  }();
36571
36647
  var stopDeviceCheckerPreview = function stopDeviceCheckerPreview() {
@@ -36585,14 +36661,14 @@ var stopDeviceCheckerPreview = function stopDeviceCheckerPreview() {
36585
36661
  * @return Promise 可从 Promise 中获取 src,Promise.then((src) => {})
36586
36662
  */
36587
36663
  var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
36588
- var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26(isLocal, streamId, domId) {
36664
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(isLocal, streamId, domId) {
36589
36665
  var _streamId$split, _streamId$split2, roomId, _userId, _liveId, user;
36590
- return regenerator.wrap(function _callee26$(_context26) {
36591
- while (1) switch (_context26.prev = _context26.next) {
36666
+ return regenerator.wrap(function _callee27$(_context27) {
36667
+ while (1) switch (_context27.prev = _context27.next) {
36592
36668
  case 0:
36593
36669
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview streamId: ".concat(streamId, ", isLocal: ").concat(isLocal, ", domId: ").concat(domId));
36594
36670
  if (!isLocal) {
36595
- _context26.next = 12;
36671
+ _context27.next = 12;
36596
36672
  break;
36597
36673
  }
36598
36674
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - localStreamId: ".concat(localStreamId$1, ", videoTrack: ").concat(videoTrack));
@@ -36605,39 +36681,39 @@ var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
36605
36681
  }
36606
36682
  }
36607
36683
  if (!(streamId === screenStreamId$1)) {
36608
- _context26.next = 10;
36684
+ _context27.next = 10;
36609
36685
  break;
36610
36686
  }
36611
36687
  screenPreviewDomId = domId;
36612
36688
  if (screenTrack) {
36613
- _context26.next = 9;
36689
+ _context27.next = 9;
36614
36690
  break;
36615
36691
  }
36616
- _context26.next = 9;
36692
+ _context27.next = 9;
36617
36693
  return startScreenCapture();
36618
36694
  case 9:
36619
36695
  screenTrack.play(domId, {
36620
36696
  fit: 'contain'
36621
36697
  });
36622
36698
  case 10:
36623
- _context26.next = 21;
36699
+ _context27.next = 21;
36624
36700
  break;
36625
36701
  case 12:
36626
36702
  if (!(!streamId || !domId)) {
36627
- _context26.next = 15;
36703
+ _context27.next = 15;
36628
36704
  break;
36629
36705
  }
36630
36706
  defaultApi$1.writeLog('avsdk TALRTC::startLocalOrRemotePreview - streamId and domId is required', null, 'error');
36631
- return _context26.abrupt("return");
36707
+ return _context27.abrupt("return");
36632
36708
  case 15:
36633
36709
  _streamId$split = streamId.split('_'), _streamId$split2 = _slicedToArray(_streamId$split, 4), roomId = _streamId$split2[1], _userId = _streamId$split2[2], _liveId = _streamId$split2[3];
36634
36710
  user = users.get("".concat(roomId, "_").concat(formatUserId(_userId)));
36635
36711
  if (user) {
36636
- _context26.next = 20;
36712
+ _context27.next = 20;
36637
36713
  break;
36638
36714
  }
36639
36715
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - user:".concat(_userId, " not found."));
36640
- return _context26.abrupt("return");
36716
+ return _context27.abrupt("return");
36641
36717
  case 20:
36642
36718
  if (_liveId === '1') {
36643
36719
  // 主流播放
@@ -36658,12 +36734,12 @@ var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
36658
36734
  }
36659
36735
  case 21:
36660
36736
  case "end":
36661
- return _context26.stop();
36737
+ return _context27.stop();
36662
36738
  }
36663
- }, _callee26);
36739
+ }, _callee27);
36664
36740
  }));
36665
36741
  return function startLocalOrRemotePreview(_x26, _x27, _x28) {
36666
- return _ref26.apply(this, arguments);
36742
+ return _ref27.apply(this, arguments);
36667
36743
  };
36668
36744
  }();
36669
36745
 
@@ -36672,16 +36748,16 @@ var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
36672
36748
  * @param {'audio' | 'video' | 'both'} type
36673
36749
  */
36674
36750
  var startPushLocalStream = /*#__PURE__*/function () {
36675
- var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(type) {
36751
+ var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(type) {
36676
36752
  var roomId, client, tracks;
36677
- return regenerator.wrap(function _callee27$(_context27) {
36678
- while (1) switch (_context27.prev = _context27.next) {
36753
+ return regenerator.wrap(function _callee28$(_context28) {
36754
+ while (1) switch (_context28.prev = _context28.next) {
36679
36755
  case 0:
36680
36756
  defaultApi$1.writeLog("avsdk TALRTC::startPushLocalStream ".concat(type));
36681
36757
  roomId = util.getRoomIdByStreamId(localStreamId$1);
36682
36758
  client = clients.get(roomId);
36683
36759
  if (client) {
36684
- _context27.next = 7;
36760
+ _context28.next = 7;
36685
36761
  break;
36686
36762
  }
36687
36763
  defaultApi$1.writeLog('avsdk TALRTC::startPushLocalStream - init first', null, 'error');
@@ -36695,32 +36771,32 @@ var startPushLocalStream = /*#__PURE__*/function () {
36695
36771
  if ((type === 'both' || type === 'video') && videoTrack) {
36696
36772
  tracks.push(videoTrack);
36697
36773
  }
36698
- _context27.next = 12;
36774
+ _context28.next = 12;
36699
36775
  return client.publish(tracks);
36700
36776
  case 12:
36701
36777
  case "end":
36702
- return _context27.stop();
36778
+ return _context28.stop();
36703
36779
  }
36704
- }, _callee27);
36780
+ }, _callee28);
36705
36781
  }));
36706
36782
  return function startPushLocalStream(_x29) {
36707
- return _ref27.apply(this, arguments);
36783
+ return _ref28.apply(this, arguments);
36708
36784
  };
36709
36785
  }();
36710
36786
  /**
36711
36787
  * @param {'audio' | 'video' | 'both'} type
36712
36788
  */
36713
36789
  var stopPushLocalStream = /*#__PURE__*/function () {
36714
- var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(type) {
36790
+ var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29(type) {
36715
36791
  var roomId, client, tracks;
36716
- return regenerator.wrap(function _callee28$(_context28) {
36717
- while (1) switch (_context28.prev = _context28.next) {
36792
+ return regenerator.wrap(function _callee29$(_context29) {
36793
+ while (1) switch (_context29.prev = _context29.next) {
36718
36794
  case 0:
36719
36795
  defaultApi$1.writeLog("avsdk TALRTC::stopPushLocalStream ".concat(type));
36720
36796
  roomId = util.getRoomIdByStreamId(localStreamId$1);
36721
36797
  client = clients.get(roomId);
36722
36798
  if (client) {
36723
- _context28.next = 6;
36799
+ _context29.next = 6;
36724
36800
  break;
36725
36801
  }
36726
36802
  defaultApi$1.writeLog('avsdk TALRTC::stopPushLocalStream - init first', null, 'error');
@@ -36733,29 +36809,29 @@ var stopPushLocalStream = /*#__PURE__*/function () {
36733
36809
  if ((type === 'both' || type === 'video') && videoTrack) {
36734
36810
  tracks.push(videoTrack);
36735
36811
  }
36736
- _context28.next = 11;
36812
+ _context29.next = 11;
36737
36813
  return client.unpublish(tracks);
36738
36814
  case 11:
36739
36815
  case "end":
36740
- return _context28.stop();
36816
+ return _context29.stop();
36741
36817
  }
36742
- }, _callee28);
36818
+ }, _callee29);
36743
36819
  }));
36744
36820
  return function stopPushLocalStream(_x30) {
36745
- return _ref28.apply(this, arguments);
36821
+ return _ref29.apply(this, arguments);
36746
36822
  };
36747
36823
  }();
36748
36824
  var startPushScreenStream = /*#__PURE__*/function () {
36749
- var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
36825
+ var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
36750
36826
  var roomId, client;
36751
- return regenerator.wrap(function _callee29$(_context29) {
36752
- while (1) switch (_context29.prev = _context29.next) {
36827
+ return regenerator.wrap(function _callee30$(_context30) {
36828
+ while (1) switch (_context30.prev = _context30.next) {
36753
36829
  case 0:
36754
36830
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream');
36755
36831
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
36756
36832
  client = clients.get(roomId);
36757
36833
  if (client) {
36758
- _context29.next = 7;
36834
+ _context30.next = 7;
36759
36835
  break;
36760
36836
  }
36761
36837
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - init first', null, 'error');
@@ -36763,53 +36839,53 @@ var startPushScreenStream = /*#__PURE__*/function () {
36763
36839
  throw new Error('avsdk TALRTC::startPushScreenStream - init first');
36764
36840
  case 7:
36765
36841
  if (!screenTrack) {
36766
- _context29.next = 11;
36842
+ _context30.next = 11;
36767
36843
  break;
36768
36844
  }
36769
36845
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - end');
36770
- _context29.next = 11;
36846
+ _context30.next = 11;
36771
36847
  return client.publish(screenTrack);
36772
36848
  case 11:
36773
36849
  case "end":
36774
- return _context29.stop();
36850
+ return _context30.stop();
36775
36851
  }
36776
- }, _callee29);
36852
+ }, _callee30);
36777
36853
  }));
36778
36854
  return function startPushScreenStream() {
36779
- return _ref29.apply(this, arguments);
36855
+ return _ref30.apply(this, arguments);
36780
36856
  };
36781
36857
  }();
36782
36858
  var stopPushScreenStream = /*#__PURE__*/function () {
36783
- var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
36859
+ var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
36784
36860
  var roomId, client;
36785
- return regenerator.wrap(function _callee30$(_context30) {
36786
- while (1) switch (_context30.prev = _context30.next) {
36861
+ return regenerator.wrap(function _callee31$(_context31) {
36862
+ while (1) switch (_context31.prev = _context31.next) {
36787
36863
  case 0:
36788
36864
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream');
36789
36865
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
36790
36866
  client = clients.get(roomId);
36791
36867
  if (client) {
36792
- _context30.next = 6;
36868
+ _context31.next = 6;
36793
36869
  break;
36794
36870
  }
36795
36871
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - init first', null, 'error');
36796
36872
  throw new Error('avsdk TALRTC::stopPushScreenStream - init first');
36797
36873
  case 6:
36798
36874
  if (!screenTrack) {
36799
- _context30.next = 10;
36875
+ _context31.next = 10;
36800
36876
  break;
36801
36877
  }
36802
36878
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - end');
36803
- _context30.next = 10;
36879
+ _context31.next = 10;
36804
36880
  return client.unpublish(screenTrack);
36805
36881
  case 10:
36806
36882
  case "end":
36807
- return _context30.stop();
36883
+ return _context31.stop();
36808
36884
  }
36809
- }, _callee30);
36885
+ }, _callee31);
36810
36886
  }));
36811
36887
  return function stopPushScreenStream() {
36812
- return _ref30.apply(this, arguments);
36888
+ return _ref31.apply(this, arguments);
36813
36889
  };
36814
36890
  }();
36815
36891
  /**
@@ -36818,9 +36894,9 @@ var stopPushScreenStream = /*#__PURE__*/function () {
36818
36894
  * @return Promise | void
36819
36895
  */
36820
36896
  var startPush = /*#__PURE__*/function () {
36821
- var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31(streamId) {
36822
- return regenerator.wrap(function _callee31$(_context31) {
36823
- while (1) switch (_context31.prev = _context31.next) {
36897
+ var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId) {
36898
+ return regenerator.wrap(function _callee32$(_context32) {
36899
+ while (1) switch (_context32.prev = _context32.next) {
36824
36900
  case 0:
36825
36901
  if (!streamId) {
36826
36902
  streamId = localStreamId$1;
@@ -36833,22 +36909,22 @@ var startPush = /*#__PURE__*/function () {
36833
36909
  }
36834
36910
  } catch (error) {}
36835
36911
  if (!(streamId === screenStreamId$1)) {
36836
- _context31.next = 9;
36912
+ _context32.next = 9;
36837
36913
  break;
36838
36914
  }
36839
- _context31.next = 6;
36915
+ _context32.next = 6;
36840
36916
  return startScreenCapture();
36841
36917
  case 6:
36842
- _context31.next = 8;
36918
+ _context32.next = 8;
36843
36919
  return startPushScreenStream();
36844
36920
  case 8:
36845
36921
  isScreenSharing = true;
36846
36922
  case 9:
36847
36923
  if (!(streamId === localStreamId$1)) {
36848
- _context31.next = 13;
36924
+ _context32.next = 13;
36849
36925
  break;
36850
36926
  }
36851
- _context31.next = 12;
36927
+ _context32.next = 12;
36852
36928
  return startPushLocalStream('both');
36853
36929
  case 12:
36854
36930
  isPublishing = true;
@@ -36859,12 +36935,12 @@ var startPush = /*#__PURE__*/function () {
36859
36935
  });
36860
36936
  case 14:
36861
36937
  case "end":
36862
- return _context31.stop();
36938
+ return _context32.stop();
36863
36939
  }
36864
- }, _callee31);
36940
+ }, _callee32);
36865
36941
  }));
36866
36942
  return function startPush(_x31) {
36867
- return _ref31.apply(this, arguments);
36943
+ return _ref32.apply(this, arguments);
36868
36944
  };
36869
36945
  }();
36870
36946
 
@@ -36874,41 +36950,41 @@ var startPush = /*#__PURE__*/function () {
36874
36950
  * @return Promise | void
36875
36951
  */
36876
36952
  var stopPush = /*#__PURE__*/function () {
36877
- var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId) {
36878
- return regenerator.wrap(function _callee32$(_context32) {
36879
- while (1) switch (_context32.prev = _context32.next) {
36953
+ var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId) {
36954
+ return regenerator.wrap(function _callee33$(_context33) {
36955
+ while (1) switch (_context33.prev = _context33.next) {
36880
36956
  case 0:
36881
36957
  if (!streamId) {
36882
36958
  streamId = localStreamId$1;
36883
36959
  }
36884
36960
  defaultApi$1.writeLog("avsdk TALRTC::stopPush streamId: ".concat(streamId));
36885
36961
  if (!(streamId === screenStreamId$1 && screenTrack)) {
36886
- _context32.next = 8;
36962
+ _context33.next = 8;
36887
36963
  break;
36888
36964
  }
36889
36965
  screenTrack.close();
36890
- _context32.next = 6;
36966
+ _context33.next = 6;
36891
36967
  return stopPushScreenStream();
36892
36968
  case 6:
36893
36969
  isScreenSharing = false;
36894
36970
  screenTrack = null;
36895
36971
  case 8:
36896
36972
  if (!(streamId === localStreamId$1)) {
36897
- _context32.next = 12;
36973
+ _context33.next = 12;
36898
36974
  break;
36899
36975
  }
36900
- _context32.next = 11;
36976
+ _context33.next = 11;
36901
36977
  return stopPushLocalStream('both');
36902
36978
  case 11:
36903
36979
  isPublishing = false;
36904
36980
  case 12:
36905
36981
  case "end":
36906
- return _context32.stop();
36982
+ return _context33.stop();
36907
36983
  }
36908
- }, _callee32);
36984
+ }, _callee33);
36909
36985
  }));
36910
36986
  return function stopPush(_x32) {
36911
- return _ref32.apply(this, arguments);
36987
+ return _ref33.apply(this, arguments);
36912
36988
  };
36913
36989
  }();
36914
36990
 
@@ -36918,27 +36994,27 @@ var stopPush = /*#__PURE__*/function () {
36918
36994
  * @return Promise | void
36919
36995
  */
36920
36996
  var muteLocalAudio = /*#__PURE__*/function () {
36921
- var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(mute) {
36922
- return regenerator.wrap(function _callee33$(_context33) {
36923
- while (1) switch (_context33.prev = _context33.next) {
36997
+ var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(mute) {
36998
+ return regenerator.wrap(function _callee34$(_context34) {
36999
+ while (1) switch (_context34.prev = _context34.next) {
36924
37000
  case 0:
36925
37001
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalAudio mute: ".concat(mute));
36926
37002
  if (!audioTrack) {
36927
- _context33.next = 4;
37003
+ _context34.next = 4;
36928
37004
  break;
36929
37005
  }
36930
- _context33.next = 4;
37006
+ _context34.next = 4;
36931
37007
  return audioTrack.setMuted(mute);
36932
37008
  case 4:
36933
37009
  localStreamMuteStatus.audio = mute;
36934
37010
  case 5:
36935
37011
  case "end":
36936
- return _context33.stop();
37012
+ return _context34.stop();
36937
37013
  }
36938
- }, _callee33);
37014
+ }, _callee34);
36939
37015
  }));
36940
37016
  return function muteLocalAudio(_x33) {
36941
- return _ref33.apply(this, arguments);
37017
+ return _ref34.apply(this, arguments);
36942
37018
  };
36943
37019
  }();
36944
37020
 
@@ -36948,27 +37024,27 @@ var muteLocalAudio = /*#__PURE__*/function () {
36948
37024
  * @return Promise | void
36949
37025
  */
36950
37026
  var muteLocalVideo = /*#__PURE__*/function () {
36951
- var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(mute) {
36952
- return regenerator.wrap(function _callee34$(_context34) {
36953
- while (1) switch (_context34.prev = _context34.next) {
37027
+ var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(mute) {
37028
+ return regenerator.wrap(function _callee35$(_context35) {
37029
+ while (1) switch (_context35.prev = _context35.next) {
36954
37030
  case 0:
36955
37031
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalVideo mute: ".concat(mute));
36956
37032
  if (!videoTrack) {
36957
- _context34.next = 4;
37033
+ _context35.next = 4;
36958
37034
  break;
36959
37035
  }
36960
- _context34.next = 4;
37036
+ _context35.next = 4;
36961
37037
  return videoTrack.setMuted(mute);
36962
37038
  case 4:
36963
37039
  localStreamMuteStatus.video = mute;
36964
37040
  case 5:
36965
37041
  case "end":
36966
- return _context34.stop();
37042
+ return _context35.stop();
36967
37043
  }
36968
- }, _callee34);
37044
+ }, _callee35);
36969
37045
  }));
36970
37046
  return function muteLocalVideo(_x34) {
36971
- return _ref34.apply(this, arguments);
37047
+ return _ref35.apply(this, arguments);
36972
37048
  };
36973
37049
  }();
36974
37050
 
@@ -37000,51 +37076,51 @@ var removePublishStreamUrl = function removePublishStreamUrl(url) {
37000
37076
  * @return {Promise} Promise | void
37001
37077
  */
37002
37078
  var startPlay = /*#__PURE__*/function () {
37003
- var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(streamId, muteAudio, muteVideo) {
37004
- return regenerator.wrap(function _callee35$(_context35) {
37005
- while (1) switch (_context35.prev = _context35.next) {
37079
+ var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, muteAudio, muteVideo) {
37080
+ return regenerator.wrap(function _callee36$(_context36) {
37081
+ while (1) switch (_context36.prev = _context36.next) {
37006
37082
  case 0:
37007
37083
  if (muteAudio) {
37008
- _context35.next = 8;
37084
+ _context36.next = 8;
37009
37085
  break;
37010
37086
  }
37011
37087
  if (!(streamId.split('_').length === 4)) {
37012
- _context35.next = 6;
37088
+ _context36.next = 6;
37013
37089
  break;
37014
37090
  }
37015
- _context35.next = 4;
37091
+ _context36.next = 4;
37016
37092
  return muteRemoteAudio(streamId, false);
37017
37093
  case 4:
37018
- _context35.next = 8;
37094
+ _context36.next = 8;
37019
37095
  break;
37020
37096
  case 6:
37021
- _context35.next = 8;
37097
+ _context36.next = 8;
37022
37098
  return muteRemoteScreenAudio(streamId, false);
37023
37099
  case 8:
37024
37100
  if (muteVideo) {
37025
- _context35.next = 16;
37101
+ _context36.next = 16;
37026
37102
  break;
37027
37103
  }
37028
37104
  if (!(streamId.split('_').length === 4)) {
37029
- _context35.next = 14;
37105
+ _context36.next = 14;
37030
37106
  break;
37031
37107
  }
37032
- _context35.next = 12;
37108
+ _context36.next = 12;
37033
37109
  return muteRemoteVideo(streamId, false);
37034
37110
  case 12:
37035
- _context35.next = 16;
37111
+ _context36.next = 16;
37036
37112
  break;
37037
37113
  case 14:
37038
- _context35.next = 16;
37114
+ _context36.next = 16;
37039
37115
  return muteRemoteScreenVideo(streamId, false);
37040
37116
  case 16:
37041
37117
  case "end":
37042
- return _context35.stop();
37118
+ return _context36.stop();
37043
37119
  }
37044
- }, _callee35);
37120
+ }, _callee36);
37045
37121
  }));
37046
37122
  return function startPlay(_x35, _x36, _x37) {
37047
- return _ref35.apply(this, arguments);
37123
+ return _ref36.apply(this, arguments);
37048
37124
  };
37049
37125
  }();
37050
37126
  /**
@@ -37053,37 +37129,37 @@ var startPlay = /*#__PURE__*/function () {
37053
37129
  * @return Promise | void
37054
37130
  */
37055
37131
  var stopPlay = /*#__PURE__*/function () {
37056
- var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId) {
37057
- return regenerator.wrap(function _callee36$(_context36) {
37058
- while (1) switch (_context36.prev = _context36.next) {
37132
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId) {
37133
+ return regenerator.wrap(function _callee37$(_context37) {
37134
+ while (1) switch (_context37.prev = _context37.next) {
37059
37135
  case 0:
37060
37136
  defaultApi$1.writeLog("avsdk TALRTC::stopPlay streamId: ".concat(streamId));
37061
37137
  if (!(streamId.split('_').length === 4)) {
37062
- _context36.next = 8;
37138
+ _context37.next = 8;
37063
37139
  break;
37064
37140
  }
37065
- _context36.next = 4;
37141
+ _context37.next = 4;
37066
37142
  return muteRemoteAudio(streamId, true);
37067
37143
  case 4:
37068
- _context36.next = 6;
37144
+ _context37.next = 6;
37069
37145
  return muteRemoteVideo(streamId, true);
37070
37146
  case 6:
37071
- _context36.next = 12;
37147
+ _context37.next = 12;
37072
37148
  break;
37073
37149
  case 8:
37074
- _context36.next = 10;
37150
+ _context37.next = 10;
37075
37151
  return muteRemoteScreenAudio(streamId, true);
37076
37152
  case 10:
37077
- _context36.next = 12;
37153
+ _context37.next = 12;
37078
37154
  return muteRemoteScreenVideo(streamId, true);
37079
37155
  case 12:
37080
37156
  case "end":
37081
- return _context36.stop();
37157
+ return _context37.stop();
37082
37158
  }
37083
- }, _callee36);
37159
+ }, _callee37);
37084
37160
  }));
37085
37161
  return function stopPlay(_x38) {
37086
- return _ref36.apply(this, arguments);
37162
+ return _ref37.apply(this, arguments);
37087
37163
  };
37088
37164
  }();
37089
37165
  /**
@@ -37095,9 +37171,9 @@ var stopPlay = /*#__PURE__*/function () {
37095
37171
  * @return src:String 视频预览地址
37096
37172
  */
37097
37173
  var initPullFlow$1 = /*#__PURE__*/function () {
37098
- var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
37099
- return regenerator.wrap(function _callee37$(_context37) {
37100
- while (1) switch (_context37.prev = _context37.next) {
37174
+ var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
37175
+ return regenerator.wrap(function _callee38$(_context38) {
37176
+ while (1) switch (_context38.prev = _context38.next) {
37101
37177
  case 0:
37102
37178
  defaultApi$1.writeLog("TALRTC::initPullFlow_start , streamId :".concat(streamId, ", notAutoPlay: ").concat(notAutoPlay, ", audioOnly: ").concat(muteVideo));
37103
37179
  resetStreamIdRtcPlayerInfo1$1(streamId);
@@ -37108,28 +37184,28 @@ var initPullFlow$1 = /*#__PURE__*/function () {
37108
37184
  heartBeatDataReport$1('start');
37109
37185
  }
37110
37186
  } catch (error) {}
37111
- _context37.next = 6;
37187
+ _context38.next = 6;
37112
37188
  return startPlay(streamId, muteAudio, muteVideo);
37113
37189
  case 6:
37114
37190
  if (notAutoPlay) {
37115
- _context37.next = 9;
37191
+ _context38.next = 9;
37116
37192
  break;
37117
37193
  }
37118
- _context37.next = 9;
37194
+ _context38.next = 9;
37119
37195
  return startLocalOrRemotePreview$1(false, streamId, domId);
37120
37196
  case 9:
37121
- return _context37.abrupt("return", {
37197
+ return _context38.abrupt("return", {
37122
37198
  videoSrc: '',
37123
37199
  playerId: 0
37124
37200
  });
37125
37201
  case 10:
37126
37202
  case "end":
37127
- return _context37.stop();
37203
+ return _context38.stop();
37128
37204
  }
37129
- }, _callee37);
37205
+ }, _callee38);
37130
37206
  }));
37131
37207
  return function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
37132
- return _ref37.apply(this, arguments);
37208
+ return _ref38.apply(this, arguments);
37133
37209
  };
37134
37210
  }();
37135
37211
 
@@ -37139,42 +37215,42 @@ var initPullFlow$1 = /*#__PURE__*/function () {
37139
37215
  * @return Promise | void
37140
37216
  */
37141
37217
  var teacherStartLinkMic$1 = /*#__PURE__*/function () {
37142
- var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
37218
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
37143
37219
  var mode,
37144
- _args38 = arguments;
37145
- return regenerator.wrap(function _callee38$(_context38) {
37146
- while (1) switch (_context38.prev = _context38.next) {
37220
+ _args39 = arguments;
37221
+ return regenerator.wrap(function _callee39$(_context39) {
37222
+ while (1) switch (_context39.prev = _context39.next) {
37147
37223
  case 0:
37148
- mode = _args38.length > 0 && _args38[0] !== undefined ? _args38[0] : 0;
37149
- _context38.next = 3;
37224
+ mode = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : 0;
37225
+ _context39.next = 3;
37150
37226
  return startMicrophone$1();
37151
37227
  case 3:
37152
37228
  if (!(mode === 0)) {
37153
- _context38.next = 12;
37229
+ _context39.next = 12;
37154
37230
  break;
37155
37231
  }
37156
- _context38.next = 6;
37232
+ _context39.next = 6;
37157
37233
  return muteLocalVideo(true, localStreamId$1);
37158
37234
  case 6:
37159
- _context38.next = 8;
37235
+ _context39.next = 8;
37160
37236
  return setMicrophoneDevice$2({});
37161
37237
  case 8:
37162
- _context38.next = 10;
37238
+ _context39.next = 10;
37163
37239
  return muteLocalAudio(false);
37164
37240
  case 10:
37165
- _context38.next = 14;
37241
+ _context39.next = 14;
37166
37242
  break;
37167
37243
  case 12:
37168
- _context38.next = 14;
37244
+ _context39.next = 14;
37169
37245
  return muteLocalAudio(false);
37170
37246
  case 14:
37171
37247
  case "end":
37172
- return _context38.stop();
37248
+ return _context39.stop();
37173
37249
  }
37174
- }, _callee38);
37250
+ }, _callee39);
37175
37251
  }));
37176
37252
  return function teacherStartLinkMic() {
37177
- return _ref38.apply(this, arguments);
37253
+ return _ref39.apply(this, arguments);
37178
37254
  };
37179
37255
  }();
37180
37256
 
@@ -37184,36 +37260,36 @@ var teacherStartLinkMic$1 = /*#__PURE__*/function () {
37184
37260
  * @return Promise | void
37185
37261
  */
37186
37262
  var teacherStopLinkMic$1 = /*#__PURE__*/function () {
37187
- var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
37263
+ var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
37188
37264
  var mode,
37189
- _args39 = arguments;
37190
- return regenerator.wrap(function _callee39$(_context39) {
37191
- while (1) switch (_context39.prev = _context39.next) {
37265
+ _args40 = arguments;
37266
+ return regenerator.wrap(function _callee40$(_context40) {
37267
+ while (1) switch (_context40.prev = _context40.next) {
37192
37268
  case 0:
37193
- mode = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : 0;
37194
- _context39.next = 3;
37269
+ mode = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : 0;
37270
+ _context40.next = 3;
37195
37271
  return stopMicrophone$1();
37196
37272
  case 3:
37197
37273
  if (!(mode === 0)) {
37198
- _context39.next = 8;
37274
+ _context40.next = 8;
37199
37275
  break;
37200
37276
  }
37201
- _context39.next = 6;
37277
+ _context40.next = 6;
37202
37278
  return muteLocalAudio(true);
37203
37279
  case 6:
37204
- _context39.next = 10;
37280
+ _context40.next = 10;
37205
37281
  break;
37206
37282
  case 8:
37207
- _context39.next = 10;
37283
+ _context40.next = 10;
37208
37284
  return setSystemAudioLoopback(false);
37209
37285
  case 10:
37210
37286
  case "end":
37211
- return _context39.stop();
37287
+ return _context40.stop();
37212
37288
  }
37213
- }, _callee39);
37289
+ }, _callee40);
37214
37290
  }));
37215
37291
  return function teacherStopLinkMic() {
37216
- return _ref39.apply(this, arguments);
37292
+ return _ref40.apply(this, arguments);
37217
37293
  };
37218
37294
  }();
37219
37295
 
@@ -37225,26 +37301,26 @@ var stopPlayAll = function stopPlayAll() {
37225
37301
  return callMethod('StopPlayAll', {});
37226
37302
  };
37227
37303
  var playerSnapShot$1 = /*#__PURE__*/function () {
37228
- var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId) {
37229
- return regenerator.wrap(function _callee40$(_context40) {
37230
- while (1) switch (_context40.prev = _context40.next) {
37304
+ var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId) {
37305
+ return regenerator.wrap(function _callee41$(_context41) {
37306
+ while (1) switch (_context41.prev = _context41.next) {
37231
37307
  case 0:
37232
37308
  defaultApi$1.writeLog("avsdk TALRTC::playerSnapShot streamId: ".concat(streamId));
37233
37309
  if (!(streamId === localStreamId$1)) {
37234
- _context40.next = 5;
37310
+ _context41.next = 5;
37235
37311
  break;
37236
37312
  }
37237
- return _context40.abrupt("return", videoTrack.getCurrentFrameData());
37313
+ return _context41.abrupt("return", videoTrack.getCurrentFrameData());
37238
37314
  case 5:
37239
- return _context40.abrupt("return", screenTrack.getCurrentFrameData());
37315
+ return _context41.abrupt("return", screenTrack.getCurrentFrameData());
37240
37316
  case 6:
37241
37317
  case "end":
37242
- return _context40.stop();
37318
+ return _context41.stop();
37243
37319
  }
37244
- }, _callee40);
37320
+ }, _callee41);
37245
37321
  }));
37246
37322
  return function playerSnapShot(_x45) {
37247
- return _ref40.apply(this, arguments);
37323
+ return _ref41.apply(this, arguments);
37248
37324
  };
37249
37325
  }();
37250
37326
  /**
@@ -37255,22 +37331,22 @@ var playerSnapShot$1 = /*#__PURE__*/function () {
37255
37331
  * @return Promise | void
37256
37332
  */
37257
37333
  var changePullFlow = /*#__PURE__*/function () {
37258
- var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, toStreamId, toDomId) {
37259
- return regenerator.wrap(function _callee41$(_context41) {
37260
- while (1) switch (_context41.prev = _context41.next) {
37334
+ var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, toStreamId, toDomId) {
37335
+ return regenerator.wrap(function _callee42$(_context42) {
37336
+ while (1) switch (_context42.prev = _context42.next) {
37261
37337
  case 0:
37262
- _context41.next = 2;
37338
+ _context42.next = 2;
37263
37339
  return stopPlay(streamId);
37264
37340
  case 2:
37265
- return _context41.abrupt("return", initPullFlow$1(toStreamId, toDomId));
37341
+ return _context42.abrupt("return", initPullFlow$1(toStreamId, toDomId));
37266
37342
  case 3:
37267
37343
  case "end":
37268
- return _context41.stop();
37344
+ return _context42.stop();
37269
37345
  }
37270
- }, _callee41);
37346
+ }, _callee42);
37271
37347
  }));
37272
37348
  return function changePullFlow(_x46, _x47, _x48) {
37273
- return _ref41.apply(this, arguments);
37349
+ return _ref42.apply(this, arguments);
37274
37350
  };
37275
37351
  }();
37276
37352
 
@@ -37344,10 +37420,10 @@ var setPlayViewMirror$1 = function setPlayViewMirror(isMirror, id) {
37344
37420
  * @return Promise | void
37345
37421
  */
37346
37422
  var muteRemoteAudio = /*#__PURE__*/function () {
37347
- var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, mute) {
37423
+ var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, mute) {
37348
37424
  var _streamId$split3, _streamId$split4, roomId, userId, numberUserId, client, user, track;
37349
- return regenerator.wrap(function _callee42$(_context42) {
37350
- while (1) switch (_context42.prev = _context42.next) {
37425
+ return regenerator.wrap(function _callee43$(_context43) {
37426
+ while (1) switch (_context43.prev = _context43.next) {
37351
37427
  case 0:
37352
37428
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
37353
37429
  _streamId$split3 = streamId.split('_'), _streamId$split4 = _slicedToArray(_streamId$split3, 3), roomId = _streamId$split4[1], userId = _streamId$split4[2];
@@ -37355,43 +37431,43 @@ var muteRemoteAudio = /*#__PURE__*/function () {
37355
37431
  client = clients.get(roomId);
37356
37432
  user = users.get("".concat(roomId, "_").concat(numberUserId));
37357
37433
  if (client) {
37358
- _context42.next = 8;
37434
+ _context43.next = 8;
37359
37435
  break;
37360
37436
  }
37361
37437
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId), null, 'error');
37362
37438
  throw new Error("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId));
37363
37439
  case 8:
37364
37440
  if (user) {
37365
- _context42.next = 12;
37441
+ _context43.next = 12;
37366
37442
  break;
37367
37443
  }
37368
37444
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no user found ".concat(roomId));
37369
37445
  users.set("".concat(roomId, "_").concat(numberUserId), new User(!mute, false, userId));
37370
- return _context42.abrupt("return");
37446
+ return _context43.abrupt("return");
37371
37447
  case 12:
37372
37448
  user.userId = userId;
37373
37449
  user.subAudio = !mute;
37374
37450
  if (!(!user.rtcUser || !user.rtcUser.hasAudio)) {
37375
- _context42.next = 17;
37451
+ _context43.next = 17;
37376
37452
  break;
37377
37453
  }
37378
37454
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - user:".concat(userId, " has not be published"));
37379
- return _context42.abrupt("return");
37455
+ return _context43.abrupt("return");
37380
37456
  case 17:
37381
37457
  if (!mute) {
37382
- _context42.next = 22;
37458
+ _context43.next = 22;
37383
37459
  break;
37384
37460
  }
37385
- _context42.next = 20;
37461
+ _context43.next = 20;
37386
37462
  return client.unsubscribe(user.mainStreamId, 'audio');
37387
37463
  case 20:
37388
- _context42.next = 28;
37464
+ _context43.next = 28;
37389
37465
  break;
37390
37466
  case 22:
37391
- _context42.next = 24;
37467
+ _context43.next = 24;
37392
37468
  return client.subscribe(user.mainStreamId, 'audio');
37393
37469
  case 24:
37394
- track = _context42.sent;
37470
+ track = _context43.sent;
37395
37471
  track.setVolume(speakerVolume$1);
37396
37472
  track.once('first-frame-decoded', function () {
37397
37473
  NOTICE.firstAudioSize({
@@ -37402,12 +37478,12 @@ var muteRemoteAudio = /*#__PURE__*/function () {
37402
37478
  track.play();
37403
37479
  case 28:
37404
37480
  case "end":
37405
- return _context42.stop();
37481
+ return _context43.stop();
37406
37482
  }
37407
- }, _callee42);
37483
+ }, _callee43);
37408
37484
  }));
37409
37485
  return function muteRemoteAudio(_x49, _x50) {
37410
- return _ref42.apply(this, arguments);
37486
+ return _ref43.apply(this, arguments);
37411
37487
  };
37412
37488
  }();
37413
37489
 
@@ -37418,10 +37494,10 @@ var muteRemoteAudio = /*#__PURE__*/function () {
37418
37494
  * @return Promise | void
37419
37495
  */
37420
37496
  var muteRemoteVideo = /*#__PURE__*/function () {
37421
- var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, mute) {
37497
+ var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
37422
37498
  var _streamId$split5, _streamId$split6, roomId, userId, numberUserId, client, user, track;
37423
- return regenerator.wrap(function _callee43$(_context43) {
37424
- while (1) switch (_context43.prev = _context43.next) {
37499
+ return regenerator.wrap(function _callee44$(_context44) {
37500
+ while (1) switch (_context44.prev = _context44.next) {
37425
37501
  case 0:
37426
37502
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
37427
37503
  _streamId$split5 = streamId.split('_'), _streamId$split6 = _slicedToArray(_streamId$split5, 3), roomId = _streamId$split6[1], userId = _streamId$split6[2];
@@ -37429,44 +37505,44 @@ var muteRemoteVideo = /*#__PURE__*/function () {
37429
37505
  client = clients.get(roomId);
37430
37506
  user = users.get("".concat(roomId, "_").concat(numberUserId));
37431
37507
  if (client) {
37432
- _context43.next = 8;
37508
+ _context44.next = 8;
37433
37509
  break;
37434
37510
  }
37435
37511
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId), null, 'error');
37436
37512
  throw new Error("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId));
37437
37513
  case 8:
37438
37514
  if (user) {
37439
- _context43.next = 12;
37515
+ _context44.next = 12;
37440
37516
  break;
37441
37517
  }
37442
37518
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no user found ".concat(roomId));
37443
37519
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, !mute, userId));
37444
- return _context43.abrupt("return");
37520
+ return _context44.abrupt("return");
37445
37521
  case 12:
37446
37522
  user.userId = userId;
37447
37523
  user.subVideo = !mute;
37448
37524
  if (!(!user.rtcUser || !user.rtcUser.hasVideo)) {
37449
- _context43.next = 17;
37525
+ _context44.next = 17;
37450
37526
  break;
37451
37527
  }
37452
37528
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - user:".concat(userId, " has not be published"));
37453
- return _context43.abrupt("return");
37529
+ return _context44.abrupt("return");
37454
37530
  case 17:
37455
37531
  if (!mute) {
37456
- _context43.next = 23;
37532
+ _context44.next = 23;
37457
37533
  break;
37458
37534
  }
37459
37535
  user.rtcUser.videoTrack && user.rtcUser.videoTrack.stop();
37460
- _context43.next = 21;
37536
+ _context44.next = 21;
37461
37537
  return client.unsubscribe(user.mainStreamId, 'video');
37462
37538
  case 21:
37463
- _context43.next = 28;
37539
+ _context44.next = 28;
37464
37540
  break;
37465
37541
  case 23:
37466
- _context43.next = 25;
37542
+ _context44.next = 25;
37467
37543
  return client.subscribe(user.mainStreamId, 'video');
37468
37544
  case 25:
37469
- track = _context43.sent;
37545
+ track = _context44.sent;
37470
37546
  track.once('first-frame-decoded', function () {
37471
37547
  NOTICE.firstVideoSize({
37472
37548
  streamId: streamId,
@@ -37480,12 +37556,12 @@ var muteRemoteVideo = /*#__PURE__*/function () {
37480
37556
  }
37481
37557
  case 28:
37482
37558
  case "end":
37483
- return _context43.stop();
37559
+ return _context44.stop();
37484
37560
  }
37485
- }, _callee43);
37561
+ }, _callee44);
37486
37562
  }));
37487
37563
  return function muteRemoteVideo(_x51, _x52) {
37488
- return _ref43.apply(this, arguments);
37564
+ return _ref44.apply(this, arguments);
37489
37565
  };
37490
37566
  }();
37491
37567
 
@@ -37496,10 +37572,10 @@ var muteRemoteVideo = /*#__PURE__*/function () {
37496
37572
  * @return Promise | void
37497
37573
  */
37498
37574
  var muteRemoteScreenAudio = /*#__PURE__*/function () {
37499
- var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
37575
+ var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
37500
37576
  var _streamId$split7, _streamId$split8, roomId, userId, numberUserId, client, user, track;
37501
- return regenerator.wrap(function _callee44$(_context44) {
37502
- while (1) switch (_context44.prev = _context44.next) {
37577
+ return regenerator.wrap(function _callee45$(_context45) {
37578
+ while (1) switch (_context45.prev = _context45.next) {
37503
37579
  case 0:
37504
37580
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
37505
37581
  _streamId$split7 = streamId.split('_'), _streamId$split8 = _slicedToArray(_streamId$split7, 3), roomId = _streamId$split8[1], userId = _streamId$split8[2];
@@ -37507,43 +37583,43 @@ var muteRemoteScreenAudio = /*#__PURE__*/function () {
37507
37583
  client = clients.get(roomId);
37508
37584
  user = users.get("".concat(roomId, "_").concat(numberUserId));
37509
37585
  if (client) {
37510
- _context44.next = 8;
37586
+ _context45.next = 8;
37511
37587
  break;
37512
37588
  }
37513
37589
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId), null, 'error');
37514
37590
  throw new Error("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId));
37515
37591
  case 8:
37516
37592
  if (user) {
37517
- _context44.next = 12;
37593
+ _context45.next = 12;
37518
37594
  break;
37519
37595
  }
37520
37596
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no user found ".concat(roomId));
37521
37597
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenAudio = !mute);
37522
- return _context44.abrupt("return");
37598
+ return _context45.abrupt("return");
37523
37599
  case 12:
37524
37600
  user.userId = userId;
37525
37601
  user.subScreenAudio = !mute;
37526
37602
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
37527
- _context44.next = 17;
37603
+ _context45.next = 17;
37528
37604
  break;
37529
37605
  }
37530
37606
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - user:".concat(userId, " has not be published"));
37531
- return _context44.abrupt("return");
37607
+ return _context45.abrupt("return");
37532
37608
  case 17:
37533
37609
  if (!mute) {
37534
- _context44.next = 22;
37610
+ _context45.next = 22;
37535
37611
  break;
37536
37612
  }
37537
- _context44.next = 20;
37613
+ _context45.next = 20;
37538
37614
  return client.unsubscribe(user.screenStreamId, 'audio');
37539
37615
  case 20:
37540
- _context44.next = 28;
37616
+ _context45.next = 28;
37541
37617
  break;
37542
37618
  case 22:
37543
- _context44.next = 24;
37619
+ _context45.next = 24;
37544
37620
  return client.subscribe(user.screenStreamId, 'audio');
37545
37621
  case 24:
37546
- track = _context44.sent;
37622
+ track = _context45.sent;
37547
37623
  track.setVolume(speakerVolume$1);
37548
37624
  track.once('first-frame-decoded', function () {
37549
37625
  NOTICE.firstAudioSize({
@@ -37554,12 +37630,12 @@ var muteRemoteScreenAudio = /*#__PURE__*/function () {
37554
37630
  track.play();
37555
37631
  case 28:
37556
37632
  case "end":
37557
- return _context44.stop();
37633
+ return _context45.stop();
37558
37634
  }
37559
- }, _callee44);
37635
+ }, _callee45);
37560
37636
  }));
37561
37637
  return function muteRemoteScreenAudio(_x53, _x54) {
37562
- return _ref44.apply(this, arguments);
37638
+ return _ref45.apply(this, arguments);
37563
37639
  };
37564
37640
  }();
37565
37641
  /**
@@ -37569,10 +37645,10 @@ var muteRemoteScreenAudio = /*#__PURE__*/function () {
37569
37645
  * @return Promise | void
37570
37646
  */
37571
37647
  var muteRemoteScreenVideo = /*#__PURE__*/function () {
37572
- var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
37648
+ var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46(streamId, mute) {
37573
37649
  var _streamId$split9, _streamId$split10, roomId, userId, numberUserId, client, user, track;
37574
- return regenerator.wrap(function _callee45$(_context45) {
37575
- while (1) switch (_context45.prev = _context45.next) {
37650
+ return regenerator.wrap(function _callee46$(_context46) {
37651
+ while (1) switch (_context46.prev = _context46.next) {
37576
37652
  case 0:
37577
37653
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
37578
37654
  _streamId$split9 = streamId.split('_'), _streamId$split10 = _slicedToArray(_streamId$split9, 3), roomId = _streamId$split10[1], userId = _streamId$split10[2];
@@ -37580,44 +37656,44 @@ var muteRemoteScreenVideo = /*#__PURE__*/function () {
37580
37656
  client = clients.get(roomId);
37581
37657
  user = users.get("".concat(roomId, "_").concat(numberUserId));
37582
37658
  if (client) {
37583
- _context45.next = 8;
37659
+ _context46.next = 8;
37584
37660
  break;
37585
37661
  }
37586
37662
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId), null, 'error');
37587
37663
  throw new Error("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId));
37588
37664
  case 8:
37589
37665
  if (user) {
37590
- _context45.next = 12;
37666
+ _context46.next = 12;
37591
37667
  break;
37592
37668
  }
37593
37669
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no user found ".concat(roomId));
37594
37670
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenVideo = !mute);
37595
- return _context45.abrupt("return");
37671
+ return _context46.abrupt("return");
37596
37672
  case 12:
37597
37673
  user.userId = userId;
37598
37674
  user.subScreenVideo = !mute;
37599
37675
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
37600
- _context45.next = 17;
37676
+ _context46.next = 17;
37601
37677
  break;
37602
37678
  }
37603
37679
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - user:".concat(userId, " has not be published"));
37604
- return _context45.abrupt("return");
37680
+ return _context46.abrupt("return");
37605
37681
  case 17:
37606
37682
  if (!mute) {
37607
- _context45.next = 23;
37683
+ _context46.next = 23;
37608
37684
  break;
37609
37685
  }
37610
37686
  user.rtcUser.screenTrack && user.rtcUser.screenTrack.stop();
37611
- _context45.next = 21;
37687
+ _context46.next = 21;
37612
37688
  return client.unsubscribe(user.screenStreamId, 'video');
37613
37689
  case 21:
37614
- _context45.next = 28;
37690
+ _context46.next = 28;
37615
37691
  break;
37616
37692
  case 23:
37617
- _context45.next = 25;
37693
+ _context46.next = 25;
37618
37694
  return client.subscribe(user.screenStreamId, 'video');
37619
37695
  case 25:
37620
- track = _context45.sent;
37696
+ track = _context46.sent;
37621
37697
  track.once('first-frame-decoded', function () {
37622
37698
  NOTICE.firstVideoSize({
37623
37699
  streamId: streamId,
@@ -37631,32 +37707,32 @@ var muteRemoteScreenVideo = /*#__PURE__*/function () {
37631
37707
  }
37632
37708
  case 28:
37633
37709
  case "end":
37634
- return _context45.stop();
37710
+ return _context46.stop();
37635
37711
  }
37636
- }, _callee45);
37712
+ }, _callee46);
37637
37713
  }));
37638
37714
  return function muteRemoteScreenVideo(_x55, _x56) {
37639
- return _ref45.apply(this, arguments);
37715
+ return _ref46.apply(this, arguments);
37640
37716
  };
37641
37717
  }();
37642
37718
  //开启同屏
37643
37719
  var startMultiScreen$1 = /*#__PURE__*/function () {
37644
- var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
37645
- return regenerator.wrap(function _callee46$(_context46) {
37646
- while (1) switch (_context46.prev = _context46.next) {
37720
+ var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
37721
+ return regenerator.wrap(function _callee47$(_context47) {
37722
+ while (1) switch (_context47.prev = _context47.next) {
37647
37723
  case 0:
37648
37724
  defaultApi$1.writeLog('info', 'avsdk TALRTC::startMultiScreen');
37649
37725
  // await enableExternalVideoSource(true,1);
37650
- _context46.next = 3;
37726
+ _context47.next = 3;
37651
37727
  return LoadCollectionOutputEntry2();
37652
37728
  case 3:
37653
37729
  case "end":
37654
- return _context46.stop();
37730
+ return _context47.stop();
37655
37731
  }
37656
- }, _callee46);
37732
+ }, _callee47);
37657
37733
  }));
37658
37734
  return function startMultiScreen() {
37659
- return _ref46.apply(this, arguments);
37735
+ return _ref47.apply(this, arguments);
37660
37736
  };
37661
37737
  }();
37662
37738
 
@@ -37665,10 +37741,10 @@ var startMultiScreen$1 = /*#__PURE__*/function () {
37665
37741
  * @return Promise | void
37666
37742
  */
37667
37743
  var leaveRoom$1 = /*#__PURE__*/function () {
37668
- var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47(isChangeSDK) {
37744
+ var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48(isChangeSDK) {
37669
37745
  var key;
37670
- return regenerator.wrap(function _callee47$(_context47) {
37671
- while (1) switch (_context47.prev = _context47.next) {
37746
+ return regenerator.wrap(function _callee48$(_context48) {
37747
+ while (1) switch (_context48.prev = _context48.next) {
37672
37748
  case 0:
37673
37749
  if (!isChangeSDK) {
37674
37750
  globalVariables.localPreviewDomId = null;
@@ -37692,12 +37768,12 @@ var leaveRoom$1 = /*#__PURE__*/function () {
37692
37768
  streamIdRtcPlayerInfo1$1 = {};
37693
37769
  case 14:
37694
37770
  case "end":
37695
- return _context47.stop();
37771
+ return _context48.stop();
37696
37772
  }
37697
- }, _callee47);
37773
+ }, _callee48);
37698
37774
  }));
37699
37775
  return function leaveRoom(_x57) {
37700
- return _ref47.apply(this, arguments);
37776
+ return _ref48.apply(this, arguments);
37701
37777
  };
37702
37778
  }();
37703
37779
 
@@ -37725,19 +37801,19 @@ var unloadTalrtc = function unloadTalrtc() {
37725
37801
  * @returns {Promise<any>}
37726
37802
  */
37727
37803
  var startRecord = /*#__PURE__*/function () {
37728
- var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48(fileName, fileType, idx) {
37804
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(fileName, fileType, idx) {
37729
37805
  var streamId;
37730
- return regenerator.wrap(function _callee48$(_context48) {
37731
- while (1) switch (_context48.prev = _context48.next) {
37806
+ return regenerator.wrap(function _callee49$(_context49) {
37807
+ while (1) switch (_context49.prev = _context49.next) {
37732
37808
  case 0:
37733
37809
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
37734
37810
  defaultApi$1.writeLog("avsdk TALRTC::startRecord fileName: ".concat(fileName, ", fileType: ").concat(fileType, ", idx: ").concat(idx, ", streamId: ").concat(streamId));
37735
37811
  if (!(idx === 1 && !screenStreamId$1)) {
37736
- _context48.next = 5;
37812
+ _context49.next = 5;
37737
37813
  break;
37738
37814
  }
37739
37815
  defaultApi$1.writeLog('avsdk TALRTC::startRecord screenStreamId is null', null, 'error');
37740
- return _context48.abrupt("return");
37816
+ return _context49.abrupt("return");
37741
37817
  case 5:
37742
37818
  if (!fileName) {
37743
37819
  fileName = "".concat(streamId, "-").concat(util.currentTimeString().replace(/:/g, '-'));
@@ -37748,7 +37824,7 @@ var startRecord = /*#__PURE__*/function () {
37748
37824
  idx: idx,
37749
37825
  streamId: streamId
37750
37826
  });
37751
- return _context48.abrupt("return", callMethod('StartRecord', {
37827
+ return _context49.abrupt("return", callMethod('StartRecord', {
37752
37828
  streamId: streamId,
37753
37829
  recordType: 3,
37754
37830
  // 1:音频 2:视频 3:音视频
@@ -37757,12 +37833,12 @@ var startRecord = /*#__PURE__*/function () {
37757
37833
  }));
37758
37834
  case 8:
37759
37835
  case "end":
37760
- return _context48.stop();
37836
+ return _context49.stop();
37761
37837
  }
37762
- }, _callee48);
37838
+ }, _callee49);
37763
37839
  }));
37764
37840
  return function startRecord(_x58, _x59, _x60) {
37765
- return _ref48.apply(this, arguments);
37841
+ return _ref49.apply(this, arguments);
37766
37842
  };
37767
37843
  }();
37768
37844
  /**
@@ -37771,10 +37847,10 @@ var startRecord = /*#__PURE__*/function () {
37771
37847
  * @returns
37772
37848
  */
37773
37849
  var stopRecord = /*#__PURE__*/function () {
37774
- var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(idx) {
37850
+ var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(idx) {
37775
37851
  var streamId;
37776
- return regenerator.wrap(function _callee49$(_context49) {
37777
- while (1) switch (_context49.prev = _context49.next) {
37852
+ return regenerator.wrap(function _callee50$(_context50) {
37853
+ while (1) switch (_context50.prev = _context50.next) {
37778
37854
  case 0:
37779
37855
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
37780
37856
  defaultApi$1.writeLog("avsdk TALRTC::stopRecord idx: ".concat(idx, ", streamId: ").concat(streamId));
@@ -37782,17 +37858,17 @@ var stopRecord = /*#__PURE__*/function () {
37782
37858
  idx: idx,
37783
37859
  streamId: streamId
37784
37860
  });
37785
- return _context49.abrupt("return", callMethod('StopRecord', {
37861
+ return _context50.abrupt("return", callMethod('StopRecord', {
37786
37862
  streamId: streamId
37787
37863
  }));
37788
37864
  case 4:
37789
37865
  case "end":
37790
- return _context49.stop();
37866
+ return _context50.stop();
37791
37867
  }
37792
- }, _callee49);
37868
+ }, _callee50);
37793
37869
  }));
37794
37870
  return function stopRecord(_x61) {
37795
- return _ref49.apply(this, arguments);
37871
+ return _ref50.apply(this, arguments);
37796
37872
  };
37797
37873
  }();
37798
37874
  /**
@@ -37801,24 +37877,24 @@ var stopRecord = /*#__PURE__*/function () {
37801
37877
  * @returns
37802
37878
  */
37803
37879
  var startCapture = /*#__PURE__*/function () {
37804
- var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(idx) {
37880
+ var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
37805
37881
  var streamId;
37806
- return regenerator.wrap(function _callee50$(_context50) {
37807
- while (1) switch (_context50.prev = _context50.next) {
37882
+ return regenerator.wrap(function _callee51$(_context51) {
37883
+ while (1) switch (_context51.prev = _context51.next) {
37808
37884
  case 0:
37809
37885
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
37810
37886
  defaultApi$1.writeLog("avsdk TALRTC::startCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
37811
- return _context50.abrupt("return", callMethod('StartCapture', {
37887
+ return _context51.abrupt("return", callMethod('StartCapture', {
37812
37888
  streamId: streamId
37813
37889
  }));
37814
37890
  case 3:
37815
37891
  case "end":
37816
- return _context50.stop();
37892
+ return _context51.stop();
37817
37893
  }
37818
- }, _callee50);
37894
+ }, _callee51);
37819
37895
  }));
37820
37896
  return function startCapture(_x62) {
37821
- return _ref50.apply(this, arguments);
37897
+ return _ref51.apply(this, arguments);
37822
37898
  };
37823
37899
  }();
37824
37900
  /**
@@ -37827,24 +37903,24 @@ var startCapture = /*#__PURE__*/function () {
37827
37903
  * @returns
37828
37904
  */
37829
37905
  var stopCapture = /*#__PURE__*/function () {
37830
- var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
37906
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(idx) {
37831
37907
  var streamId;
37832
- return regenerator.wrap(function _callee51$(_context51) {
37833
- while (1) switch (_context51.prev = _context51.next) {
37908
+ return regenerator.wrap(function _callee52$(_context52) {
37909
+ while (1) switch (_context52.prev = _context52.next) {
37834
37910
  case 0:
37835
37911
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
37836
37912
  defaultApi$1.writeLog("avsdk TALRTC::stopCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
37837
- return _context51.abrupt("return", callMethod('StopCapture', {
37913
+ return _context52.abrupt("return", callMethod('StopCapture', {
37838
37914
  streamId: streamId
37839
37915
  }));
37840
37916
  case 3:
37841
37917
  case "end":
37842
- return _context51.stop();
37918
+ return _context52.stop();
37843
37919
  }
37844
- }, _callee51);
37920
+ }, _callee52);
37845
37921
  }));
37846
37922
  return function stopCapture(_x63) {
37847
- return _ref51.apply(this, arguments);
37923
+ return _ref52.apply(this, arguments);
37848
37924
  };
37849
37925
  }();
37850
37926
  var heartBeatRealKeys$1 = ['video_fps', 'video_bitrate', 'audio_fps', 'audio_bitrate'];
@@ -38132,6 +38208,7 @@ var talrtcsdk = {
38132
38208
  setCurrentMicrophoneVolume: setCurrentMicrophoneVolume,
38133
38209
  getCurrentMicrophoneVolume: getCurrentMicrophoneVolume,
38134
38210
  startLocalOrRemotePreview: startLocalOrRemotePreview$1,
38211
+ restartCaptureScreen: restartCaptureScreen$1,
38135
38212
  startDeviceCheckerPreview: startDeviceCheckerPreview$1,
38136
38213
  stopDeviceCheckerPreview: stopDeviceCheckerPreview,
38137
38214
  enableAudioSpeakerCapture: enableAudioSpeakerCapture,
@@ -38680,6 +38757,17 @@ var getOrLocateVideo$1 = function getOrLocateVideo$1(args) {
38680
38757
  return getOrLocateVideo(args.isLocal, args.streamId, args.domId);
38681
38758
  }
38682
38759
  };
38760
+ var restartCaptureScreen$2 = function restartCaptureScreen() {
38761
+ switch (window.zbztAVSDK_init_sdk_type) {
38762
+ case ZEGO:
38763
+ return zegosdk.restartCaptureScreen();
38764
+ case TALRTC:
38765
+ case NERTC:
38766
+ case VOLCRTC:
38767
+ default:
38768
+ return talrtcsdk.restartCaptureScreen();
38769
+ }
38770
+ };
38683
38771
  var startDeviceCheckerPreview$2 = function startDeviceCheckerPreview(streamId, domId) {
38684
38772
  switch (window.zbztAVSDK_init_sdk_type) {
38685
38773
  case ZEGO:
@@ -40462,6 +40550,7 @@ var zbztAVSDK = {
40462
40550
  setCameraDevice: setCameraDevice$2,
40463
40551
  openOrCloseCamera: openOrCloseCamera$2,
40464
40552
  getOrLocateVideo: getOrLocateVideo$1,
40553
+ restartCaptureScreen: restartCaptureScreen$2,
40465
40554
  startDeviceCheckerPreview: startDeviceCheckerPreview$2,
40466
40555
  stopDeviceCheckerPreview: stopDeviceCheckerPreview$1,
40467
40556
  getSpeakerDeviceList: getSpeakerDeviceList$3,
@@ -45053,45 +45142,61 @@ var zbztsdk = {
45053
45142
  }, _callee11);
45054
45143
  }))();
45055
45144
  },
45056
- deviceCheckerPreview: function deviceCheckerPreview(args) {
45145
+ restartCaptureScreen: function restartCaptureScreen() {
45057
45146
  return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee12() {
45058
- var streamId;
45059
45147
  return regenerator.wrap(function _callee12$(_context12) {
45060
45148
  while (1) switch (_context12.prev = _context12.next) {
45149
+ case 0:
45150
+ defaultApi$1.writeLog('sdk action : restartCaptureScreen');
45151
+ userFunc('restartCaptureScreen');
45152
+ _context12.next = 4;
45153
+ return zbztAVSDK.restartCaptureScreen();
45154
+ case 4:
45155
+ case "end":
45156
+ return _context12.stop();
45157
+ }
45158
+ }, _callee12);
45159
+ }))();
45160
+ },
45161
+ deviceCheckerPreview: function deviceCheckerPreview(args) {
45162
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee13() {
45163
+ var streamId;
45164
+ return regenerator.wrap(function _callee13$(_context13) {
45165
+ while (1) switch (_context13.prev = _context13.next) {
45061
45166
  case 0:
45062
45167
  defaultApi$1.writeLog("sdk action : deviceCheckerPreview --start args : ".concat(JSON.stringify(args)));
45063
45168
  userFunc('deviceCheckerPreview', args);
45064
45169
  streamId = args.streamId || args.userId && generateStreamId(args.userId, args.groupId);
45065
- _context12.next = 5;
45170
+ _context13.next = 5;
45066
45171
  return zbztAVSDK.startDeviceCheckerPreview(streamId, args.domId);
45067
45172
  case 5:
45068
45173
  case "end":
45069
- return _context12.stop();
45174
+ return _context13.stop();
45070
45175
  }
45071
- }, _callee12);
45176
+ }, _callee13);
45072
45177
  }))();
45073
45178
  },
45074
45179
  stopDeviceCheckerPreview: function stopDeviceCheckerPreview(args) {
45075
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee13() {
45076
- return regenerator.wrap(function _callee13$(_context13) {
45077
- while (1) switch (_context13.prev = _context13.next) {
45180
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee14() {
45181
+ return regenerator.wrap(function _callee14$(_context14) {
45182
+ while (1) switch (_context14.prev = _context14.next) {
45078
45183
  case 0:
45079
45184
  defaultApi$1.writeLog("sdk action : stopDeviceCheckerPreview --start args : ".concat(JSON.stringify(args)));
45080
45185
  userFunc('stopDeviceCheckerPreview', args);
45081
- _context13.next = 4;
45186
+ _context14.next = 4;
45082
45187
  return zbztAVSDK.stopDeviceCheckerPreview();
45083
45188
  case 4:
45084
45189
  case "end":
45085
- return _context13.stop();
45190
+ return _context14.stop();
45086
45191
  }
45087
- }, _callee13);
45192
+ }, _callee14);
45088
45193
  }))();
45089
45194
  },
45090
45195
  linkMicReport: function linkMicReport(args) {
45091
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee14() {
45196
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee15() {
45092
45197
  var name, pull_uid, trace_id, pull_uid1;
45093
- return regenerator.wrap(function _callee14$(_context14) {
45094
- while (1) switch (_context14.prev = _context14.next) {
45198
+ return regenerator.wrap(function _callee15$(_context15) {
45199
+ while (1) switch (_context15.prev = _context15.next) {
45095
45200
  case 0:
45096
45201
  defaultApi$1.writeLog("sdk action : linkMicReport args : ".concat(JSON.stringify(args)));
45097
45202
  name = args.name, pull_uid = args.pull_uid, trace_id = args.trace_id;
@@ -45108,9 +45213,9 @@ var zbztsdk = {
45108
45213
  ;
45109
45214
  case 6:
45110
45215
  case "end":
45111
- return _context14.stop();
45216
+ return _context15.stop();
45112
45217
  }
45113
- }, _callee14);
45218
+ }, _callee15);
45114
45219
  }))();
45115
45220
  },
45116
45221
  /**
@@ -45121,10 +45226,10 @@ var zbztsdk = {
45121
45226
  */
45122
45227
  startPushFlow: function startPushFlow(streamid, idx) {
45123
45228
  var _this4 = this;
45124
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee15() {
45229
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee16() {
45125
45230
  var initParams;
45126
- return regenerator.wrap(function _callee15$(_context15) {
45127
- while (1) switch (_context15.prev = _context15.next) {
45231
+ return regenerator.wrap(function _callee16$(_context16) {
45232
+ while (1) switch (_context16.prev = _context16.next) {
45128
45233
  case 0:
45129
45234
  defaultApi$1.writeLog("sdk action : startPushFlow streamId:".concat(streamid, " idx: ").concat(idx));
45130
45235
  userFunc('startPushFlow', {
@@ -45139,7 +45244,7 @@ var zbztsdk = {
45139
45244
  }) : dataReport$2.startPublish();
45140
45245
  } catch (e) {}
45141
45246
  ;
45142
- _context15.next = 7;
45247
+ _context16.next = 7;
45143
45248
  return zbztAVSDK.startPushFlow(streamid, idx);
45144
45249
  case 7:
45145
45250
  // 不重新推流此情况不适用,推流状态跟着设备开关情况改变,以下仅用作数据上报
@@ -45159,15 +45264,15 @@ var zbztsdk = {
45159
45264
  }
45160
45265
  case 10:
45161
45266
  case "end":
45162
- return _context15.stop();
45267
+ return _context16.stop();
45163
45268
  }
45164
- }, _callee15);
45269
+ }, _callee16);
45165
45270
  }))();
45166
45271
  },
45167
45272
  stopPushFlow: function stopPushFlow(idx, streamid) {
45168
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee16() {
45169
- return regenerator.wrap(function _callee16$(_context16) {
45170
- while (1) switch (_context16.prev = _context16.next) {
45273
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee17() {
45274
+ return regenerator.wrap(function _callee17$(_context17) {
45275
+ while (1) switch (_context17.prev = _context17.next) {
45171
45276
  case 0:
45172
45277
  defaultApi$1.writeLog("sdk action : stopPushFlow streamid:".concat(streamid, " idx:").concat(idx));
45173
45278
  userFunc('stopPushFlow', {
@@ -45175,7 +45280,7 @@ var zbztsdk = {
45175
45280
  streamid: streamid
45176
45281
  });
45177
45282
  userAndDeviceStatusInfo.isPushingFlow = false;
45178
- _context16.next = 5;
45283
+ _context17.next = 5;
45179
45284
  return zbztAVSDK.stopPushFlow(idx, streamid);
45180
45285
  case 5:
45181
45286
  try {
@@ -45194,27 +45299,27 @@ var zbztsdk = {
45194
45299
  }
45195
45300
  case 10:
45196
45301
  case "end":
45197
- return _context16.stop();
45302
+ return _context17.stop();
45198
45303
  }
45199
- }, _callee16);
45304
+ }, _callee17);
45200
45305
  }))();
45201
45306
  },
45202
45307
  initPullFlow: function initPullFlow(args) {
45203
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee17() {
45308
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee18() {
45204
45309
  var streamId, mute, audioOnly, streamType, result, _yield$result$videoSr, videoSrc, playerId;
45205
- return regenerator.wrap(function _callee17$(_context17) {
45206
- while (1) switch (_context17.prev = _context17.next) {
45310
+ return regenerator.wrap(function _callee18$(_context18) {
45311
+ while (1) switch (_context18.prev = _context18.next) {
45207
45312
  case 0:
45208
45313
  defaultApi$1.writeLog("sdk action : initPullFlow ,".concat(JSON.stringify(args)));
45209
45314
  userFunc('initPullFlow', args);
45210
45315
  streamId = args.streamId || generateStreamId(args.userId, args.groupId);
45211
45316
  if (!pullingStatus[streamId]) {
45212
- _context17.next = 7;
45317
+ _context18.next = 7;
45213
45318
  break;
45214
45319
  }
45215
45320
  defaultApi$1.writeLog("sdk action : initPullFlow - pulling, streamId : ".concat(streamId));
45216
45321
  userFunc('initPullFlow - pulling', args);
45217
- return _context17.abrupt("return");
45322
+ return _context18.abrupt("return");
45218
45323
  case 7:
45219
45324
  ;
45220
45325
  pullingStatus[streamId] = true;
@@ -45241,53 +45346,53 @@ var zbztsdk = {
45241
45346
  });
45242
45347
  } catch (e) {}
45243
45348
  ;
45244
- _context17.next = 18;
45349
+ _context18.next = 18;
45245
45350
  return result.videoSrc;
45246
45351
  case 18:
45247
- _yield$result$videoSr = _context17.sent;
45352
+ _yield$result$videoSr = _context18.sent;
45248
45353
  videoSrc = _yield$result$videoSr.videoSrc;
45249
45354
  playerId = _yield$result$videoSr.playerId;
45250
45355
  pullingStatus[streamId] = false;
45251
45356
  defaultApi$1.writeLog("sdk initPullFlow ".concat(JSON.stringify(args), ", streamId : ").concat(streamId, ", result :").concat(result.sdk_type, ": ").concat(videoSrc, " type:").concat(streamType, " playerId:").concat(playerId));
45252
45357
  if (!args.needPlayerId) {
45253
- _context17.next = 25;
45358
+ _context18.next = 25;
45254
45359
  break;
45255
45360
  }
45256
- return _context17.abrupt("return", _objectSpread$a({
45361
+ return _context18.abrupt("return", _objectSpread$a({
45257
45362
  videoSrc: videoSrc,
45258
45363
  playerId: playerId,
45259
45364
  streamId: streamId
45260
45365
  }, args));
45261
45366
  case 25:
45262
- return _context17.abrupt("return", videoSrc);
45367
+ return _context18.abrupt("return", videoSrc);
45263
45368
  case 26:
45264
45369
  case "end":
45265
- return _context17.stop();
45370
+ return _context18.stop();
45266
45371
  }
45267
- }, _callee17);
45372
+ }, _callee18);
45268
45373
  }))();
45269
45374
  },
45270
45375
  startPullFlow: function startPullFlow(userId, groupId) {
45271
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee18() {
45376
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee19() {
45272
45377
  var streamId;
45273
- return regenerator.wrap(function _callee18$(_context18) {
45274
- while (1) switch (_context18.prev = _context18.next) {
45378
+ return regenerator.wrap(function _callee19$(_context19) {
45379
+ while (1) switch (_context19.prev = _context19.next) {
45275
45380
  case 0:
45276
45381
  userFunc('startPullFlow', {
45277
45382
  userId: userId,
45278
45383
  groupId: groupId
45279
45384
  });
45280
45385
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
45281
- _context18.next = 6;
45386
+ _context19.next = 6;
45282
45387
  break;
45283
45388
  }
45284
45389
  defaultApi$1.writeLog("sdk action : startPullFlow ,userId : ".concat(JSON.stringify(userId), ", param error"));
45285
- return _context18.abrupt("return");
45390
+ return _context19.abrupt("return");
45286
45391
  case 6:
45287
45392
  defaultApi$1.writeLog("sdk action : startPullFlow ,userId : ".concat(JSON.stringify(userId), ", begin"));
45288
45393
  case 7:
45289
45394
  streamId = generateStreamId(userId, groupId);
45290
- _context18.next = 10;
45395
+ _context19.next = 10;
45291
45396
  return zbztAVSDK.startPullFlow(streamId);
45292
45397
  case 10:
45293
45398
  // userAndDeviceStatusInfo.ignoreList.delete(userId)
@@ -45295,16 +45400,16 @@ var zbztsdk = {
45295
45400
  defaultApi$1.writeLog("sdk action : startPullFlow \uFF0CuserId ".concat(userId, ", notice: stream_recover"));
45296
45401
  case 12:
45297
45402
  case "end":
45298
- return _context18.stop();
45403
+ return _context19.stop();
45299
45404
  }
45300
- }, _callee18);
45405
+ }, _callee19);
45301
45406
  }))();
45302
45407
  },
45303
45408
  stopPullFlow: function stopPullFlow(userId, groupId, recovery, streamid) {
45304
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee19() {
45409
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee20() {
45305
45410
  var streamId;
45306
- return regenerator.wrap(function _callee19$(_context19) {
45307
- while (1) switch (_context19.prev = _context19.next) {
45411
+ return regenerator.wrap(function _callee20$(_context20) {
45412
+ while (1) switch (_context20.prev = _context20.next) {
45308
45413
  case 0:
45309
45414
  userFunc('stopPullFlow', {
45310
45415
  userId: userId,
@@ -45313,16 +45418,16 @@ var zbztsdk = {
45313
45418
  });
45314
45419
  // const {userId, groupId, recovery, streamid} = args;
45315
45420
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
45316
- _context19.next = 6;
45421
+ _context20.next = 6;
45317
45422
  break;
45318
45423
  }
45319
45424
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", param error"));
45320
- return _context19.abrupt("return");
45425
+ return _context20.abrupt("return");
45321
45426
  case 6:
45322
45427
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", begin"));
45323
45428
  case 7:
45324
45429
  streamId = streamid || generateStreamId(userId, groupId);
45325
- _context19.next = 10;
45430
+ _context20.next = 10;
45326
45431
  return zbztAVSDK.stopPullFlow(streamId, recovery);
45327
45432
  case 10:
45328
45433
  try {
@@ -45336,9 +45441,9 @@ var zbztsdk = {
45336
45441
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", notice: stream_stopped"));
45337
45442
  case 14:
45338
45443
  case "end":
45339
- return _context19.stop();
45444
+ return _context20.stop();
45340
45445
  }
45341
- }, _callee19);
45446
+ }, _callee20);
45342
45447
  }))();
45343
45448
  },
45344
45449
  /**
@@ -45346,56 +45451,56 @@ var zbztsdk = {
45346
45451
  * @return Promise | void
45347
45452
  */
45348
45453
  stopAllPullFlow: function stopAllPullFlow() {
45349
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee20() {
45350
- return regenerator.wrap(function _callee20$(_context20) {
45351
- while (1) switch (_context20.prev = _context20.next) {
45454
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee21() {
45455
+ return regenerator.wrap(function _callee21$(_context21) {
45456
+ while (1) switch (_context21.prev = _context21.next) {
45352
45457
  case 0:
45353
45458
  defaultApi$1.writeLog('sdk action : stopAllPullFlow begin');
45354
45459
  userFunc('stopAllPullFlow');
45355
- _context20.next = 4;
45460
+ _context21.next = 4;
45356
45461
  return zbztAVSDK.stopAllPullFlow();
45357
45462
  case 4:
45358
45463
  defaultApi$1.writeLog('sdk action : stopAllPullFlow end');
45359
45464
  case 5:
45360
45465
  case "end":
45361
- return _context20.stop();
45466
+ return _context21.stop();
45362
45467
  }
45363
- }, _callee20);
45468
+ }, _callee21);
45364
45469
  }))();
45365
45470
  },
45366
45471
  playDestroy: function playDestroy(userId, groupId) {
45367
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee21() {
45472
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee22() {
45368
45473
  var streamId;
45369
- return regenerator.wrap(function _callee21$(_context21) {
45370
- while (1) switch (_context21.prev = _context21.next) {
45474
+ return regenerator.wrap(function _callee22$(_context22) {
45475
+ while (1) switch (_context22.prev = _context22.next) {
45371
45476
  case 0:
45372
45477
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
45373
- _context21.next = 5;
45478
+ _context22.next = 5;
45374
45479
  break;
45375
45480
  }
45376
45481
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", param error"));
45377
- return _context21.abrupt("return");
45482
+ return _context22.abrupt("return");
45378
45483
  case 5:
45379
45484
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", begin"));
45380
45485
  case 6:
45381
45486
  streamId = generateStreamId(userId, groupId);
45382
- _context21.next = 9;
45487
+ _context22.next = 9;
45383
45488
  return zbztAVSDK.playDestroy(streamId);
45384
45489
  case 9:
45385
45490
  noticeStreamStatus(userId, 'stream_destroy');
45386
45491
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", notice: stream_destroy"));
45387
45492
  case 11:
45388
45493
  case "end":
45389
- return _context21.stop();
45494
+ return _context22.stop();
45390
45495
  }
45391
- }, _callee21);
45496
+ }, _callee22);
45392
45497
  }))();
45393
45498
  },
45394
45499
  changePullFlow: function changePullFlow(args) {
45395
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee22() {
45500
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee23() {
45396
45501
  var streamId, toStreamId, result, _yield$result, videoSrc, playerId;
45397
- return regenerator.wrap(function _callee22$(_context22) {
45398
- while (1) switch (_context22.prev = _context22.next) {
45502
+ return regenerator.wrap(function _callee23$(_context23) {
45503
+ while (1) switch (_context23.prev = _context23.next) {
45399
45504
  case 0:
45400
45505
  defaultApi$1.writeLog("sdk action : changePullFlow ,".concat(JSON.stringify(args)));
45401
45506
  streamId = generateStreamId(args.userId, args.groupId);
@@ -45405,121 +45510,121 @@ var zbztsdk = {
45405
45510
  streamId: streamId,
45406
45511
  toStreamId: toStreamId
45407
45512
  });
45408
- _context22.next = 6;
45513
+ _context23.next = 6;
45409
45514
  return result;
45410
45515
  case 6:
45411
- _yield$result = _context22.sent;
45516
+ _yield$result = _context23.sent;
45412
45517
  videoSrc = _yield$result.videoSrc;
45413
45518
  playerId = _yield$result.playerId;
45414
45519
  defaultApi$1.writeLog("sdk changePullFlow ".concat(JSON.stringify(args), ", streamId : ").concat(streamId, ", toStreamId : ").concat(toStreamId, ", result :").concat(result.sdk_type, ": ").concat(videoSrc));
45415
45520
  if (!args.needPlayerId) {
45416
- _context22.next = 12;
45521
+ _context23.next = 12;
45417
45522
  break;
45418
45523
  }
45419
- return _context22.abrupt("return", {
45524
+ return _context23.abrupt("return", {
45420
45525
  videoSrc: videoSrc,
45421
45526
  playerId: playerId
45422
45527
  });
45423
45528
  case 12:
45424
- return _context22.abrupt("return", videoSrc);
45529
+ return _context23.abrupt("return", videoSrc);
45425
45530
  case 13:
45426
45531
  case "end":
45427
- return _context22.stop();
45532
+ return _context23.stop();
45428
45533
  }
45429
- }, _callee22);
45534
+ }, _callee23);
45430
45535
  }))();
45431
45536
  },
45432
45537
  getSpeakerDeviceList: function getSpeakerDeviceList() {
45433
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee23() {
45538
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee24() {
45434
45539
  var devices;
45435
- return regenerator.wrap(function _callee23$(_context23) {
45436
- while (1) switch (_context23.prev = _context23.next) {
45540
+ return regenerator.wrap(function _callee24$(_context24) {
45541
+ while (1) switch (_context24.prev = _context24.next) {
45437
45542
  case 0:
45438
45543
  defaultApi$1.writeLog('sdk action : getSpeakerDeviceList');
45439
45544
  userFunc('getSpeakerDeviceList');
45440
- _context23.next = 4;
45545
+ _context24.next = 4;
45441
45546
  return zbztAVSDK.getSpeakerDeviceList();
45442
45547
  case 4:
45443
- devices = _context23.sent;
45548
+ devices = _context24.sent;
45444
45549
  defaultApi$1.writeLog("sdk action : getSpeakerDeviceList ".concat(JSON.stringify(devices)));
45445
45550
  userFunc('getSpeakerDeviceList', devices);
45446
- return _context23.abrupt("return", devices);
45551
+ return _context24.abrupt("return", devices);
45447
45552
  case 8:
45448
45553
  case "end":
45449
- return _context23.stop();
45554
+ return _context24.stop();
45450
45555
  }
45451
- }, _callee23);
45556
+ }, _callee24);
45452
45557
  }))();
45453
45558
  },
45454
45559
  setSpeakerDevice: function setSpeakerDevice(deviceId) {
45455
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee24() {
45456
- return regenerator.wrap(function _callee24$(_context24) {
45457
- while (1) switch (_context24.prev = _context24.next) {
45560
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
45561
+ return regenerator.wrap(function _callee25$(_context25) {
45562
+ while (1) switch (_context25.prev = _context25.next) {
45458
45563
  case 0:
45459
45564
  defaultApi$1.writeLog("sdk action : setSpeakerDevice deviceId:".concat(deviceId));
45460
45565
  userFunc('setSpeakerDevice', deviceId);
45461
- _context24.next = 4;
45566
+ _context25.next = 4;
45462
45567
  return zbztAVSDK.setSpeakerDevice(deviceId, 'client');
45463
45568
  case 4:
45464
45569
  case "end":
45465
- return _context24.stop();
45570
+ return _context25.stop();
45466
45571
  }
45467
- }, _callee24);
45572
+ }, _callee25);
45468
45573
  }))();
45469
45574
  },
45470
45575
  getSpeakerDevice: function getSpeakerDevice() {
45471
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
45472
- return regenerator.wrap(function _callee25$(_context25) {
45473
- while (1) switch (_context25.prev = _context25.next) {
45576
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26() {
45577
+ return regenerator.wrap(function _callee26$(_context26) {
45578
+ while (1) switch (_context26.prev = _context26.next) {
45474
45579
  case 0:
45475
45580
  defaultApi$1.writeLog('sdk action : getSpeakerDevice');
45476
- return _context25.abrupt("return", zbztAVSDK.getSpeakerDevice());
45581
+ return _context26.abrupt("return", zbztAVSDK.getSpeakerDevice());
45477
45582
  case 2:
45478
45583
  case "end":
45479
- return _context25.stop();
45584
+ return _context26.stop();
45480
45585
  }
45481
- }, _callee25);
45586
+ }, _callee26);
45482
45587
  }))();
45483
45588
  },
45484
45589
  getSpeakerVolume: function getSpeakerVolume() {
45485
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26() {
45486
- return regenerator.wrap(function _callee26$(_context26) {
45487
- while (1) switch (_context26.prev = _context26.next) {
45590
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27() {
45591
+ return regenerator.wrap(function _callee27$(_context27) {
45592
+ while (1) switch (_context27.prev = _context27.next) {
45488
45593
  case 0:
45489
45594
  defaultApi$1.writeLog('sdk action : getSpeakerVolume ');
45490
- _context26.next = 3;
45595
+ _context27.next = 3;
45491
45596
  return zbztAVSDK.getSpeakerVolume();
45492
45597
  case 3:
45493
- return _context26.abrupt("return", _context26.sent);
45598
+ return _context27.abrupt("return", _context27.sent);
45494
45599
  case 4:
45495
45600
  case "end":
45496
- return _context26.stop();
45601
+ return _context27.stop();
45497
45602
  }
45498
- }, _callee26);
45603
+ }, _callee27);
45499
45604
  }))();
45500
45605
  },
45501
45606
  setSpeakerVolume: function setSpeakerVolume(volume) {
45502
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27() {
45503
- return regenerator.wrap(function _callee27$(_context27) {
45504
- while (1) switch (_context27.prev = _context27.next) {
45607
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28() {
45608
+ return regenerator.wrap(function _callee28$(_context28) {
45609
+ while (1) switch (_context28.prev = _context28.next) {
45505
45610
  case 0:
45506
- _context27.next = 2;
45611
+ _context28.next = 2;
45507
45612
  return zbztAVSDK.setSpeakerVolume(volume);
45508
45613
  case 2:
45509
45614
  defaultApi$1.writeLog("sdk action : setSpeakerVolume ".concat(volume));
45510
45615
  case 3:
45511
45616
  case "end":
45512
- return _context27.stop();
45617
+ return _context28.stop();
45513
45618
  }
45514
- }, _callee27);
45619
+ }, _callee28);
45515
45620
  }))();
45516
45621
  },
45517
45622
  setSpeakerMute: function setSpeakerMute(mute) {
45518
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28() {
45519
- return regenerator.wrap(function _callee28$(_context28) {
45520
- while (1) switch (_context28.prev = _context28.next) {
45623
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
45624
+ return regenerator.wrap(function _callee29$(_context29) {
45625
+ while (1) switch (_context29.prev = _context29.next) {
45521
45626
  case 0:
45522
- _context28.next = 2;
45627
+ _context29.next = 2;
45523
45628
  return zbztAVSDK.setSpeakerMute(mute);
45524
45629
  case 2:
45525
45630
  try {
@@ -45534,141 +45639,141 @@ var zbztsdk = {
45534
45639
  defaultApi$1.writeLog("sdk action : setSpeakerMute ".concat(mute));
45535
45640
  case 5:
45536
45641
  case "end":
45537
- return _context28.stop();
45642
+ return _context29.stop();
45538
45643
  }
45539
- }, _callee28);
45644
+ }, _callee29);
45540
45645
  }))();
45541
45646
  },
45542
45647
  openOrCloseCameraAndMicrophone: function openOrCloseCameraAndMicrophone(type) {
45543
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
45544
- return regenerator.wrap(function _callee29$(_context29) {
45545
- while (1) switch (_context29.prev = _context29.next) {
45648
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
45649
+ return regenerator.wrap(function _callee30$(_context30) {
45650
+ while (1) switch (_context30.prev = _context30.next) {
45546
45651
  case 0:
45547
- _context29.next = 2;
45652
+ _context30.next = 2;
45548
45653
  return zbztAVSDK.openOrCloseCameraAndMicrophone(type);
45549
45654
  case 2:
45550
45655
  defaultApi$1.writeLog("sdk action : openOrCloseCameraAndMicrophone ".concat(type));
45551
45656
  case 3:
45552
45657
  case "end":
45553
- return _context29.stop();
45658
+ return _context30.stop();
45554
45659
  }
45555
- }, _callee29);
45660
+ }, _callee30);
45556
45661
  }))();
45557
45662
  },
45558
45663
  getAppVolume: function getAppVolume() {
45559
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
45664
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
45560
45665
  var volume;
45561
- return regenerator.wrap(function _callee30$(_context30) {
45562
- while (1) switch (_context30.prev = _context30.next) {
45666
+ return regenerator.wrap(function _callee31$(_context31) {
45667
+ while (1) switch (_context31.prev = _context31.next) {
45563
45668
  case 0:
45564
- _context30.next = 2;
45669
+ _context31.next = 2;
45565
45670
  return zbztAVSDK.getAppVolume();
45566
45671
  case 2:
45567
- volume = _context30.sent;
45672
+ volume = _context31.sent;
45568
45673
  defaultApi$1.writeLog("sdk action : getAppVolume ".concat(volume));
45569
- return _context30.abrupt("return", volume);
45674
+ return _context31.abrupt("return", volume);
45570
45675
  case 5:
45571
45676
  case "end":
45572
- return _context30.stop();
45677
+ return _context31.stop();
45573
45678
  }
45574
- }, _callee30);
45679
+ }, _callee31);
45575
45680
  }))();
45576
45681
  },
45577
45682
  setAppVolume: function setAppVolume(volume) {
45578
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
45579
- return regenerator.wrap(function _callee31$(_context31) {
45580
- while (1) switch (_context31.prev = _context31.next) {
45683
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
45684
+ return regenerator.wrap(function _callee32$(_context32) {
45685
+ while (1) switch (_context32.prev = _context32.next) {
45581
45686
  case 0:
45582
- _context31.next = 2;
45687
+ _context32.next = 2;
45583
45688
  return zbztAVSDK.setAppVolume(volume);
45584
45689
  case 2:
45585
45690
  defaultApi$1.writeLog("sdk action : setAppVolume ".concat(volume));
45586
45691
  case 3:
45587
45692
  case "end":
45588
- return _context31.stop();
45693
+ return _context32.stop();
45589
45694
  }
45590
- }, _callee31);
45695
+ }, _callee32);
45591
45696
  }))();
45592
45697
  },
45593
45698
  setAppMute: function setAppMute(mute) {
45594
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
45595
- return regenerator.wrap(function _callee32$(_context32) {
45596
- while (1) switch (_context32.prev = _context32.next) {
45699
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33() {
45700
+ return regenerator.wrap(function _callee33$(_context33) {
45701
+ while (1) switch (_context33.prev = _context33.next) {
45597
45702
  case 0:
45598
- _context32.next = 2;
45703
+ _context33.next = 2;
45599
45704
  return zbztAVSDK.setAppMute(mute);
45600
45705
  case 2:
45601
45706
  defaultApi$1.writeLog("sdk action : setAppMute ".concat(mute));
45602
45707
  case 3:
45603
45708
  case "end":
45604
- return _context32.stop();
45709
+ return _context33.stop();
45605
45710
  }
45606
- }, _callee32);
45711
+ }, _callee33);
45607
45712
  }))();
45608
45713
  },
45609
45714
  getMicrophoneDeviceList: function getMicrophoneDeviceList() {
45610
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33() {
45715
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34() {
45611
45716
  var devices;
45612
- return regenerator.wrap(function _callee33$(_context33) {
45613
- while (1) switch (_context33.prev = _context33.next) {
45717
+ return regenerator.wrap(function _callee34$(_context34) {
45718
+ while (1) switch (_context34.prev = _context34.next) {
45614
45719
  case 0:
45615
45720
  defaultApi$1.writeLog('sdk action : getMicrophoneDeviceList');
45616
45721
  userFunc('getMicrophoneDeviceList');
45617
- _context33.next = 4;
45722
+ _context34.next = 4;
45618
45723
  return zbztAVSDK.getMicrophoneDeviceList();
45619
45724
  case 4:
45620
- devices = _context33.sent;
45725
+ devices = _context34.sent;
45621
45726
  defaultApi$1.writeLog("sdk action : getMicrophoneDeviceList ".concat(JSON.stringify(devices)));
45622
45727
  userFunc('getMicrophoneDeviceList', devices);
45623
- return _context33.abrupt("return", devices);
45728
+ return _context34.abrupt("return", devices);
45624
45729
  case 8:
45625
45730
  case "end":
45626
- return _context33.stop();
45731
+ return _context34.stop();
45627
45732
  }
45628
- }, _callee33);
45733
+ }, _callee34);
45629
45734
  }))();
45630
45735
  },
45631
45736
  setMicrophoneDevice: function setMicrophoneDevice(deviceId) {
45632
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34() {
45633
- return regenerator.wrap(function _callee34$(_context34) {
45634
- while (1) switch (_context34.prev = _context34.next) {
45737
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35() {
45738
+ return regenerator.wrap(function _callee35$(_context35) {
45739
+ while (1) switch (_context35.prev = _context35.next) {
45635
45740
  case 0:
45636
45741
  defaultApi$1.writeLog("sdk action : setMicrophoneDevice ".concat(deviceId));
45637
45742
  userFunc('setMicrophoneDevice', deviceId);
45638
- _context34.next = 4;
45743
+ _context35.next = 4;
45639
45744
  return zbztAVSDK.setMicrophoneDevice(deviceId, 'client');
45640
45745
  case 4:
45641
45746
  case "end":
45642
- return _context34.stop();
45747
+ return _context35.stop();
45643
45748
  }
45644
- }, _callee34);
45749
+ }, _callee35);
45645
45750
  }))();
45646
45751
  },
45647
45752
  openOrCloseMicrophone: function openOrCloseMicrophone(operation) {
45648
45753
  var _this5 = this;
45649
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35() {
45650
- return regenerator.wrap(function _callee35$(_context35) {
45651
- while (1) switch (_context35.prev = _context35.next) {
45754
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36() {
45755
+ return regenerator.wrap(function _callee36$(_context36) {
45756
+ while (1) switch (_context36.prev = _context36.next) {
45652
45757
  case 0:
45653
45758
  defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(operation, " --start"));
45654
45759
  userFunc('openOrCloseMicrophone', operation);
45655
45760
  userAndDeviceStatusInfo.microPhone = operation;
45656
45761
  //记录麦克风状态,用作推流类型上报,是否推声音
45657
45762
  _this5.deviceStatus.microphone = operation;
45658
- _context35.prev = 4;
45659
- _context35.next = 7;
45763
+ _context36.prev = 4;
45764
+ _context36.next = 7;
45660
45765
  return zbztAVSDK.openOrCloseMicrophone(operation);
45661
45766
  case 7:
45662
- _context35.next = 14;
45767
+ _context36.next = 14;
45663
45768
  break;
45664
45769
  case 9:
45665
- _context35.prev = 9;
45666
- _context35.t0 = _context35["catch"](4);
45667
- defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(_context35.t0), null, 'error');
45770
+ _context36.prev = 9;
45771
+ _context36.t0 = _context36["catch"](4);
45772
+ defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(_context36.t0), null, 'error');
45668
45773
  if (operation) {
45669
- NOTICE.openMicphoneError(_context35.t0);
45774
+ NOTICE.openMicphoneError(_context36.t0);
45670
45775
  }
45671
- return _context35.abrupt("return");
45776
+ return _context36.abrupt("return");
45672
45777
  case 14:
45673
45778
  try {
45674
45779
  dataReport$2.deviceChange({
@@ -45683,17 +45788,17 @@ var zbztsdk = {
45683
45788
  defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(operation, " --end"));
45684
45789
  case 18:
45685
45790
  case "end":
45686
- return _context35.stop();
45791
+ return _context36.stop();
45687
45792
  }
45688
- }, _callee35, null, [[4, 9]]);
45793
+ }, _callee36, null, [[4, 9]]);
45689
45794
  }))();
45690
45795
  },
45691
45796
  //听或不听指定用户的声音
45692
45797
  setAudioMute: function setAudioMute(userId, mute, groupId, streamid) {
45693
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36() {
45798
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37() {
45694
45799
  var streamId;
45695
- return regenerator.wrap(function _callee36$(_context36) {
45696
- while (1) switch (_context36.prev = _context36.next) {
45800
+ return regenerator.wrap(function _callee37$(_context37) {
45801
+ while (1) switch (_context37.prev = _context37.next) {
45697
45802
  case 0:
45698
45803
  defaultApi$1.writeLog("sdk action : setAudioMute userId ".concat(userId, ", mute ").concat(mute, ", groupId ").concat(groupId, ", streamid ").concat(streamid));
45699
45804
  userFunc('setAudioMute', {
@@ -45703,13 +45808,13 @@ var zbztsdk = {
45703
45808
  streamid: streamid
45704
45809
  });
45705
45810
  streamId = streamid || generateStreamId(userId, groupId);
45706
- _context36.next = 5;
45811
+ _context37.next = 5;
45707
45812
  return zbztAVSDK.setAudioMute(streamId, mute);
45708
45813
  case 5:
45709
45814
  case "end":
45710
- return _context36.stop();
45815
+ return _context37.stop();
45711
45816
  }
45712
- }, _callee36);
45817
+ }, _callee37);
45713
45818
  }))();
45714
45819
  },
45715
45820
  /**
@@ -45719,82 +45824,82 @@ var zbztsdk = {
45719
45824
  * @return Promise | void
45720
45825
  */
45721
45826
  pullAudioFlow: function pullAudioFlow(streamid, operation) {
45722
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37() {
45723
- return regenerator.wrap(function _callee37$(_context37) {
45724
- while (1) switch (_context37.prev = _context37.next) {
45827
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
45828
+ return regenerator.wrap(function _callee38$(_context38) {
45829
+ while (1) switch (_context38.prev = _context38.next) {
45725
45830
  case 0:
45726
45831
  defaultApi$1.writeLog("sdk action : pullAudioFlow --start ".concat(operation, ", streamid ").concat(streamid));
45727
45832
  userFunc('pullAudioFlow', {
45728
45833
  streamid: streamid,
45729
45834
  operation: operation
45730
45835
  });
45731
- _context37.next = 4;
45836
+ _context38.next = 4;
45732
45837
  return zbztAVSDK.pullAudioFlow(streamid, operation);
45733
45838
  case 4:
45734
45839
  defaultApi$1.writeLog("sdk action : pullAudioFlow --end ".concat(operation, ", streamid ").concat(streamid));
45735
45840
  case 5:
45736
45841
  case "end":
45737
- return _context37.stop();
45842
+ return _context38.stop();
45738
45843
  }
45739
- }, _callee37);
45844
+ }, _callee38);
45740
45845
  }))();
45741
45846
  },
45742
45847
  getMicrophoneVolume: function getMicrophoneVolume() {
45743
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
45744
- return regenerator.wrap(function _callee38$(_context38) {
45745
- while (1) switch (_context38.prev = _context38.next) {
45848
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
45849
+ return regenerator.wrap(function _callee39$(_context39) {
45850
+ while (1) switch (_context39.prev = _context39.next) {
45746
45851
  case 0:
45747
45852
  defaultApi$1.writeLog('sdk action : getMicrophoneVolume');
45748
- _context38.next = 3;
45853
+ _context39.next = 3;
45749
45854
  return zbztAVSDK.getMicrophoneVolume();
45750
45855
  case 3:
45751
- return _context38.abrupt("return", _context38.sent);
45856
+ return _context39.abrupt("return", _context39.sent);
45752
45857
  case 4:
45753
45858
  case "end":
45754
- return _context38.stop();
45859
+ return _context39.stop();
45755
45860
  }
45756
- }, _callee38);
45861
+ }, _callee39);
45757
45862
  }))();
45758
45863
  },
45759
45864
  setMicrophoneVolume: function setMicrophoneVolume(volume, mute) {
45760
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
45761
- return regenerator.wrap(function _callee39$(_context39) {
45762
- while (1) switch (_context39.prev = _context39.next) {
45865
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
45866
+ return regenerator.wrap(function _callee40$(_context40) {
45867
+ while (1) switch (_context40.prev = _context40.next) {
45763
45868
  case 0:
45764
45869
  defaultApi$1.writeLog("sdk action : setMicrophoneVolume ".concat(volume, " ").concat(mute));
45765
45870
  userFunc('setMicrophoneVolume', {
45766
45871
  volume: volume,
45767
45872
  mute: mute
45768
45873
  });
45769
- _context39.next = 4;
45874
+ _context40.next = 4;
45770
45875
  return zbztAVSDK.setMicrophoneVolume(volume, mute);
45771
45876
  case 4:
45772
45877
  case "end":
45773
- return _context39.stop();
45878
+ return _context40.stop();
45774
45879
  }
45775
- }, _callee39);
45880
+ }, _callee40);
45776
45881
  }))();
45777
45882
  },
45778
45883
  setMicrophoneMute: function setMicrophoneMute(mute) {
45779
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
45780
- return regenerator.wrap(function _callee40$(_context40) {
45781
- while (1) switch (_context40.prev = _context40.next) {
45884
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41() {
45885
+ return regenerator.wrap(function _callee41$(_context41) {
45886
+ while (1) switch (_context41.prev = _context41.next) {
45782
45887
  case 0:
45783
- _context40.next = 2;
45888
+ _context41.next = 2;
45784
45889
  return zbztAVSDK.setMicrophoneMute(mute);
45785
45890
  case 2:
45786
45891
  defaultApi$1.writeLog("sdk action : setMicrophoneMute ".concat(mute));
45787
45892
  case 3:
45788
45893
  case "end":
45789
- return _context40.stop();
45894
+ return _context41.stop();
45790
45895
  }
45791
- }, _callee40);
45896
+ }, _callee41);
45792
45897
  }))();
45793
45898
  },
45794
45899
  leaveRoom: function leaveRoom(type) {
45795
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41() {
45796
- return regenerator.wrap(function _callee41$(_context41) {
45797
- while (1) switch (_context41.prev = _context41.next) {
45900
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42() {
45901
+ return regenerator.wrap(function _callee42$(_context42) {
45902
+ while (1) switch (_context42.prev = _context42.next) {
45798
45903
  case 0:
45799
45904
  //未初始化完成,无须卸载
45800
45905
  // if (sdk_status === -1) {
@@ -45814,7 +45919,7 @@ var zbztsdk = {
45814
45919
  channelClient.sendLeave(window.zbzt_sdk_init_params);
45815
45920
  channelClient.leaveRoom();
45816
45921
  // 重置设备检测初始化状态
45817
- _context41.next = 7;
45922
+ _context42.next = 7;
45818
45923
  return zbztAVSDK.leaveRoom(type);
45819
45924
  case 7:
45820
45925
  windowObjArr[0].concat(windowObjArr[1]).forEach(function (item) {
@@ -45834,25 +45939,25 @@ var zbztsdk = {
45834
45939
  window.zbztAVSDK_device_checker_init = null;
45835
45940
  case 14:
45836
45941
  case "end":
45837
- return _context41.stop();
45942
+ return _context42.stop();
45838
45943
  }
45839
- }, _callee41);
45944
+ }, _callee42);
45840
45945
  }))();
45841
45946
  },
45842
45947
  //崩溃后的销毁引擎,反初始化
45843
45948
  deinit: function deinit() {
45844
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42() {
45845
- return regenerator.wrap(function _callee42$(_context42) {
45846
- while (1) switch (_context42.prev = _context42.next) {
45949
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43() {
45950
+ return regenerator.wrap(function _callee43$(_context43) {
45951
+ while (1) switch (_context43.prev = _context43.next) {
45847
45952
  case 0:
45848
45953
  defaultApi$1.writeLog('sdk action : deinit');
45849
- _context42.next = 3;
45954
+ _context43.next = 3;
45850
45955
  return zbztAVSDK.deinit();
45851
45956
  case 3:
45852
45957
  case "end":
45853
- return _context42.stop();
45958
+ return _context43.stop();
45854
45959
  }
45855
- }, _callee42);
45960
+ }, _callee43);
45856
45961
  }))();
45857
45962
  },
45858
45963
  /**
@@ -45861,19 +45966,19 @@ var zbztsdk = {
45861
45966
  * @return Promise | void
45862
45967
  */
45863
45968
  turnPush: function turnPush(cmd) {
45864
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43() {
45865
- return regenerator.wrap(function _callee43$(_context43) {
45866
- while (1) switch (_context43.prev = _context43.next) {
45969
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44() {
45970
+ return regenerator.wrap(function _callee44$(_context44) {
45971
+ while (1) switch (_context44.prev = _context44.next) {
45867
45972
  case 0:
45868
- _context43.next = 2;
45973
+ _context44.next = 2;
45869
45974
  return zbztAVSDK.turnPush(cmd);
45870
45975
  case 2:
45871
45976
  defaultApi$1.writeLog("sdk action : turnPush ".concat(cmd));
45872
45977
  case 3:
45873
45978
  case "end":
45874
- return _context43.stop();
45979
+ return _context44.stop();
45875
45980
  }
45876
- }, _callee43);
45981
+ }, _callee44);
45877
45982
  }))();
45878
45983
  },
45879
45984
  openMicVolumeCb: function openMicVolumeCb(open) {
@@ -45915,18 +46020,18 @@ var zbztsdk = {
45915
46020
  */
45916
46021
  recordPublish: function recordPublish(args) {
45917
46022
  var _this6 = this;
45918
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44() {
45919
- return regenerator.wrap(function _callee44$(_context44) {
45920
- while (1) switch (_context44.prev = _context44.next) {
46023
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45() {
46024
+ return regenerator.wrap(function _callee45$(_context45) {
46025
+ while (1) switch (_context45.prev = _context45.next) {
45921
46026
  case 0:
45922
46027
  args.streamId = _this6.getStreamInfo(args.userId, args.groupId).streamId;
45923
46028
  zbztAVSDK.recordPublishTarget(args);
45924
46029
  defaultApi$1.writeLog("sdk action : recordPublish, args: ".concat(JSON.stringify(args)));
45925
46030
  case 3:
45926
46031
  case "end":
45927
- return _context44.stop();
46032
+ return _context45.stop();
45928
46033
  }
45929
- }, _callee44);
46034
+ }, _callee45);
45930
46035
  }))();
45931
46036
  },
45932
46037
  /**
@@ -46059,9 +46164,9 @@ var zbztsdk = {
46059
46164
  */
46060
46165
  teacherStartLinkMic: function teacherStartLinkMic(mode) {
46061
46166
  var _this7 = this;
46062
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45() {
46063
- return regenerator.wrap(function _callee45$(_context45) {
46064
- while (1) switch (_context45.prev = _context45.next) {
46167
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
46168
+ return regenerator.wrap(function _callee46$(_context46) {
46169
+ while (1) switch (_context46.prev = _context46.next) {
46065
46170
  case 0:
46066
46171
  defaultApi$1.writeLog("sdk action: teacherStartLinkMic, mode: ".concat(mode));
46067
46172
  try {
@@ -46072,15 +46177,15 @@ var zbztsdk = {
46072
46177
  });
46073
46178
  } catch (e) {}
46074
46179
  ;
46075
- _context45.next = 5;
46180
+ _context46.next = 5;
46076
46181
  return zbztAVSDK.teacherStartLinkMic(mode);
46077
46182
  case 5:
46078
- return _context45.abrupt("return", _this7.startPushFlow());
46183
+ return _context46.abrupt("return", _this7.startPushFlow());
46079
46184
  case 6:
46080
46185
  case "end":
46081
- return _context45.stop();
46186
+ return _context46.stop();
46082
46187
  }
46083
- }, _callee45);
46188
+ }, _callee46);
46084
46189
  }))();
46085
46190
  },
46086
46191
  /**
@@ -46090,9 +46195,9 @@ var zbztsdk = {
46090
46195
  */
46091
46196
  teacherStopLinkMic: function teacherStopLinkMic(mode) {
46092
46197
  var _this8 = this;
46093
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
46094
- return regenerator.wrap(function _callee46$(_context46) {
46095
- while (1) switch (_context46.prev = _context46.next) {
46198
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
46199
+ return regenerator.wrap(function _callee47$(_context47) {
46200
+ while (1) switch (_context47.prev = _context47.next) {
46096
46201
  case 0:
46097
46202
  defaultApi$1.writeLog("sdk action: teacherStopLinkMic, mode: ".concat(mode));
46098
46203
  try {
@@ -46103,22 +46208,22 @@ var zbztsdk = {
46103
46208
  });
46104
46209
  } catch (e) {}
46105
46210
  ;
46106
- _context46.next = 5;
46211
+ _context47.next = 5;
46107
46212
  return zbztAVSDK.teacherStopLinkMic(mode);
46108
46213
  case 5:
46109
46214
  if (!(mode === 0)) {
46110
- _context46.next = 8;
46215
+ _context47.next = 8;
46111
46216
  break;
46112
46217
  }
46113
- _context46.next = 8;
46218
+ _context47.next = 8;
46114
46219
  return zbztAVSDK.stopPreview();
46115
46220
  case 8:
46116
- return _context46.abrupt("return", _this8.stopPushFlow());
46221
+ return _context47.abrupt("return", _this8.stopPushFlow());
46117
46222
  case 9:
46118
46223
  case "end":
46119
- return _context46.stop();
46224
+ return _context47.stop();
46120
46225
  }
46121
- }, _callee46);
46226
+ }, _callee47);
46122
46227
  }))();
46123
46228
  },
46124
46229
  getSdkStatus: function getSdkStatus() {
@@ -46291,10 +46396,10 @@ var zbztsdk = {
46291
46396
  */
46292
46397
  startCaptureRecord: function startCaptureRecord() {
46293
46398
  var _arguments2 = arguments;
46294
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
46399
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48() {
46295
46400
  var fileType, fileName, idx, result;
46296
- return regenerator.wrap(function _callee47$(_context47) {
46297
- while (1) switch (_context47.prev = _context47.next) {
46401
+ return regenerator.wrap(function _callee48$(_context48) {
46402
+ while (1) switch (_context48.prev = _context48.next) {
46298
46403
  case 0:
46299
46404
  fileType = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : 2;
46300
46405
  fileName = _arguments2.length > 1 ? _arguments2[1] : undefined;
@@ -46309,19 +46414,19 @@ var zbztsdk = {
46309
46414
  if (idx !== 0 && idx !== 1 && idx !== 2) {
46310
46415
  idx = 2;
46311
46416
  }
46312
- _context47.next = 9;
46417
+ _context48.next = 9;
46313
46418
  return zbztAVSDK.startRecord(fileName, fileType, idx);
46314
46419
  case 9:
46315
- result = _context47.sent;
46316
- _context47.next = 12;
46420
+ result = _context48.sent;
46421
+ _context48.next = 12;
46317
46422
  return zbztAVSDK.startCapture(idx);
46318
46423
  case 12:
46319
- return _context47.abrupt("return", result);
46424
+ return _context48.abrupt("return", result);
46320
46425
  case 13:
46321
46426
  case "end":
46322
- return _context47.stop();
46427
+ return _context48.stop();
46323
46428
  }
46324
- }, _callee47);
46429
+ }, _callee48);
46325
46430
  }))();
46326
46431
  },
46327
46432
  /**
@@ -46331,21 +46436,21 @@ var zbztsdk = {
46331
46436
  */
46332
46437
  stopCaptureRecord: function stopCaptureRecord() {
46333
46438
  var _arguments3 = arguments;
46334
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48() {
46439
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49() {
46335
46440
  var idx;
46336
- return regenerator.wrap(function _callee48$(_context48) {
46337
- while (1) switch (_context48.prev = _context48.next) {
46441
+ return regenerator.wrap(function _callee49$(_context49) {
46442
+ while (1) switch (_context49.prev = _context49.next) {
46338
46443
  case 0:
46339
46444
  idx = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : 2;
46340
- _context48.next = 3;
46445
+ _context49.next = 3;
46341
46446
  return zbztAVSDK.stopRecord(idx);
46342
46447
  case 3:
46343
- return _context48.abrupt("return", zbztAVSDK.stopCapture(idx));
46448
+ return _context49.abrupt("return", zbztAVSDK.stopCapture(idx));
46344
46449
  case 4:
46345
46450
  case "end":
46346
- return _context48.stop();
46451
+ return _context49.stop();
46347
46452
  }
46348
- }, _callee48);
46453
+ }, _callee49);
46349
46454
  }))();
46350
46455
  },
46351
46456
  /**
@@ -46367,10 +46472,10 @@ var zbztsdk = {
46367
46472
  // return code ;
46368
46473
  // },
46369
46474
  changeSdkType: function changeSdkType(institutionId, sdkName, teacherId, liveId) {
46370
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49() {
46475
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50() {
46371
46476
  var code, param, res;
46372
- return regenerator.wrap(function _callee49$(_context49) {
46373
- while (1) switch (_context49.prev = _context49.next) {
46477
+ return regenerator.wrap(function _callee50$(_context50) {
46478
+ while (1) switch (_context50.prev = _context50.next) {
46374
46479
  case 0:
46375
46480
  defaultApi$1.writeLog("sdk action: changeSdkType, institutionId: ".concat(institutionId, ", sdkName: ").concat(sdkName, ", teacherId: ").concat(teacherId, ", liveId: ").concat(liveId));
46376
46481
  param = {
@@ -46379,18 +46484,18 @@ var zbztsdk = {
46379
46484
  lectureStreamId: "lecturer_".concat(teacherId, "_").concat(liveId),
46380
46485
  workCode: 0
46381
46486
  };
46382
- _context49.next = 4;
46487
+ _context50.next = 4;
46383
46488
  return changeSdkInRoom(param);
46384
46489
  case 4:
46385
- res = _context49.sent;
46490
+ res = _context50.sent;
46386
46491
  defaultApi$1.writeLog("sdk action: changeSdkType, sdk\u5207\u6362".concat(res.code == 0 ? '成功' : '失败', ", ").concat(JSON.stringify(res)));
46387
46492
  code = res.code == 0 ? 0 : 1; //0切换成功 ,1切换失败
46388
- return _context49.abrupt("return", code);
46493
+ return _context50.abrupt("return", code);
46389
46494
  case 8:
46390
46495
  case "end":
46391
- return _context49.stop();
46496
+ return _context50.stop();
46392
46497
  }
46393
- }, _callee49);
46498
+ }, _callee50);
46394
46499
  }))();
46395
46500
  },
46396
46501
  /**
@@ -46402,17 +46507,17 @@ var zbztsdk = {
46402
46507
  * @returns
46403
46508
  */
46404
46509
  startCDNRecord: function startCDNRecord(args) {
46405
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50() {
46406
- return regenerator.wrap(function _callee50$(_context50) {
46407
- while (1) switch (_context50.prev = _context50.next) {
46510
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51() {
46511
+ return regenerator.wrap(function _callee51$(_context51) {
46512
+ while (1) switch (_context51.prev = _context51.next) {
46408
46513
  case 0:
46409
46514
  defaultApi$1.writeLog("sdk action: startCDNRecord, args: ".concat(JSON.stringify(args)));
46410
- return _context50.abrupt("return", zbztAVSDK.startCDNRecord(args));
46515
+ return _context51.abrupt("return", zbztAVSDK.startCDNRecord(args));
46411
46516
  case 2:
46412
46517
  case "end":
46413
- return _context50.stop();
46518
+ return _context51.stop();
46414
46519
  }
46415
- }, _callee50);
46520
+ }, _callee51);
46416
46521
  }))();
46417
46522
  },
46418
46523
  /**
@@ -46421,17 +46526,17 @@ var zbztsdk = {
46421
46526
  * @returns
46422
46527
  */
46423
46528
  stopCDNRecord: function stopCDNRecord(taskID) {
46424
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51() {
46425
- return regenerator.wrap(function _callee51$(_context51) {
46426
- while (1) switch (_context51.prev = _context51.next) {
46529
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52() {
46530
+ return regenerator.wrap(function _callee52$(_context52) {
46531
+ while (1) switch (_context52.prev = _context52.next) {
46427
46532
  case 0:
46428
46533
  defaultApi$1.writeLog("sdk action: stopCDNRecord, taskID: ".concat(taskID));
46429
- return _context51.abrupt("return", zbztAVSDK.stopCDNRecord(taskID));
46534
+ return _context52.abrupt("return", zbztAVSDK.stopCDNRecord(taskID));
46430
46535
  case 2:
46431
46536
  case "end":
46432
- return _context51.stop();
46537
+ return _context52.stop();
46433
46538
  }
46434
- }, _callee51);
46539
+ }, _callee52);
46435
46540
  }))();
46436
46541
  }
46437
46542
  };