zbzt-live-sdk 0.8.2 → 0.9.0

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.8.2
3
- * 2024-7-5 lanlonggang
2
+ * zbzt-live-sdk.js v0.9.0
3
+ * 2024-7-8 lanlonggang
4
4
  * Released By TAL Live.
5
5
  */
6
6
  (function (global, factory) {
@@ -18224,6 +18224,22 @@
18224
18224
  }
18225
18225
  }, _callee);
18226
18226
  }))();
18227
+ },
18228
+ /**
18229
+ *
18230
+ * @param {MediaStreamTrack} track
18231
+ * @returns {String} 'tab' | 'window' | 'screen'
18232
+ */
18233
+ getScreenTypeByTrack: function getScreenTypeByTrack(track) {
18234
+ if (/screen/i.test(track.label)) {
18235
+ return 'screen';
18236
+ } else if (/window/i.test(track.label)) {
18237
+ return 'window';
18238
+ } else if (/tag|(web\-contents\-media\-stream)/i.test(track.label)) {
18239
+ return 'tab';
18240
+ } else {
18241
+ return null;
18242
+ }
18227
18243
  } // 获取网络时间戳
18228
18244
  // async getNetworkTimeStamp() {
18229
18245
  // let res;
@@ -18331,7 +18347,7 @@
18331
18347
  api: 'api.weclassroom.com',
18332
18348
  report: 's.weclassroom.com'
18333
18349
  };
18334
- var version = '0.8.2';
18350
+ var version = '0.9.0';
18335
18351
  var liveExt = {
18336
18352
  name: 'live',
18337
18353
  version: '1.0.0.0'
@@ -21754,7 +21770,7 @@
21754
21770
  max: 1080
21755
21771
  };
21756
21772
  screenConstraints.screen.video.quality = 4;
21757
- screenConstraints.screen.audio = false;
21773
+ screenConstraints.screen.audio = true;
21758
21774
  console.warn('[创建屏幕共享流]', screenConstraints);
21759
21775
  _context31.next = 11;
21760
21776
  return zg.createZegoStream(screenConstraints);
@@ -21828,6 +21844,19 @@
21828
21844
  }));
21829
21845
  return _restartCaptureScreen.apply(this, arguments);
21830
21846
  }
21847
+ function getScreenType() {
21848
+ defaultApi$1.writeLog('ZEGO:: getScreenType');
21849
+ if (!screenStream) {
21850
+ defaultApi$1.writeLog('ZEGO:: getScreenType screenStream is not exist', null, 'error');
21851
+ return null;
21852
+ }
21853
+ var track = screenStream.getVideoTracks()[0];
21854
+ if (!track) {
21855
+ defaultApi$1.writeLog('ZEGO:: getScreenType track is not exist', null, 'error');
21856
+ return null;
21857
+ }
21858
+ return util.getScreenTypeByTrack(track);
21859
+ }
21831
21860
  function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
21832
21861
  return _initPullFlow.apply(this, arguments);
21833
21862
  }
@@ -22837,6 +22866,7 @@
22837
22866
  setSpeakerSimpleVolume: setSpeakerSimpleVolume,
22838
22867
  setSpeakerSimpleMute: setSpeakerSimpleMute,
22839
22868
  restartCaptureScreen: restartCaptureScreen,
22869
+ getScreenType: getScreenType,
22840
22870
  setPreviewView: setPreviewView,
22841
22871
  // native端是先设置视图再预览,WEB不需要设置视图,无此功能
22842
22872
  startPreview: startPreview,
@@ -36673,10 +36703,10 @@
36673
36703
  * @returns {string}
36674
36704
  */
36675
36705
  function _getToken$1() {
36676
- _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee53(appid, room, user, planid) {
36706
+ _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee54(appid, room, user, planid) {
36677
36707
  var querys;
36678
- return regenerator.wrap(function _callee53$(_context53) {
36679
- while (1) switch (_context53.prev = _context53.next) {
36708
+ return regenerator.wrap(function _callee54$(_context54) {
36709
+ while (1) switch (_context54.prev = _context54.next) {
36680
36710
  case 0:
36681
36711
  querys = {
36682
36712
  appid: appid,
@@ -36684,12 +36714,12 @@
36684
36714
  room: room,
36685
36715
  user: formatUserId(user)
36686
36716
  };
36687
- return _context53.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
36717
+ return _context54.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
36688
36718
  case 2:
36689
36719
  case "end":
36690
- return _context53.stop();
36720
+ return _context54.stop();
36691
36721
  }
36692
- }, _callee53);
36722
+ }, _callee54);
36693
36723
  }));
36694
36724
  return _getToken$1.apply(this, arguments);
36695
36725
  }
@@ -38216,9 +38246,8 @@
38216
38246
  width: SCREEN_CONSTRAINTS.width,
38217
38247
  height: SCREEN_CONSTRAINTS.height,
38218
38248
  frameRate: SCREEN_CONSTRAINTS.frameRate
38219
- },
38220
- screenSourceType: 'application'
38221
- }, 'disable');
38249
+ }
38250
+ }, 'enable');
38222
38251
  case 3:
38223
38252
  screenTrack = _context24.sent;
38224
38253
  screenTrack.on('track-ended', function () {
@@ -38270,6 +38299,32 @@
38270
38299
  return _ref25.apply(this, arguments);
38271
38300
  };
38272
38301
  }();
38302
+ var getScreenType$1 = /*#__PURE__*/function () {
38303
+ var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26() {
38304
+ var track;
38305
+ return regenerator.wrap(function _callee26$(_context26) {
38306
+ while (1) switch (_context26.prev = _context26.next) {
38307
+ case 0:
38308
+ defaultApi$1.writeLog('avsdk TALRTC::getScreenType');
38309
+ if (screenTrack) {
38310
+ _context26.next = 4;
38311
+ break;
38312
+ }
38313
+ defaultApi$1.writeLog('avsdk TALRTC::getScreenType - screenTrack is not exist', null, 'error');
38314
+ return _context26.abrupt("return", null);
38315
+ case 4:
38316
+ track = screenTrack.getMediaStreamTrack();
38317
+ return _context26.abrupt("return", util.getScreenTypeByTrack(track));
38318
+ case 6:
38319
+ case "end":
38320
+ return _context26.stop();
38321
+ }
38322
+ }, _callee26);
38323
+ }));
38324
+ return function getScreenType() {
38325
+ return _ref26.apply(this, arguments);
38326
+ };
38327
+ }();
38273
38328
  /**
38274
38329
  * @function 停止屏幕采集
38275
38330
  * @return Promise | void
@@ -38280,20 +38335,20 @@
38280
38335
  // return callMethod('StopScreenCapture', {});
38281
38336
  };
38282
38337
  var startDeviceCheckerPreview$1 = /*#__PURE__*/function () {
38283
- var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26(streamId, domId) {
38284
- return regenerator.wrap(function _callee26$(_context26) {
38285
- while (1) switch (_context26.prev = _context26.next) {
38338
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(streamId, domId) {
38339
+ return regenerator.wrap(function _callee27$(_context27) {
38340
+ while (1) switch (_context27.prev = _context27.next) {
38286
38341
  case 0:
38287
38342
  defaultApi$1.writeLog("avsdk TALRTC::startDeviceCheckerPreview -- streamId: ".concat(streamId, ", domId: ").concat(domId));
38288
38343
  if (domId) {
38289
- _context26.next = 4;
38344
+ _context27.next = 4;
38290
38345
  break;
38291
38346
  }
38292
38347
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - domId is required', null, 'error');
38293
38348
  throw new Error('avsdk TALRTC::startDeviceCheckerPreview - domId is required');
38294
38349
  case 4:
38295
38350
  if (streamId) {
38296
- _context26.next = 7;
38351
+ _context27.next = 7;
38297
38352
  break;
38298
38353
  }
38299
38354
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - streamId is required', null, 'error');
@@ -38301,44 +38356,43 @@
38301
38356
  case 7:
38302
38357
  deviceCheckerDomId = domId;
38303
38358
  if (!(streamId === localStreamId$1)) {
38304
- _context26.next = 12;
38359
+ _context27.next = 12;
38305
38360
  break;
38306
38361
  }
38307
- _context26.next = 11;
38362
+ _context27.next = 11;
38308
38363
  return talrtc.createCameraVideoTrack({
38309
38364
  cameraId: window.zbztAVSDK_device_checker_init.camera.use,
38310
38365
  encoderConfig: videoEncoderConfig
38311
38366
  });
38312
38367
  case 11:
38313
- deviceCheckerTrack = _context26.sent;
38368
+ deviceCheckerTrack = _context27.sent;
38314
38369
  case 12:
38315
38370
  if (!(streamId === screenStreamId$1)) {
38316
- _context26.next = 16;
38371
+ _context27.next = 16;
38317
38372
  break;
38318
38373
  }
38319
- _context26.next = 15;
38374
+ _context27.next = 15;
38320
38375
  return talrtc.createScreenVideoTrack({
38321
38376
  encoderConfig: {
38322
38377
  width: SCREEN_CONSTRAINTS.width,
38323
38378
  height: SCREEN_CONSTRAINTS.height,
38324
38379
  frameRate: SCREEN_CONSTRAINTS.frameRate
38325
- },
38326
- screenSourceType: 'application'
38327
- }, 'disable');
38380
+ }
38381
+ }, 'enable');
38328
38382
  case 15:
38329
- deviceCheckerTrack = _context26.sent;
38383
+ deviceCheckerTrack = _context27.sent;
38330
38384
  case 16:
38331
38385
  deviceCheckerTrack.play(domId, {
38332
38386
  fit: 'contain'
38333
38387
  });
38334
38388
  case 17:
38335
38389
  case "end":
38336
- return _context26.stop();
38390
+ return _context27.stop();
38337
38391
  }
38338
- }, _callee26);
38392
+ }, _callee27);
38339
38393
  }));
