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