38340
38394
  return function startDeviceCheckerPreview(_x24, _x25) {
38341
- return _ref26.apply(this, arguments);
38395
+ return _ref27.apply(this, arguments);
38342
38396
  };
38343
38397
  }();
38344
38398
  var stopDeviceCheckerPreview = function stopDeviceCheckerPreview() {
@@ -38358,14 +38412,14 @@
38358
38412
  * @return Promise 可从 Promise 中获取 src,Promise.then((src) => {})
38359
38413
  */
38360
38414
  var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
38361
- var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(isLocal, streamId, domId) {
38415
+ var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(isLocal, streamId, domId) {
38362
38416
  var _streamId$split, _streamId$split2, roomId, _userId, _liveId, user;
38363
- return regenerator.wrap(function _callee27$(_context27) {
38364
- while (1) switch (_context27.prev = _context27.next) {
38417
+ return regenerator.wrap(function _callee28$(_context28) {
38418
+ while (1) switch (_context28.prev = _context28.next) {
38365
38419
  case 0:
38366
38420
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview streamId: ".concat(streamId, ", isLocal: ").concat(isLocal, ", domId: ").concat(domId));
38367
38421
  if (!isLocal) {
38368
- _context27.next = 12;
38422
+ _context28.next = 12;
38369
38423
  break;
38370
38424
  }
38371
38425
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - localStreamId: ".concat(localStreamId$1, ", videoTrack: ").concat(videoTrack));
@@ -38378,39 +38432,39 @@
38378
38432
  }
38379
38433
  }
38380
38434
  if (!(streamId === screenStreamId$1)) {
38381
- _context27.next = 10;
38435
+ _context28.next = 10;
38382
38436
  break;
38383
38437
  }
38384
38438
  screenPreviewDomId = domId;
38385
38439
  if (screenTrack) {
38386
- _context27.next = 9;
38440
+ _context28.next = 9;
38387
38441
  break;
38388
38442
  }
38389
- _context27.next = 9;
38443
+ _context28.next = 9;
38390
38444
  return startScreenCapture();
38391
38445
  case 9:
38392
38446
  screenTrack.play(domId, {
38393
38447
  fit: 'contain'
38394
38448
  });
38395
38449
  case 10:
38396
- _context27.next = 21;
38450
+ _context28.next = 21;
38397
38451
  break;
38398
38452
  case 12:
38399
38453
  if (!(!streamId || !domId)) {
38400
- _context27.next = 15;
38454
+ _context28.next = 15;
38401
38455
  break;
38402
38456
  }
38403
38457
  defaultApi$1.writeLog('avsdk TALRTC::startLocalOrRemotePreview - streamId and domId is required', null, 'error');
38404
- return _context27.abrupt("return");
38458
+ return _context28.abrupt("return");
38405
38459
  case 15:
38406
38460
  _streamId$split = streamId.split('_'), _streamId$split2 = _slicedToArray(_streamId$split, 4), roomId = _streamId$split2[1], _userId = _streamId$split2[2], _liveId = _streamId$split2[3];
38407
38461
  user = users.get("".concat(roomId, "_").concat(formatUserId(_userId)));
38408
38462
  if (user) {
38409
- _context27.next = 20;
38463
+ _context28.next = 20;
38410
38464
  break;
38411
38465
  }
38412
38466
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - user:".concat(_userId, " not found."));
38413
- return _context27.abrupt("return");
38467
+ return _context28.abrupt("return");
38414
38468
  case 20:
38415
38469
  if (_liveId === '1') {
38416
38470
  // 主流播放
@@ -38431,12 +38485,12 @@
38431
38485
  }
38432
38486
  case 21:
38433
38487
  case "end":
38434
- return _context27.stop();
38488
+ return _context28.stop();
38435
38489
  }
38436
- }, _callee27);
38490
+ }, _callee28);
38437
38491
  }));
38438
38492
  return function startLocalOrRemotePreview(_x26, _x27, _x28) {
38439
- return _ref27.apply(this, arguments);
38493
+ return _ref28.apply(this, arguments);
38440
38494
  };
38441
38495
  }();
38442
38496
 
@@ -38445,16 +38499,16 @@
38445
38499
  * @param {'audio' | 'video' | 'both'} type
38446
38500
  */
38447
38501
  var startPushLocalStream = /*#__PURE__*/function () {
38448
- var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(type) {
38502
+ var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29(type) {
38449
38503
  var roomId, client, tracks;
38450
- return regenerator.wrap(function _callee28$(_context28) {
38451
- while (1) switch (_context28.prev = _context28.next) {
38504
+ return regenerator.wrap(function _callee29$(_context29) {
38505
+ while (1) switch (_context29.prev = _context29.next) {
38452
38506
  case 0:
38453
38507
  defaultApi$1.writeLog("avsdk TALRTC::startPushLocalStream ".concat(type));
38454
38508
  roomId = util.getRoomIdByStreamId(localStreamId$1);
38455
38509
  client = clients.get(roomId);
38456
38510
  if (client) {
38457
- _context28.next = 7;
38511
+ _context29.next = 7;
38458
38512
  break;
38459
38513
  }
38460
38514
  defaultApi$1.writeLog('avsdk TALRTC::startPushLocalStream - init first', null, 'error');
@@ -38468,32 +38522,32 @@
38468
38522
  if ((type === 'both' || type === 'video') && videoTrack) {
38469
38523
  tracks.push(videoTrack);
38470
38524
  }
38471
- _context28.next = 12;
38525
+ _context29.next = 12;
38472
38526
  return client.publish(tracks);
38473
38527
  case 12:
38474
38528
  case "end":
38475
- return _context28.stop();
38529
+ return _context29.stop();
38476
38530
  }
38477
- }, _callee28);
38531
+ }, _callee29);
38478
38532
  }));
38479
38533
  return function startPushLocalStream(_x29) {
38480
- return _ref28.apply(this, arguments);
38534
+ return _ref29.apply(this, arguments);
38481
38535
  };
38482
38536
  }();
38483
38537
  /**
38484
38538
  * @param {'audio' | 'video' | 'both'} type
38485
38539
  */
38486
38540
  var stopPushLocalStream = /*#__PURE__*/function () {
38487
- var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29(type) {
38541
+ var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30(type) {
38488
38542
  var roomId, client, tracks;
38489
- return regenerator.wrap(function _callee29$(_context29) {
38490
- while (1) switch (_context29.prev = _context29.next) {
38543
+ return regenerator.wrap(function _callee30$(_context30) {
38544
+ while (1) switch (_context30.prev = _context30.next) {
38491
38545
  case 0:
38492
38546
  defaultApi$1.writeLog("avsdk TALRTC::stopPushLocalStream ".concat(type));
38493
38547
  roomId = util.getRoomIdByStreamId(localStreamId$1);
38494
38548
  client = clients.get(roomId);
38495
38549
  if (client) {
38496
- _context29.next = 6;
38550
+ _context30.next = 6;
38497
38551
  break;
38498
38552
  }
38499
38553
  defaultApi$1.writeLog('avsdk TALRTC::stopPushLocalStream - init first', null, 'error');
@@ -38506,29 +38560,29 @@
38506
38560
  if ((type === 'both' || type === 'video') && videoTrack) {
38507
38561
  tracks.push(videoTrack);
38508
38562
  }
38509
- _context29.next = 11;
38563
+ _context30.next = 11;
38510
38564
  return client.unpublish(tracks);
38511
38565
  case 11:
38512
38566
  case "end":
38513
- return _context29.stop();
38567
+ return _context30.stop();
38514
38568
  }
38515
- }, _callee29);
38569
+ }, _callee30);
38516
38570
  }));
38517
38571
  return function stopPushLocalStream(_x30) {
38518
- return _ref29.apply(this, arguments);
38572
+ return _ref30.apply(this, arguments);
38519
38573
  };
38520
38574
  }();
38521
38575
  var startPushScreenStream = /*#__PURE__*/function () {
38522
- var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
38576
+ var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
38523
38577
  var roomId, client;
38524
- return regenerator.wrap(function _callee30$(_context30) {
38525
- while (1) switch (_context30.prev = _context30.next) {
38578
+ return regenerator.wrap(function _callee31$(_context31) {
38579
+ while (1) switch (_context31.prev = _context31.next) {
38526
38580
  case 0:
38527
38581
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream');
38528
38582
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
38529
38583
  client = clients.get(roomId);
38530
38584
  if (client) {
38531
- _context30.next = 7;
38585
+ _context31.next = 7;
38532
38586
  break;
38533
38587
  }
38534
38588
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - init first', null, 'error');
@@ -38536,53 +38590,53 @@
38536
38590
  throw new Error('avsdk TALRTC::startPushScreenStream - init first');
38537
38591
  case 7:
38538
38592
  if (!screenTrack) {
38539
- _context30.next = 11;
38593
+ _context31.next = 11;
38540
38594
  break;
38541
38595
  }
38542
38596
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - end');
38543
- _context30.next = 11;
38597
+ _context31.next = 11;
38544
38598
  return client.publish(screenTrack);
38545
38599
  case 11:
38546
38600
  case "end":
38547
- return _context30.stop();
38601
+ return _context31.stop();
38548
38602
  }
38549
- }, _callee30);
38603
+ }, _callee31);
38550
38604
  }));
38551
38605
  return function startPushScreenStream() {
38552
- return _ref30.apply(this, arguments);
38606
+ return _ref31.apply(this, arguments);
38553
38607
  };
38554
38608
  }();
38555
38609
  var stopPushScreenStream = /*#__PURE__*/function () {
38556
- var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
38610
+ var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
38557
38611
  var roomId, client;
38558
- return regenerator.wrap(function _callee31$(_context31) {
38559
- while (1) switch (_context31.prev = _context31.next) {
38612
+ return regenerator.wrap(function _callee32$(_context32) {
38613
+ while (1) switch (_context32.prev = _context32.next) {
38560
38614
  case 0:
38561
38615
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream');
38562
38616
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
38563
38617
  client = clients.get(roomId);
38564
38618
  if (client) {
38565
- _context31.next = 6;
38619
+ _context32.next = 6;
38566
38620
  break;
38567
38621
  }
38568
38622
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - init first', null, 'error');
38569
38623
  throw new Error('avsdk TALRTC::stopPushScreenStream - init first');
38570
38624
  case 6:
38571
38625
  if (!screenTrack) {
38572
- _context31.next = 10;
38626
+ _context32.next = 10;
38573
38627
  break;
38574
38628
  }
38575
38629
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - end');
38576
- _context31.next = 10;
38630
+ _context32.next = 10;
38577
38631
  return client.unpublish(screenTrack);
38578
38632
  case 10:
38579
38633
  case "end":
38580
- return _context31.stop();
38634
+ return _context32.stop();
38581
38635
  }
38582
- }, _callee31);
38636
+ }, _callee32);
38583
38637
  }));
38584
38638
  return function stopPushScreenStream() {
38585
- return _ref31.apply(this, arguments);
38639
+ return _ref32.apply(this, arguments);
38586
38640
  };
38587
38641
  }();
38588
38642
  /**
@@ -38591,9 +38645,9 @@
38591
38645
  * @return Promise | void
38592
38646
  */
38593
38647
  var startPush = /*#__PURE__*/function () {
38594
- var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId) {
38595
- return regenerator.wrap(function _callee32$(_context32) {
38596
- while (1) switch (_context32.prev = _context32.next) {
38648
+ var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId) {
38649
+ return regenerator.wrap(function _callee33$(_context33) {
38650
+ while (1) switch (_context33.prev = _context33.next) {
38597
38651
  case 0:
38598
38652
  if (!streamId) {
38599
38653
  streamId = localStreamId$1;
@@ -38606,22 +38660,22 @@
38606
38660
  }
38607
38661
  } catch (error) {}
38608
38662
  if (!(streamId === screenStreamId$1)) {
38609
- _context32.next = 9;
38663
+ _context33.next = 9;
38610
38664
  break;
38611
38665
  }
38612
- _context32.next = 6;
38666
+ _context33.next = 6;
38613
38667
  return startScreenCapture();
38614
38668
  case 6:
38615
- _context32.next = 8;
38669
+ _context33.next = 8;
38616
38670
  return startPushScreenStream();
38617
38671
  case 8:
38618
38672
  isScreenSharing = true;
38619
38673
  case 9:
38620
38674
  if (!(streamId === localStreamId$1)) {
38621
- _context32.next = 13;
38675
+ _context33.next = 13;
38622
38676
  break;
38623
38677
  }
38624
- _context32.next = 12;
38678
+ _context33.next = 12;
38625
38679
  return startPushLocalStream('both');
38626
38680
  case 12:
38627
38681
  isPublishing = true;
@@ -38632,12 +38686,12 @@
38632
38686
  });
38633
38687
  case 14:
38634
38688
  case "end":
38635
- return _context32.stop();
38689
+ return _context33.stop();
38636
38690
  }
38637
- }, _callee32);
38691
+ }, _callee33);
38638
38692
  }));
38639
38693
  return function startPush(_x31) {
38640
- return _ref32.apply(this, arguments);
38694
+ return _ref33.apply(this, arguments);
38641
38695
  };
38642
38696
  }();
38643
38697
 
@@ -38647,41 +38701,41 @@
38647
38701
  * @return Promise | void
38648
38702
  */
38649
38703
  var stopPush = /*#__PURE__*/function () {
38650
- var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId) {
38651
- return regenerator.wrap(function _callee33$(_context33) {
38652
- while (1) switch (_context33.prev = _context33.next) {
38704
+ var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(streamId) {
38705
+ return regenerator.wrap(function _callee34$(_context34) {
38706
+ while (1) switch (_context34.prev = _context34.next) {
38653
38707
  case 0:
38654
38708
  if (!streamId) {
38655
38709
  streamId = localStreamId$1;
38656
38710
  }
38657
38711
  defaultApi$1.writeLog("avsdk TALRTC::stopPush streamId: ".concat(streamId));
38658
38712
  if (!(streamId === screenStreamId$1 && screenTrack)) {
38659
- _context33.next = 8;
38713
+ _context34.next = 8;
38660
38714
  break;
38661
38715
  }
38662
38716
  screenTrack.close();
38663
- _context33.next = 6;
38717
+ _context34.next = 6;
38664
38718
  return stopPushScreenStream();
38665
38719
  case 6:
38666
38720
  isScreenSharing = false;
38667
38721
  screenTrack = null;
38668
38722
  case 8:
38669
38723
  if (!(streamId === localStreamId$1)) {
38670
- _context33.next = 12;
38724
+ _context34.next = 12;
38671
38725
  break;
38672
38726
  }
38673
- _context33.next = 11;
38727
+ _context34.next = 11;
38674
38728
  return stopPushLocalStream('both');
38675
38729
  case 11:
38676
38730
  isPublishing = false;
38677
38731
  case 12:
38678
38732
  case "end":
38679
- return _context33.stop();
38733
+ return _context34.stop();
38680
38734
  }
38681
- }, _callee33);
38735
+ }, _callee34);
38682
38736
  }));
38683
38737
  return function stopPush(_x32) {
38684
- return _ref33.apply(this, arguments);
38738
+ return _ref34.apply(this, arguments);
38685
38739
  };
38686
38740
  }();
38687
38741
 
@@ -38691,27 +38745,27 @@
38691
38745
  * @return Promise | void
38692
38746
  */
38693
38747
  var muteLocalAudio = /*#__PURE__*/function () {
38694
- var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(mute) {
38695
- return regenerator.wrap(function _callee34$(_context34) {
38696
- while (1) switch (_context34.prev = _context34.next) {
38748
+ var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(mute) {
38749
+ return regenerator.wrap(function _callee35$(_context35) {
38750
+ while (1) switch (_context35.prev = _context35.next) {
38697
38751
  case 0:
38698
38752
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalAudio mute: ".concat(mute));
38699
38753
  if (!audioTrack) {
38700
- _context34.next = 4;
38754
+ _context35.next = 4;
38701
38755
  break;
38702
38756
  }
38703
- _context34.next = 4;
38757
+ _context35.next = 4;
38704
38758
  return audioTrack.setMuted(mute);
38705
38759
  case 4:
38706
38760
  localStreamMuteStatus.audio = mute;
38707
38761
  case 5:
38708
38762
  case "end":
38709
- return _context34.stop();
38763
+ return _context35.stop();
38710
38764
  }
38711
- }, _callee34);
38765
+ }, _callee35);
38712
38766
  }));
38713
38767
  return function muteLocalAudio(_x33) {
38714
- return _ref34.apply(this, arguments);
38768
+ return _ref35.apply(this, arguments);
38715
38769
  };
38716
38770
  }();
38717
38771
 
@@ -38721,27 +38775,27 @@
38721
38775
  * @return Promise | void
38722
38776
  */
38723
38777
  var muteLocalVideo = /*#__PURE__*/function () {
38724
- var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(mute) {
38725
- return regenerator.wrap(function _callee35$(_context35) {
38726
- while (1) switch (_context35.prev = _context35.next) {
38778
+ var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(mute) {
38779
+ return regenerator.wrap(function _callee36$(_context36) {
38780
+ while (1) switch (_context36.prev = _context36.next) {
38727
38781
  case 0:
38728
38782
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalVideo mute: ".concat(mute));
38729
38783
  if (!videoTrack) {
38730
- _context35.next = 4;
38784
+ _context36.next = 4;
38731
38785
  break;
38732
38786
  }
38733
- _context35.next = 4;
38787
+ _context36.next = 4;
38734
38788
  return videoTrack.setMuted(mute);
38735
38789
  case 4:
38736
38790
  localStreamMuteStatus.video = mute;
38737
38791
  case 5:
38738
38792
  case "end":
38739
- return _context35.stop();
38793
+ return _context36.stop();
38740
38794
  }
38741
- }, _callee35);
38795
+ }, _callee36);
38742
38796
  }));
38743
38797
  return function muteLocalVideo(_x34) {
38744
- return _ref35.apply(this, arguments);
38798
+ return _ref36.apply(this, arguments);
38745
38799
  };
38746
38800
  }();
38747
38801
 
@@ -38773,51 +38827,51 @@
38773
38827
  * @return {Promise} Promise | void
38774
38828
  */
38775
38829
  var startPlay = /*#__PURE__*/function () {
38776
- var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, muteAudio, muteVideo) {
38777
- return regenerator.wrap(function _callee36$(_context36) {
38778
- while (1) switch (_context36.prev = _context36.next) {
38830
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId, muteAudio, muteVideo) {
38831
+ return regenerator.wrap(function _callee37$(_context37) {
38832
+ while (1) switch (_context37.prev = _context37.next) {
38779
38833
  case 0:
38780
38834
  if (muteAudio) {
38781
- _context36.next = 8;
38835
+ _context37.next = 8;
38782
38836
  break;
38783
38837
  }
38784
38838
  if (!(streamId.split('_').length === 4)) {
38785
- _context36.next = 6;
38839
+ _context37.next = 6;
38786
38840
  break;
38787
38841
  }
38788
- _context36.next = 4;
38842
+ _context37.next = 4;
38789
38843
  return muteRemoteAudio(streamId, false);
38790
38844
  case 4:
38791
- _context36.next = 8;
38845
+ _context37.next = 8;
38792
38846
  break;
38793
38847
  case 6:
38794
- _context36.next = 8;
38848
+ _context37.next = 8;
38795
38849
  return muteRemoteScreenAudio(streamId, false);
38796
38850
  case 8:
38797
38851
  if (muteVideo) {
38798
- _context36.next = 16;
38852
+ _context37.next = 16;
38799
38853
  break;
38800
38854
  }
38801
38855
  if (!(streamId.split('_').length === 4)) {
38802
- _context36.next = 14;
38856
+ _context37.next = 14;
38803
38857
  break;
38804
38858
  }
38805
- _context36.next = 12;
38859
+ _context37.next = 12;
38806
38860
  return muteRemoteVideo(streamId, false);
38807
38861
  case 12:
38808
- _context36.next = 16;
38862
+ _context37.next = 16;
38809
38863
  break;
38810
38864
  case 14:
38811
- _context36.next = 16;
38865
+ _context37.next = 16;
38812
38866
  return muteRemoteScreenVideo(streamId, false);
38813
38867
  case 16:
38814
38868
  case "end":
38815
- return _context36.stop();
38869
+ return _context37.stop();
38816
38870
  }
38817
- }, _callee36);
38871
+ }, _callee37);
38818
38872
  }));
38819
38873
  return function startPlay(_x35, _x36, _x37) {
38820
- return _ref36.apply(this, arguments);
38874
+ return _ref37.apply(this, arguments);
38821
38875
  };
38822
38876
  }();
38823
38877
  /**
@@ -38826,37 +38880,37 @@
38826
38880
  * @return Promise | void
38827
38881
  */
38828
38882
  var stopPlay = /*#__PURE__*/function () {
38829
- var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId) {
38830
- return regenerator.wrap(function _callee37$(_context37) {
38831
- while (1) switch (_context37.prev = _context37.next) {
38883
+ var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(streamId) {
38884
+ return regenerator.wrap(function _callee38$(_context38) {
38885
+ while (1) switch (_context38.prev = _context38.next) {
38832
38886
  case 0:
38833
38887
  defaultApi$1.writeLog("avsdk TALRTC::stopPlay streamId: ".concat(streamId));
38834
38888
  if (!(streamId.split('_').length === 4)) {
38835
- _context37.next = 8;
38889
+ _context38.next = 8;
38836
38890
  break;
38837
38891
  }
38838
- _context37.next = 4;
38892
+ _context38.next = 4;
38839
38893
  return muteRemoteAudio(streamId, true);
38840
38894
  case 4:
38841
- _context37.next = 6;
38895
+ _context38.next = 6;
38842
38896
  return muteRemoteVideo(streamId, true);
38843
38897
  case 6:
38844
- _context37.next = 12;
38898
+ _context38.next = 12;
38845
38899
  break;
38846
38900
  case 8:
38847
- _context37.next = 10;
38901
+ _context38.next = 10;
38848
38902
  return muteRemoteScreenAudio(streamId, true);
38849
38903
  case 10:
38850
- _context37.next = 12;
38904
+ _context38.next = 12;
38851
38905
  return muteRemoteScreenVideo(streamId, true);
38852
38906
  case 12:
38853
38907
  case "end":
38854
- return _context37.stop();
38908
+ return _context38.stop();
38855
38909
  }
38856
- }, _callee37);
38910
+ }, _callee38);
38857
38911
  }));
38858
38912
  return function stopPlay(_x38) {
38859
- return _ref37.apply(this, arguments);
38913
+ return _ref38.apply(this, arguments);
38860
38914
  };
38861
38915
  }();
38862
38916
  /**
@@ -38868,9 +38922,9 @@
38868
38922
  * @return src:String 视频预览地址
38869
38923
  */
38870
38924
  var initPullFlow$1 = /*#__PURE__*/function () {
38871
- var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
38872
- return regenerator.wrap(function _callee38$(_context38) {
38873
- while (1) switch (_context38.prev = _context38.next) {
38925
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
38926
+ return regenerator.wrap(function _callee39$(_context39) {
38927
+ while (1) switch (_context39.prev = _context39.next) {
38874
38928
  case 0:
38875
38929
  defaultApi$1.writeLog("TALRTC::initPullFlow_start , streamId :".concat(streamId, ", notAutoPlay: ").concat(notAutoPlay, ", audioOnly: ").concat(muteVideo));
38876
38930
  resetStreamIdRtcPlayerInfo1$1(streamId);
@@ -38881,28 +38935,28 @@
38881
38935
  heartBeatDataReport$1('start');
38882
38936
  }
38883
38937
  } catch (error) {}
38884
- _context38.next = 6;
38938
+ _context39.next = 6;
38885
38939
  return startPlay(streamId, muteAudio, muteVideo);
38886
38940
  case 6:
38887
38941
  if (notAutoPlay) {
38888
- _context38.next = 9;
38942
+ _context39.next = 9;
38889
38943
  break;
38890
38944
  }
38891
- _context38.next = 9;
38945
+ _context39.next = 9;
38892
38946
  return startLocalOrRemotePreview$1(false, streamId, domId);
38893
38947
  case 9:
38894
- return _context38.abrupt("return", {
38948
+ return _context39.abrupt("return", {
38895
38949
  videoSrc: '',
38896
38950
  playerId: 0
38897
38951
  });
38898
38952
  case 10:
38899
38953
  case "end":
38900
- return _context38.stop();
38954
+ return _context39.stop();
38901
38955
  }
38902
- }, _callee38);
38956
+ }, _callee39);
38903
38957
  }));
38904
38958
  return function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
38905
- return _ref38.apply(this, arguments);
38959
+ return _ref39.apply(this, arguments);
38906
38960
  };
38907
38961
  }();
38908
38962
 
@@ -38912,42 +38966,42 @@
38912
38966
  * @return Promise | void
38913
38967
  */
38914
38968
  var teacherStartLinkMic$1 = /*#__PURE__*/function () {
38915
- var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
38969
+ var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
38916
38970
  var mode,
38917
- _args39 = arguments;
38918
- return regenerator.wrap(function _callee39$(_context39) {
38919
- while (1) switch (_context39.prev = _context39.next) {
38971
+ _args40 = arguments;
38972
+ return regenerator.wrap(function _callee40$(_context40) {
38973
+ while (1) switch (_context40.prev = _context40.next) {
38920
38974
  case 0:
38921
- mode = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : 0;
38922
- _context39.next = 3;
38975
+ mode = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : 0;
38976
+ _context40.next = 3;
38923
38977
  return startMicrophone$1();
38924
38978
  case 3:
38925
38979
  if (!(mode === 0)) {
38926
- _context39.next = 12;
38980
+ _context40.next = 12;
38927
38981
  break;
38928
38982
  }
38929
- _context39.next = 6;
38983
+ _context40.next = 6;
38930
38984
  return muteLocalVideo(true, localStreamId$1);
38931
38985
  case 6:
38932
- _context39.next = 8;
38986
+ _context40.next = 8;
38933
38987
  return setMicrophoneDevice$2({});
38934
38988
  case 8:
38935
- _context39.next = 10;
38989
+ _context40.next = 10;
38936
38990
  return muteLocalAudio(false);
38937
38991
  case 10:
38938
- _context39.next = 14;
38992
+ _context40.next = 14;
38939
38993
  break;
38940
38994
  case 12:
38941
- _context39.next = 14;
38995
+ _context40.next = 14;
38942
38996
  return muteLocalAudio(false);
38943
38997
  case 14:
38944
38998
  case "end":
38945
- return _context39.stop();
38999
+ return _context40.stop();
38946
39000
  }
38947
- }, _callee39);
39001
+ }, _callee40);
38948
39002
  }));
38949
39003
  return function teacherStartLinkMic() {
38950
- return _ref39.apply(this, arguments);
39004
+ return _ref40.apply(this, arguments);
38951
39005
  };
38952
39006
  }();
38953
39007
 
@@ -38957,36 +39011,36 @@
38957
39011
  * @return Promise | void
38958
39012
  */
38959
39013
  var teacherStopLinkMic$1 = /*#__PURE__*/function () {
38960
- var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
39014
+ var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41() {
38961
39015
  var mode,
38962
- _args40 = arguments;
38963
- return regenerator.wrap(function _callee40$(_context40) {
38964
- while (1) switch (_context40.prev = _context40.next) {
39016
+ _args41 = arguments;
39017
+ return regenerator.wrap(function _callee41$(_context41) {
39018
+ while (1) switch (_context41.prev = _context41.next) {
38965
39019
  case 0:
38966
- mode = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : 0;
38967
- _context40.next = 3;
39020
+ mode = _args41.length > 0 && _args41[0] !== undefined ? _args41[0] : 0;
39021
+ _context41.next = 3;
38968
39022
  return stopMicrophone$1();
38969
39023
  case 3:
38970
39024
  if (!(mode === 0)) {
38971
- _context40.next = 8;
39025
+ _context41.next = 8;
38972
39026
  break;
38973
39027
  }
38974
- _context40.next = 6;
39028
+ _context41.next = 6;
38975
39029
  return muteLocalAudio(true);
38976
39030
  case 6:
38977
- _context40.next = 10;
39031
+ _context41.next = 10;
38978
39032
  break;
38979
39033
  case 8:
38980
- _context40.next = 10;
39034
+ _context41.next = 10;
38981
39035
  return setSystemAudioLoopback(false);
38982
39036
  case 10:
38983
39037
  case "end":
38984
- return _context40.stop();
39038
+ return _context41.stop();
38985
39039
  }
38986
- }, _callee40);
39040
+ }, _callee41);
38987
39041
  }));
38988
39042
  return function teacherStopLinkMic() {
38989
- return _ref40.apply(this, arguments);
39043
+ return _ref41.apply(this, arguments);
38990
39044
  };
38991
39045
  }();
38992
39046
 
@@ -38998,26 +39052,26 @@
38998
39052
  return callMethod('StopPlayAll', {});
38999
39053
  };
39000
39054
  var playerSnapShot$1 = /*#__PURE__*/function () {
39001
- var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId) {
39002
- return regenerator.wrap(function _callee41$(_context41) {
39003
- while (1) switch (_context41.prev = _context41.next) {
39055
+ var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId) {
39056
+ return regenerator.wrap(function _callee42$(_context42) {
39057
+ while (1) switch (_context42.prev = _context42.next) {
39004
39058
  case 0:
39005
39059
  defaultApi$1.writeLog("avsdk TALRTC::playerSnapShot streamId: ".concat(streamId));
39006
39060
  if (!(streamId === localStreamId$1)) {
39007
- _context41.next = 5;
39061
+ _context42.next = 5;
39008
39062
  break;
39009
39063
  }
39010
- return _context41.abrupt("return", videoTrack.getCurrentFrameData());
39064
+ return _context42.abrupt("return", videoTrack.getCurrentFrameData());
39011
39065
  case 5:
39012
- return _context41.abrupt("return", screenTrack.getCurrentFrameData());
39066
+ return _context42.abrupt("return", screenTrack.getCurrentFrameData());
39013
39067
  case 6:
39014
39068
  case "end":
39015
- return _context41.stop();
39069
+ return _context42.stop();
39016
39070
  }
39017
- }, _callee41);
39071
+ }, _callee42);
39018
39072
  }));
39019
39073
  return function playerSnapShot(_x45) {
39020
- return _ref41.apply(this, arguments);
39074
+ return _ref42.apply(this, arguments);
39021
39075
  };
39022
39076
  }();
39023
39077
  /**
@@ -39028,22 +39082,22 @@
39028
39082
  * @return Promise | void
39029
39083
  */
39030
39084
  var changePullFlow = /*#__PURE__*/function () {
39031
- var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, toStreamId, toDomId) {
39032
- return regenerator.wrap(function _callee42$(_context42) {
39033
- while (1) switch (_context42.prev = _context42.next) {
39085
+ var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, toStreamId, toDomId) {
39086
+ return regenerator.wrap(function _callee43$(_context43) {
39087
+ while (1) switch (_context43.prev = _context43.next) {
39034
39088
  case 0:
39035
- _context42.next = 2;
39089
+ _context43.next = 2;
39036
39090
  return stopPlay(streamId);
39037
39091
  case 2:
39038
- return _context42.abrupt("return", initPullFlow$1(toStreamId, toDomId));
39092
+ return _context43.abrupt("return", initPullFlow$1(toStreamId, toDomId));
39039
39093
  case 3:
39040
39094
  case "end":
39041
- return _context42.stop();
39095
+ return _context43.stop();
39042
39096
  }
39043
- }, _callee42);
39097
+ }, _callee43);
39044
39098
  }));
39045
39099
  return function changePullFlow(_x46, _x47, _x48) {
39046
- return _ref42.apply(this, arguments);
39100
+ return _ref43.apply(this, arguments);
39047
39101
  };
39048
39102
  }();
39049
39103
 
@@ -39117,10 +39171,10 @@
39117
39171
  * @return Promise | void
39118
39172
  */
39119
39173
  var muteRemoteAudio = /*#__PURE__*/function () {
39120
- var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, mute) {
39174
+ var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
39121
39175
  var _streamId$split3, _streamId$split4, roomId, userId, numberUserId, client, user, track;
39122
- return regenerator.wrap(function _callee43$(_context43) {
39123
- while (1) switch (_context43.prev = _context43.next) {
39176
+ return regenerator.wrap(function _callee44$(_context44) {
39177
+ while (1) switch (_context44.prev = _context44.next) {
39124
39178
  case 0:
39125
39179
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
39126
39180
  _streamId$split3 = streamId.split('_'), _streamId$split4 = _slicedToArray(_streamId$split3, 3), roomId = _streamId$split4[1], userId = _streamId$split4[2];
@@ -39128,43 +39182,43 @@
39128
39182
  client = clients.get(roomId);
39129
39183
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39130
39184
  if (client) {
39131
- _context43.next = 8;
39185
+ _context44.next = 8;
39132
39186
  break;
39133
39187
  }
39134
39188
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId), null, 'error');
39135
39189
  throw new Error("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId));
39136
39190
  case 8:
39137
39191
  if (user) {
39138
- _context43.next = 12;
39192
+ _context44.next = 12;
39139
39193
  break;
39140
39194
  }
39141
39195
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no user found ".concat(roomId));
39142
39196
  users.set("".concat(roomId, "_").concat(numberUserId), new User(!mute, false, userId));
39143
- return _context43.abrupt("return");
39197
+ return _context44.abrupt("return");
39144
39198
  case 12:
39145
39199
  user.userId = userId;
39146
39200
  user.subAudio = !mute;
39147
39201
  if (!(!user.rtcUser || !user.rtcUser.hasAudio)) {
39148
- _context43.next = 17;
39202
+ _context44.next = 17;
39149
39203
  break;
39150
39204
  }
39151
39205
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - user:".concat(userId, " has not be published"));
39152
- return _context43.abrupt("return");
39206
+ return _context44.abrupt("return");
39153
39207
  case 17:
39154
39208
  if (!mute) {
39155
- _context43.next = 22;
39209
+ _context44.next = 22;
39156
39210
  break;
39157
39211
  }
39158
- _context43.next = 20;
39212
+ _context44.next = 20;
39159
39213
  return client.unsubscribe(user.mainStreamId, 'audio');
39160
39214
  case 20:
39161
- _context43.next = 28;
39215
+ _context44.next = 28;
39162
39216
  break;
39163
39217
  case 22:
39164
- _context43.next = 24;
39218
+ _context44.next = 24;
39165
39219
  return client.subscribe(user.mainStreamId, 'audio');
39166
39220
  case 24:
39167
- track = _context43.sent;
39221
+ track = _context44.sent;
39168
39222
  track.setVolume(speakerVolume$1);
39169
39223
  track.once('first-frame-decoded', function () {
39170
39224
  NOTICE.firstAudioSize({
@@ -39175,12 +39229,12 @@
39175
39229
  track.play();
39176
39230
  case 28:
39177
39231
  case "end":
39178
- return _context43.stop();
39232
+ return _context44.stop();
39179
39233
  }
39180
- }, _callee43);
39234
+ }, _callee44);
39181
39235
  }));
39182
39236
  return function muteRemoteAudio(_x49, _x50) {
39183
- return _ref43.apply(this, arguments);
39237
+ return _ref44.apply(this, arguments);
39184
39238
  };
39185
39239
  }();
39186
39240
 
@@ -39191,10 +39245,10 @@
39191
39245
  * @return Promise | void
39192
39246
  */
39193
39247
  var muteRemoteVideo = /*#__PURE__*/function () {
39194
- var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
39248
+ var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
39195
39249
  var _streamId$split5, _streamId$split6, roomId, userId, numberUserId, client, user, track;
39196
- return regenerator.wrap(function _callee44$(_context44) {
39197
- while (1) switch (_context44.prev = _context44.next) {
39250
+ return regenerator.wrap(function _callee45$(_context45) {
39251
+ while (1) switch (_context45.prev = _context45.next) {
39198
39252
  case 0:
39199
39253
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
39200
39254
  _streamId$split5 = streamId.split('_'), _streamId$split6 = _slicedToArray(_streamId$split5, 3), roomId = _streamId$split6[1], userId = _streamId$split6[2];
@@ -39202,44 +39256,44 @@
39202
39256
  client = clients.get(roomId);
39203
39257
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39204
39258
  if (client) {
39205
- _context44.next = 8;
39259
+ _context45.next = 8;
39206
39260
  break;
39207
39261
  }
39208
39262
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId), null, 'error');
39209
39263
  throw new Error("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId));
39210
39264
  case 8:
39211
39265
  if (user) {
39212
- _context44.next = 12;
39266
+ _context45.next = 12;
39213
39267
  break;
39214
39268
  }
39215
39269
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no user found ".concat(roomId));
39216
39270
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, !mute, userId));
39217
- return _context44.abrupt("return");
39271
+ return _context45.abrupt("return");
39218
39272
  case 12:
39219
39273
  user.userId = userId;
39220
39274
  user.subVideo = !mute;
39221
39275
  if (!(!user.rtcUser || !user.rtcUser.hasVideo)) {
39222
- _context44.next = 17;
39276
+ _context45.next = 17;
39223
39277
  break;
39224
39278
  }
39225
39279
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - user:".concat(userId, " has not be published"));
39226
- return _context44.abrupt("return");
39280
+ return _context45.abrupt("return");
39227
39281
  case 17:
39228
39282
  if (!mute) {
39229
- _context44.next = 23;
39283
+ _context45.next = 23;
39230
39284
  break;
39231
39285
  }
39232
39286
  user.rtcUser.videoTrack && user.rtcUser.videoTrack.stop();
39233
- _context44.next = 21;
39287
+ _context45.next = 21;
39234
39288
  return client.unsubscribe(user.mainStreamId, 'video');
39235
39289
  case 21:
39236
- _context44.next = 28;
39290
+ _context45.next = 28;
39237
39291
  break;
39238
39292
  case 23:
39239
- _context44.next = 25;
39293
+ _context45.next = 25;
39240
39294
  return client.subscribe(user.mainStreamId, 'video');
39241
39295
  case 25:
39242
- track = _context44.sent;
39296
+ track = _context45.sent;
39243
39297
  track.once('first-frame-decoded', function () {
39244
39298
  NOTICE.firstVideoSize({
39245
39299
  streamId: streamId,
@@ -39253,12 +39307,12 @@
39253
39307
  }
39254
39308
  case 28:
39255
39309
  case "end":
39256
- return _context44.stop();
39310
+ return _context45.stop();
39257
39311
  }
39258
- }, _callee44);
39312
+ }, _callee45);
39259
39313
  }));
39260
39314
  return function muteRemoteVideo(_x51, _x52) {
39261
- return _ref44.apply(this, arguments);
39315
+ return _ref45.apply(this, arguments);
39262
39316
  };
39263
39317
  }();
39264
39318
 
@@ -39269,10 +39323,10 @@
39269
39323
  * @return Promise | void
39270
39324
  */
39271
39325
  var muteRemoteScreenAudio = /*#__PURE__*/function () {
39272
- var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
39326
+ var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46(streamId, mute) {
39273
39327
  var _streamId$split7, _streamId$split8, roomId, userId, numberUserId, client, user, track;
39274
- return regenerator.wrap(function _callee45$(_context45) {
39275
- while (1) switch (_context45.prev = _context45.next) {
39328
+ return regenerator.wrap(function _callee46$(_context46) {
39329
+ while (1) switch (_context46.prev = _context46.next) {
39276
39330
  case 0:
39277
39331
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
39278
39332
  _streamId$split7 = streamId.split('_'), _streamId$split8 = _slicedToArray(_streamId$split7, 3), roomId = _streamId$split8[1], userId = _streamId$split8[2];
@@ -39280,43 +39334,43 @@
39280
39334
  client = clients.get(roomId);
39281
39335
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39282
39336
  if (client) {
39283
- _context45.next = 8;
39337
+ _context46.next = 8;
39284
39338
  break;
39285
39339
  }
39286
39340
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId), null, 'error');
39287
39341
  throw new Error("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId));
39288
39342
  case 8:
39289
39343
  if (user) {
39290
- _context45.next = 12;
39344
+ _context46.next = 12;
39291
39345
  break;
39292
39346
  }
39293
39347
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no user found ".concat(roomId));
39294
39348
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenAudio = !mute);
39295
- return _context45.abrupt("return");
39349
+ return _context46.abrupt("return");
39296
39350
  case 12:
39297
39351
  user.userId = userId;
39298
39352
  user.subScreenAudio = !mute;
39299
39353
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
39300
- _context45.next = 17;
39354
+ _context46.next = 17;
39301
39355
  break;
39302
39356
  }
39303
39357
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - user:".concat(userId, " has not be published"));
39304
- return _context45.abrupt("return");
39358
+ return _context46.abrupt("return");
39305
39359
  case 17:
39306
39360
  if (!mute) {
39307
- _context45.next = 22;
39361
+ _context46.next = 22;
39308
39362
  break;
39309
39363
  }
39310
- _context45.next = 20;
39364
+ _context46.next = 20;
39311
39365
  return client.unsubscribe(user.screenStreamId, 'audio');
39312
39366
  case 20:
39313
- _context45.next = 28;
39367
+ _context46.next = 28;
39314
39368
  break;
39315
39369
  case 22:
39316
- _context45.next = 24;
39370
+ _context46.next = 24;
39317
39371
  return client.subscribe(user.screenStreamId, 'audio');
39318
39372
  case 24:
39319
- track = _context45.sent;
39373
+ track = _context46.sent;
39320
39374
  track.setVolume(speakerVolume$1);
39321
39375
  track.once('first-frame-decoded', function () {
39322
39376
  NOTICE.firstAudioSize({
@@ -39327,12 +39381,12 @@
39327
39381
  track.play();
39328
39382
  case 28:
39329
39383
  case "end":
39330
- return _context45.stop();
39384
+ return _context46.stop();
39331
39385
  }
39332
- }, _callee45);
39386
+ }, _callee46);
39333
39387
  }));
39334
39388
  return function muteRemoteScreenAudio(_x53, _x54) {
39335
- return _ref45.apply(this, arguments);
39389
+ return _ref46.apply(this, arguments);
39336
39390
  };
39337
39391
  }();
39338
39392
  /**
@@ -39342,10 +39396,10 @@
39342
39396
  * @return Promise | void
39343
39397
  */
39344
39398
  var muteRemoteScreenVideo = /*#__PURE__*/function () {
39345
- var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46(streamId, mute) {
39399
+ var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47(streamId, mute) {
39346
39400
  var _streamId$split9, _streamId$split10, roomId, userId, numberUserId, client, user, track;
39347
- return regenerator.wrap(function _callee46$(_context46) {
39348
- while (1) switch (_context46.prev = _context46.next) {
39401
+ return regenerator.wrap(function _callee47$(_context47) {
39402
+ while (1) switch (_context47.prev = _context47.next) {
39349
39403
  case 0:
39350
39404
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
39351
39405
  _streamId$split9 = streamId.split('_'), _streamId$split10 = _slicedToArray(_streamId$split9, 3), roomId = _streamId$split10[1], userId = _streamId$split10[2];
@@ -39353,44 +39407,44 @@
39353
39407
  client = clients.get(roomId);
39354
39408
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39355
39409
  if (client) {
39356
- _context46.next = 8;
39410
+ _context47.next = 8;
39357
39411
  break;
39358
39412
  }
39359
39413
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId), null, 'error');
39360
39414
  throw new Error("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId));
39361
39415
  case 8:
39362
39416
  if (user) {
39363
- _context46.next = 12;
39417
+ _context47.next = 12;
39364
39418
  break;
39365
39419
  }
39366
39420
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no user found ".concat(roomId));
39367
39421
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenVideo = !mute);
39368
- return _context46.abrupt("return");
39422
+ return _context47.abrupt("return");
39369
39423
  case 12:
39370
39424
  user.userId = userId;
39371
39425
  user.subScreenVideo = !mute;
39372
39426
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
39373
- _context46.next = 17;
39427
+ _context47.next = 17;
39374
39428
  break;
39375
39429
  }
39376
39430
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - user:".concat(userId, " has not be published"));
39377
- return _context46.abrupt("return");
39431
+ return _context47.abrupt("return");
39378
39432
  case 17:
39379
39433
  if (!mute) {
39380
- _context46.next = 23;
39434
+ _context47.next = 23;
39381
39435
  break;
39382
39436
  }
39383
39437
  user.rtcUser.screenTrack && user.rtcUser.screenTrack.stop();
39384
- _context46.next = 21;
39438
+ _context47.next = 21;
39385
39439
  return client.unsubscribe(user.screenStreamId, 'video');
39386
39440
  case 21:
39387
- _context46.next = 28;
39441
+ _context47.next = 28;
39388
39442
  break;
39389
39443
  case 23:
39390
- _context46.next = 25;
39444
+ _context47.next = 25;
39391
39445
  return client.subscribe(user.screenStreamId, 'video');
39392
39446
  case 25:
39393
- track = _context46.sent;
39447
+ track = _context47.sent;
39394
39448
  track.once('first-frame-decoded', function () {
39395
39449
  NOTICE.firstVideoSize({
39396
39450
  streamId: streamId,
@@ -39404,32 +39458,32 @@
39404
39458
  }
39405
39459
  case 28:
39406
39460
  case "end":
39407
- return _context46.stop();
39461
+ return _context47.stop();
39408
39462
  }
39409
- }, _callee46);
39463
+ }, _callee47);
39410
39464
  }));
39411
39465
  return function muteRemoteScreenVideo(_x55, _x56) {
39412
- return _ref46.apply(this, arguments);
39466
+ return _ref47.apply(this, arguments);
39413
39467
  };
39414
39468
  }();
39415
39469
  //开启同屏
39416
39470
  var startMultiScreen$1 = /*#__PURE__*/function () {
39417
- var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
39418
- return regenerator.wrap(function _callee47$(_context47) {
39419
- while (1) switch (_context47.prev = _context47.next) {
39471
+ var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48() {
39472
+ return regenerator.wrap(function _callee48$(_context48) {
39473
+ while (1) switch (_context48.prev = _context48.next) {
39420
39474
  case 0:
39421
39475
  defaultApi$1.writeLog('info', 'avsdk TALRTC::startMultiScreen');
39422
39476
  // await enableExternalVideoSource(true,1);
39423
- _context47.next = 3;
39477
+ _context48.next = 3;
39424
39478
  return LoadCollectionOutputEntry2();
39425
39479
  case 3:
39426
39480
  case "end":
39427
- return _context47.stop();
39481
+ return _context48.stop();
39428
39482
  }
39429
- }, _callee47);
39483
+ }, _callee48);
39430
39484
  }));
39431
39485
  return function startMultiScreen() {
39432
- return _ref47.apply(this, arguments);
39486
+ return _ref48.apply(this, arguments);
39433
39487
  };
39434
39488
  }();
39435
39489
 
@@ -39438,10 +39492,10 @@
39438
39492
  * @return Promise | void
39439
39493
  */
39440
39494
  var leaveRoom$1 = /*#__PURE__*/function () {
39441
- var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48(isChangeSDK) {
39495
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(isChangeSDK) {
39442
39496
  var key;
39443
- return regenerator.wrap(function _callee48$(_context48) {
39444
- while (1) switch (_context48.prev = _context48.next) {
39497
+ return regenerator.wrap(function _callee49$(_context49) {
39498
+ while (1) switch (_context49.prev = _context49.next) {
39445
39499
  case 0:
39446
39500
  if (!isChangeSDK) {
39447
39501
  globalVariables.localPreviewDomId = null;
@@ -39465,12 +39519,12 @@
39465
39519
  streamIdRtcPlayerInfo1$1 = {};
39466
39520
  case 14:
39467
39521
  case "end":
39468
- return _context48.stop();
39522
+ return _context49.stop();
39469
39523
  }
39470
- }, _callee48);
39524
+ }, _callee49);
39471
39525
  }));
39472
39526
  return function leaveRoom(_x57) {
39473
- return _ref48.apply(this, arguments);
39527
+ return _ref49.apply(this, arguments);
39474
39528
  };
39475
39529
  }();
39476
39530
 
@@ -39498,19 +39552,19 @@
39498
39552
  * @returns {Promise<any>}
39499
39553
  */
39500
39554
  var startRecord = /*#__PURE__*/function () {
39501
- var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(fileName, fileType, idx) {
39555
+ var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(fileName, fileType, idx) {
39502
39556
  var streamId;
39503
- return regenerator.wrap(function _callee49$(_context49) {
39504
- while (1) switch (_context49.prev = _context49.next) {
39557
+ return regenerator.wrap(function _callee50$(_context50) {
39558
+ while (1) switch (_context50.prev = _context50.next) {
39505
39559
  case 0:
39506
39560
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39507
39561
  defaultApi$1.writeLog("avsdk TALRTC::startRecord fileName: ".concat(fileName, ", fileType: ").concat(fileType, ", idx: ").concat(idx, ", streamId: ").concat(streamId));
39508
39562
  if (!(idx === 1 && !screenStreamId$1)) {
39509
- _context49.next = 5;
39563
+ _context50.next = 5;
39510
39564
  break;
39511
39565
  }
39512
39566
  defaultApi$1.writeLog('avsdk TALRTC::startRecord screenStreamId is null', null, 'error');
39513
- return _context49.abrupt("return");
39567
+ return _context50.abrupt("return");
39514
39568
  case 5:
39515
39569
  if (!fileName) {
39516
39570
  fileName = "".concat(streamId, "-").concat(util.currentTimeString().replace(/:/g, '-'));
@@ -39521,7 +39575,7 @@
39521
39575
  idx: idx,
39522
39576
  streamId: streamId
39523
39577
  });
39524
- return _context49.abrupt("return", callMethod('StartRecord', {
39578
+ return _context50.abrupt("return", callMethod('StartRecord', {
39525
39579
  streamId: streamId,
39526
39580
  recordType: 3,
39527
39581
  // 1:音频 2:视频 3:音视频
@@ -39530,12 +39584,12 @@
39530
39584
  }));
39531
39585
  case 8:
39532
39586
  case "end":
39533
- return _context49.stop();
39587
+ return _context50.stop();
39534
39588
  }
39535
- }, _callee49);
39589
+ }, _callee50);
39536
39590
  }));
39537
39591
  return function startRecord(_x58, _x59, _x60) {
39538
- return _ref49.apply(this, arguments);
39592
+ return _ref50.apply(this, arguments);
39539
39593
  };
39540
39594
  }();
39541
39595
  /**
@@ -39544,10 +39598,10 @@
39544
39598
  * @returns
39545
39599
  */
39546
39600
  var stopRecord = /*#__PURE__*/function () {
39547
- var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(idx) {
39601
+ var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
39548
39602
  var streamId;
39549
- return regenerator.wrap(function _callee50$(_context50) {
39550
- while (1) switch (_context50.prev = _context50.next) {
39603
+ return regenerator.wrap(function _callee51$(_context51) {
39604
+ while (1) switch (_context51.prev = _context51.next) {
39551
39605
  case 0:
39552
39606
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39553
39607
  defaultApi$1.writeLog("avsdk TALRTC::stopRecord idx: ".concat(idx, ", streamId: ").concat(streamId));
@@ -39555,17 +39609,17 @@
39555
39609
  idx: idx,
39556
39610
  streamId: streamId
39557
39611
  });
39558
- return _context50.abrupt("return", callMethod('StopRecord', {
39612
+ return _context51.abrupt("return", callMethod('StopRecord', {
39559
39613
  streamId: streamId
39560
39614
  }));
39561
39615
  case 4:
39562
39616
  case "end":
39563
- return _context50.stop();
39617
+ return _context51.stop();
39564
39618
  }
39565
- }, _callee50);
39619
+ }, _callee51);
39566
39620
  }));
39567
39621
  return function stopRecord(_x61) {
39568
- return _ref50.apply(this, arguments);
39622
+ return _ref51.apply(this, arguments);
39569
39623
  };
39570
39624
  }();
39571
39625
  /**
@@ -39574,24 +39628,24 @@
39574
39628
  * @returns
39575
39629
  */
39576
39630
  var startCapture = /*#__PURE__*/function () {
39577
- var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
39631
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(idx) {
39578
39632
  var streamId;
39579
- return regenerator.wrap(function _callee51$(_context51) {
39580
- while (1) switch (_context51.prev = _context51.next) {
39633
+ return regenerator.wrap(function _callee52$(_context52) {
39634
+ while (1) switch (_context52.prev = _context52.next) {
39581
39635
  case 0:
39582
39636
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39583
39637
  defaultApi$1.writeLog("avsdk TALRTC::startCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
39584
- return _context51.abrupt("return", callMethod('StartCapture', {
39638
+ return _context52.abrupt("return", callMethod('StartCapture', {
39585
39639
  streamId: streamId
39586
39640
  }));
39587
39641
  case 3:
39588
39642
  case "end":
39589
- return _context51.stop();
39643
+ return _context52.stop();
39590
39644
  }
39591
- }, _callee51);
39645
+ }, _callee52);
39592
39646
  }));
39593
39647
  return function startCapture(_x62) {
39594
- return _ref51.apply(this, arguments);
39648
+ return _ref52.apply(this, arguments);
39595
39649
  };
39596
39650
  }();
39597
39651
  /**
@@ -39600,24 +39654,24 @@
39600
39654
  * @returns
39601
39655
  */
39602
39656
  var stopCapture = /*#__PURE__*/function () {
39603
- var _ref52 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(idx) {
39657
+ var _ref53 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee53(idx) {
39604
39658
  var streamId;
39605
- return regenerator.wrap(function _callee52$(_context52) {
39606
- while (1) switch (_context52.prev = _context52.next) {
39659
+ return regenerator.wrap(function _callee53$(_context53) {
39660
+ while (1) switch (_context53.prev = _context53.next) {
39607
39661
  case 0:
39608
39662
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39609
39663
  defaultApi$1.writeLog("avsdk TALRTC::stopCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
39610
- return _context52.abrupt("return", callMethod('StopCapture', {
39664
+ return _context53.abrupt("return", callMethod('StopCapture', {
39611
39665
  streamId: streamId
39612
39666
  }));
39613
39667
  case 3:
39614
39668
  case "end":
39615
- return _context52.stop();
39669
+ return _context53.stop();
39616
39670
  }
39617
- }, _callee52);
39671
+ }, _callee53);
39618
39672
  }));
39619
39673
  return function stopCapture(_x63) {
39620
- return _ref52.apply(this, arguments);
39674
+ return _ref53.apply(this, arguments);
39621
39675
  };
39622
39676
  }();
39623
39677
  var heartBeatRealKeys$1 = ['video_fps', 'video_bitrate', 'audio_fps', 'audio_bitrate'];
@@ -39906,6 +39960,7 @@
39906
39960
  getCurrentMicrophoneVolume: getCurrentMicrophoneVolume,
39907
39961
  startLocalOrRemotePreview: startLocalOrRemotePreview$1,
39908
39962
  restartCaptureScreen: restartCaptureScreen$1,
39963
+ getScreenType: getScreenType$1,
39909
39964
  startDeviceCheckerPreview: startDeviceCheckerPreview$1,
39910
39965
  stopDeviceCheckerPreview: stopDeviceCheckerPreview,
39911
39966
  enableAudioSpeakerCapture: enableAudioSpeakerCapture,
@@ -40465,6 +40520,17 @@
40465
40520
  return talrtcsdk.restartCaptureScreen();
40466
40521
  }
40467
40522
  };
40523
+ var getScreenType$2 = function getScreenType() {
40524
+ switch (window.zbztAVSDK_init_sdk_type) {
40525
+ case ZEGO:
40526
+ return zegosdk.getScreenType();
40527
+ case TALRTC:
40528
+ case NERTC:
40529
+ case VOLCRTC:
40530
+ default:
40531
+ return talrtcsdk.getScreenType();
40532
+ }
40533
+ };
40468
40534
  var startDeviceCheckerPreview$2 = function startDeviceCheckerPreview(streamId, domId) {
40469
40535
  switch (window.zbztAVSDK_init_sdk_type) {
40470
40536
  case ZEGO:
@@ -42248,6 +42314,7 @@
42248
42314
  openOrCloseCamera: openOrCloseCamera$2,
42249
42315
  getOrLocateVideo: getOrLocateVideo$1,
42250
42316
  restartCaptureScreen: restartCaptureScreen$2,
42317
+ getScreenType: getScreenType$2,
42251
42318
  startDeviceCheckerPreview: startDeviceCheckerPreview$2,
42252
42319
  stopDeviceCheckerPreview: stopDeviceCheckerPreview$1,
42253
42320
  getSpeakerDeviceList: getSpeakerDeviceList$3,
@@ -61608,6 +61675,16 @@
61608
61675
  }, _callee12);
61609
61676
  }))();
61610
61677
  },
61678
+ /**
61679
+ * 获取屏幕共享类型
61680
+ * @returns
61681
+ */
61682
+ getScreenType: function getScreenType() {
61683
+ defaultApi$1.writeLog('sdk action : getScreenType');
61684
+ var type = zbztAVSDK.getScreenType();
61685
+ defaultApi$1.writeLog("sdk action : getScreenType result : ".concat(type));
61686
+ return type;
61687
+ },
61611
61688
  deviceCheckerPreview: function deviceCheckerPreview(args) {
61612
61689
  return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee13() {
61613
61690
  var streamId;