zbzt-live-sdk 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * zbzt-live-sdk.js v0.7.1
3
- * 2024-6-28 lanlonggang
2
+ * zbzt-live-sdk.js v0.8.1
3
+ * 2024-7-1 lanlonggang
4
4
  * Released By TAL Live.
5
5
  */
6
6
  (function (global, factory) {
@@ -18331,7 +18331,7 @@
18331
18331
  api: 'api.weclassroom.com',
18332
18332
  report: 's.weclassroom.com'
18333
18333
  };
18334
- var version = '0.7.1';
18334
+ var version = '0.8.1';
18335
18335
  var liveExt = {
18336
18336
  name: 'live',
18337
18337
  version: '1.0.0.0'
@@ -21773,44 +21773,88 @@
21773
21773
  }));
21774
21774
  return _startScreenPreview.apply(this, arguments);
21775
21775
  }
21776
+ function restartCaptureScreen() {
21777
+ return _restartCaptureScreen.apply(this, arguments);
21778
+ }
21779
+ function _restartCaptureScreen() {
21780
+ _restartCaptureScreen = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
21781
+ var oldStream, res;
21782
+ return regenerator.wrap(function _callee32$(_context32) {
21783
+ while (1) switch (_context32.prev = _context32.next) {
21784
+ case 0:
21785
+ defaultApi$1.writeLog('ZEGO:: restartCaptureScreen');
21786
+ if (screenStream) {
21787
+ _context32.next = 4;
21788
+ break;
21789
+ }
21790
+ defaultApi$1.writeLog('ZEGO:: restartCaptureScreen screenStream is not exist', null, 'error');
21791
+ return _context32.abrupt("return");
21792
+ case 4:
21793
+ oldStream = screenStream;
21794
+ screenStream = null;
21795
+ // 重新创建屏幕共享流
21796
+ _context32.next = 8;
21797
+ return startScreenPreview();
21798
+ case 8:
21799
+ // 销毁并停止发布旧的屏幕共享流
21800
+ zg.destroyStream(oldStream);
21801
+ zg.stopPublishingStream(screenStreamId);
21802
+ // 重新发布新的屏幕共享流
21803
+ res = zg.startPublishingStream(screenStreamId, screenStream);
21804
+ if (!res) {
21805
+ NOTICE.pushStreamError({
21806
+ streamId: streamId
21807
+ });
21808
+ }
21809
+ if (screenConstraints.captureView) {
21810
+ screenStream.playVideo(screenConstraints.captureView);
21811
+ }
21812
+ case 13:
21813
+ case "end":
21814
+ return _context32.stop();
21815
+ }
21816
+ }, _callee32);
21817
+ }));
21818
+ return _restartCaptureScreen.apply(this, arguments);
21819
+ }
21776
21820
  function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
21777
21821
  return _initPullFlow.apply(this, arguments);
21778
21822
  }
21779
21823
  function _initPullFlow() {
21780
- _initPullFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId, domId, mute, pInfo, notAutoPlay, audioOnly) {
21824
+ _initPullFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId, domId, mute, pInfo, notAutoPlay, audioOnly) {
21781
21825
  var playChannel, remoteStream;
21782
- return regenerator.wrap(function _callee32$(_context32) {
21783
- while (1) switch (_context32.prev = _context32.next) {
21826
+ return regenerator.wrap(function _callee33$(_context33) {
21827
+ while (1) switch (_context33.prev = _context33.next) {
21784
21828
  case 0:
21785
21829
  defaultApi$1.writeLog("ZEGO:: initPullFlow_start ,streamId :".concat(streamId, ", domId: ").concat(domId, ", mute: ").concat(mute, ", pInfo: ").concat(pInfo, ", notAutoPlay: ").concat(notAutoPlay, ", audioOnly: ").concat(audioOnly));
21786
21830
  // NOTE 1. 重置埋点数据
21787
21831
  playChannel = _initPullData(streamId); // NOTE 5. 配置拉流参数
21788
21832
  //是否拉取声音
21789
- _context32.next = 4;
21833
+ _context33.next = 4;
21790
21834
  return activateAudioPlayStream(streamId, !mute);
21791
21835
  case 4:
21792
- _context32.next = 6;
21836
+ _context33.next = 6;
21793
21837
  return activateVideoPlayStream(streamId, !audioOnly);
21794
21838
  case 6:
21795
- _context32.next = 8;
21839
+ _context33.next = 8;
21796
21840
  return playStream(streamId, playChannel, pInfo);
21797
21841
  case 8:
21798
- remoteStream = _context32.sent;
21842
+ remoteStream = _context33.sent;
21799
21843
  streamIdToStream[streamId] = remoteStream;
21800
21844
  window.remoteStream = remoteStream;
21801
21845
  // 创建视图
21802
- _context32.next = 13;
21846
+ _context33.next = 13;
21803
21847
  return startLocalOrRemotePreview(false, streamId, domId, mute);
21804
21848
  case 13:
21805
- return _context32.abrupt("return", {
21849
+ return _context33.abrupt("return", {
21806
21850
  videoSrc: '',
21807
21851
  playerId: playChannel
21808
21852
  });
21809
21853
  case 14:
21810
21854
  case "end":
21811
- return _context32.stop();
21855
+ return _context33.stop();
21812
21856
  }
21813
- }, _callee32);
21857
+ }, _callee33);
21814
21858
  }));
21815
21859
  return _initPullFlow.apply(this, arguments);
21816
21860
  }
@@ -21861,14 +21905,14 @@
21861
21905
  return _startMixtStream.apply(this, arguments);
21862
21906
  }
21863
21907
  function _startMixtStream() {
21864
- _startMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(args) {
21908
+ _startMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(args) {
21865
21909
  var streamID, taskID, url;
21866
- return regenerator.wrap(function _callee33$(_context33) {
21867
- while (1) switch (_context33.prev = _context33.next) {
21910
+ return regenerator.wrap(function _callee34$(_context34) {
21911
+ while (1) switch (_context34.prev = _context34.next) {
21868
21912
  case 0:
21869
21913
  streamID = args.streamID, taskID = args.taskID, url = args.url;
21870
21914
  defaultApi$1.writeLog("avsdk ZEGO::startMixerTask taskID: ".concat(taskID, " streamID: ").concat(streamID, ", url: ").concat(url));
21871
- return _context33.abrupt("return", zg.startMixerTask({
21915
+ return _context34.abrupt("return", zg.startMixerTask({
21872
21916
  taskID: taskID,
21873
21917
  inputList: [{
21874
21918
  streamID: streamID,
@@ -21892,9 +21936,9 @@
21892
21936
  }));
21893
21937
  case 3:
21894
21938
  case "end":
21895
- return _context33.stop();
21939
+ return _context34.stop();
21896
21940
  }
21897
- }, _callee33);
21941
+ }, _callee34);
21898
21942
  }));
21899
21943
  return _startMixtStream.apply(this, arguments);
21900
21944
  }
@@ -21909,24 +21953,24 @@
21909
21953
  * @return Promise | void
21910
21954
  */
21911
21955
  function _stopMixtStream() {
21912
- _stopMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(taskId) {
21913
- return regenerator.wrap(function _callee34$(_context34) {
21914
- while (1) switch (_context34.prev = _context34.next) {
21956
+ _stopMixtStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(taskId) {
21957
+ return regenerator.wrap(function _callee35$(_context35) {
21958
+ while (1) switch (_context35.prev = _context35.next) {
21915
21959
  case 0:
21916
21960
  if (taskId) {
21917
- _context34.next = 3;
21961
+ _context35.next = 3;
21918
21962
  break;
21919
21963
  }
21920
21964
  defaultApi$1.writeLog("avsdk ZEGO::stopMixerTask taskID:".concat(taskId, " is not exist"), null, 'error');
21921
- return _context34.abrupt("return");
21965
+ return _context35.abrupt("return");
21922
21966
  case 3:
21923
21967
  defaultApi$1.writeLog("avsdk ZEGO::stopMixerTask taskID: ".concat(taskId));
21924
- return _context34.abrupt("return", zg.stopMixerTask(taskId));
21968
+ return _context35.abrupt("return", zg.stopMixerTask(taskId));
21925
21969
  case 5:
21926
21970
  case "end":
21927
- return _context34.stop();
21971
+ return _context35.stop();
21928
21972
  }
21929
- }, _callee34);
21973
+ }, _callee35);
21930
21974
  }));
21931
21975
  return _stopMixtStream.apply(this, arguments);
21932
21976
  }
@@ -21934,10 +21978,10 @@
21934
21978
  return _playStream.apply(this, arguments);
21935
21979
  }
21936
21980
  function _playStream() {
21937
- _playStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(streamId, uiChnIndex, pInfo) {
21981
+ _playStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, uiChnIndex, pInfo) {
21938
21982
  var streamInfo;
21939
- return regenerator.wrap(function _callee35$(_context35) {
21940
- while (1) switch (_context35.prev = _context35.next) {
21983
+ return regenerator.wrap(function _callee36$(_context36) {
21984
+ while (1) switch (_context36.prev = _context36.next) {
21941
21985
  case 0:
21942
21986
  if (typeof pInfo === 'undefined') {
21943
21987
  // SEI
@@ -21945,7 +21989,7 @@
21945
21989
  }
21946
21990
  streamInfo = streamIdRtcPlayerInfo1[streamId];
21947
21991
  defaultApi$1.writeLog("avsdk ZEGO::PlayStream streamId: ".concat(streamId, " streamInfo: ").concat(JSON.stringify(streamInfo)));
21948
- return _context35.abrupt("return", zg.startPlayingStream(streamId, {
21992
+ return _context36.abrupt("return", zg.startPlayingStream(streamId, {
21949
21993
  // TODO 拉流参数配置
21950
21994
  // video: !!!audioOnly,
21951
21995
  video: streamInfo.video_type,
@@ -21954,9 +21998,9 @@
21954
21998
  }));
21955
21999
  case 4:
21956
22000
  case "end":
21957
- return _context35.stop();
22001
+ return _context36.stop();
21958
22002
  }
21959
- }, _callee35);
22003
+ }, _callee36);
21960
22004
  }));
21961
22005
  return _playStream.apply(this, arguments);
21962
22006
  }
@@ -21964,10 +22008,10 @@
21964
22008
  return _stopPlayStream.apply(this, arguments);
21965
22009
  }
21966
22010
  function _stopPlayStream() {
21967
- _stopPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, recovery) {
22011
+ _stopPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId, recovery) {
21968
22012
  var dom;
21969
- return regenerator.wrap(function _callee36$(_context36) {
21970
- while (1) switch (_context36.prev = _context36.next) {
22013
+ return regenerator.wrap(function _callee37$(_context37) {
22014
+ while (1) switch (_context37.prev = _context37.next) {
21971
22015
  case 0:
21972
22016
  console.warn('[停止拉流]', streamId);
21973
22017
  delete streamIdRtcPlayerInfo[streamId];
@@ -21988,9 +22032,9 @@
21988
22032
  } catch (error) {}
21989
22033
  case 7:
21990
22034
  case "end":
21991
- return _context36.stop();
22035
+ return _context37.stop();
21992
22036
  }
21993
- }, _callee36);
22037
+ }, _callee37);
21994
22038
  }));
21995
22039
  return _stopPlayStream.apply(this, arguments);
21996
22040
  }
@@ -22010,10 +22054,10 @@
22010
22054
  return _leaveRoom.apply(this, arguments);
22011
22055
  }
22012
22056
  function _leaveRoom() {
22013
- _leaveRoom = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(type) {
22057
+ _leaveRoom = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(type) {
22014
22058
  var key;
22015
- return regenerator.wrap(function _callee37$(_context37) {
22016
- while (1) switch (_context37.prev = _context37.next) {
22059
+ return regenerator.wrap(function _callee38$(_context38) {
22060
+ while (1) switch (_context38.prev = _context38.next) {
22017
22061
  case 0:
22018
22062
  globalVariables.localPreviewDomId = null;
22019
22063
  // NOTE 1. 停止声浪监听 WEB端无需单独停止
@@ -22051,9 +22095,9 @@
22051
22095
  window.zg = null;
22052
22096
  case 15:
22053
22097
  case "end":
22054
- return _context37.stop();
22098
+ return _context38.stop();
22055
22099
  }
22056
- }, _callee37);
22100
+ }, _callee38);
22057
22101
  }));
22058
22102
  return _leaveRoom.apply(this, arguments);
22059
22103
  }
@@ -22061,19 +22105,19 @@
22061
22105
  return _leaveRoomWithChangeSDK.apply(this, arguments);
22062
22106
  }
22063
22107
  function _leaveRoomWithChangeSDK() {
22064
- _leaveRoomWithChangeSDK = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
22108
+ _leaveRoomWithChangeSDK = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
22065
22109
  var localPreviewDomId;
22066
- return regenerator.wrap(function _callee38$(_context38) {
22067
- while (1) switch (_context38.prev = _context38.next) {
22110
+ return regenerator.wrap(function _callee39$(_context39) {
22111
+ while (1) switch (_context39.prev = _context39.next) {
22068
22112
  case 0:
22069
22113
  localPreviewDomId = globalVariables.localPreviewDomId;
22070
22114
  leaveRoom();
22071
22115
  globalVariables.localPreviewDomId = localPreviewDomId;
22072
22116
  case 3:
22073
22117
  case "end":
22074
- return _context38.stop();
22118
+ return _context39.stop();
22075
22119
  }
22076
- }, _callee38);
22120
+ }, _callee39);
22077
22121
  }));
22078
22122
  return _leaveRoomWithChangeSDK.apply(this, arguments);
22079
22123
  }
@@ -22081,10 +22125,10 @@
22081
22125
  return _playerSnapShot.apply(this, arguments);
22082
22126
  }
22083
22127
  function _playerSnapShot() {
22084
- _playerSnapShot = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39(streamId) {
22128
+ _playerSnapShot = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId) {
22085
22129
  var uri;
22086
- return regenerator.wrap(function _callee39$(_context39) {
22087
- while (1) switch (_context39.prev = _context39.next) {
22130
+ return regenerator.wrap(function _callee40$(_context40) {
22131
+ while (1) switch (_context40.prev = _context40.next) {
22088
22132
  case 0:
22089
22133
  defaultApi$1.writeLog("avsdk ZEGO::playerSnapShot streamId: ".concat(streamId));
22090
22134
  if (streamId === localStreamId) {
@@ -22092,12 +22136,12 @@
22092
22136
  } else {
22093
22137
  uri = screenStream.takeStreamSnapshot();
22094
22138
  }
22095
- return _context39.abrupt("return", util.getImageDataFromURL(uri));
22139
+ return _context40.abrupt("return", util.getImageDataFromURL(uri));
22096
22140
  case 3:
22097
22141
  case "end":
22098
- return _context39.stop();
22142
+ return _context40.stop();
22099
22143
  }
22100
- }, _callee39);
22144
+ }, _callee40);
22101
22145
  }));
22102
22146
  return _playerSnapShot.apply(this, arguments);
22103
22147
  }
@@ -22110,10 +22154,10 @@
22110
22154
  * @param streamid:String 被拉取的流的 id,必选
22111
22155
  */
22112
22156
  function _activateAudioPlayStream() {
22113
- _activateAudioPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId, bActive) {
22157
+ _activateAudioPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, bActive) {
22114
22158
  var stream, view;
22115
- return regenerator.wrap(function _callee40$(_context40) {
22116
- while (1) switch (_context40.prev = _context40.next) {
22159
+ return regenerator.wrap(function _callee41$(_context41) {
22160
+ while (1) switch (_context41.prev = _context41.next) {
22117
22161
  case 0:
22118
22162
  // NOTE WEB无此接口,此处业务侧应该是想达到是否渲染音视频的目的。所以web端先拉流,再按此设置值渲染
22119
22163
  // NOTE 关联代码 streamview.play()
@@ -22121,11 +22165,11 @@
22121
22165
  resetStreamIdRtcPlayerInfo1(streamId);
22122
22166
  }
22123
22167
  if (!(streamIdRtcPlayerInfo1[streamId].audio_type === bActive)) {
22124
- _context40.next = 4;
22168
+ _context41.next = 4;
22125
22169
  break;
22126
22170
  }
22127
22171
  defaultApi$1.writeLog("avsdk ZEGO::activateAudioPlayStream streamId: ".concat(streamId, " bActive: ").concat(bActive, " is not changed"));
22128
- return _context40.abrupt("return");
22172
+ return _context41.abrupt("return");
22129
22173
  case 4:
22130
22174
  streamIdRtcPlayerInfo1[streamId].audio_type = bActive;
22131
22175
  /**
@@ -22133,10 +22177,10 @@
22133
22177
  */
22134
22178
  stream = streamIdToStream[streamId];
22135
22179
  if (!stream) {
22136
- _context40.next = 9;
22180
+ _context41.next = 9;
22137
22181
  break;
22138
22182
  }
22139
- _context40.next = 9;
22183
+ _context41.next = 9;
22140
22184
  return zg.mutePlayStreamAudio(streamId, !bActive);
22141
22185
  case 9:
22142
22186
  view = streamIdToStreamView[streamId];
@@ -22145,9 +22189,9 @@
22145
22189
  }
22146
22190
  case 11:
22147
22191
  case "end":
22148
- return _context40.stop();
22192
+ return _context41.stop();
22149
22193
  }
22150
- }, _callee40);
22194
+ }, _callee41);
22151
22195
  }));
22152
22196
  return _activateAudioPlayStream.apply(this, arguments);
22153
22197
  }
@@ -22155,15 +22199,15 @@
22155
22199
  return _pullAudioFlow.apply(this, arguments);
22156
22200
  }
22157
22201
  function _pullAudioFlow() {
22158
- _pullAudioFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, operation) {
22202
+ _pullAudioFlow = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, operation) {
22159
22203
  var dom, div;
22160
- return regenerator.wrap(function _callee41$(_context41) {
22161
- while (1) switch (_context41.prev = _context41.next) {
22204
+ return regenerator.wrap(function _callee42$(_context42) {
22205
+ while (1) switch (_context42.prev = _context42.next) {
22162
22206
  case 0:
22163
22207
  // NOTE 1. 数据埋点、上报
22164
22208
  defaultApi$1.writeLog("pullAudioFlow -- operation ".concat(operation, " streamId ").concat(streamId));
22165
22209
  if (streamId) {
22166
- _context41.next = 3;
22210
+ _context42.next = 3;
22167
22211
  break;
22168
22212
  }
22169
22213
  throw new Error('pullAudioFlow -- streamId is not allowed to be empty');
@@ -22189,20 +22233,20 @@
22189
22233
  ;
22190
22234
  // NOTE 2. 正式拉流;
22191
22235
  if (streamIdToStream[streamId]) {
22192
- _context41.next = 11;
22236
+ _context42.next = 11;
22193
22237
  break;
22194
22238
  }
22195
- _context41.next = 10;
22239
+ _context42.next = 10;
22196
22240
  return zg.startPlayingStream(streamId, {
22197
22241
  video: false
22198
22242
  });
22199
22243
  case 10:
22200
- streamIdToStream[streamId] = _context41.sent;
22244
+ streamIdToStream[streamId] = _context42.sent;
22201
22245
  case 11:
22202
22246
  ;
22203
22247
  // NOTE 3. 流挂载到body上
22204
22248
  if (operation) {
22205
- _context41.next = 20;
22249
+ _context42.next = 20;
22206
22250
  break;
22207
22251
  }
22208
22252
  try {
@@ -22215,16 +22259,16 @@
22215
22259
  div.style.display = 'none';
22216
22260
  div.id = streamId;
22217
22261
  document.body.appendChild(div);
22218
- _context41.next = 20;
22262
+ _context42.next = 20;
22219
22263
  return startLocalOrRemotePreview(false, streamId, streamId);
22220
22264
  case 20:
22221
- _context41.next = 22;
22265
+ _context42.next = 22;
22222
22266
  return zg.mutePlayStreamAudio(streamId, operation);
22223
22267
  case 22:
22224
22268
  case "end":
22225
- return _context41.stop();
22269
+ return _context42.stop();
22226
22270
  }
22227
- }, _callee41);
22271
+ }, _callee42);
22228
22272
  }));
22229
22273
  return _pullAudioFlow.apply(this, arguments);
22230
22274
  }
@@ -22232,33 +22276,33 @@
22232
22276
  return _activateVideoPlayStream.apply(this, arguments);
22233
22277
  }
22234
22278
  function _activateVideoPlayStream() {
22235
- _activateVideoPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, bActive) {
22236
- return regenerator.wrap(function _callee42$(_context42) {
22237
- while (1) switch (_context42.prev = _context42.next) {
22279
+ _activateVideoPlayStream = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, bActive) {
22280
+ return regenerator.wrap(function _callee43$(_context43) {
22281
+ while (1) switch (_context43.prev = _context43.next) {
22238
22282
  case 0:
22239
22283
  // NOTE WEB无此接口,此处业务侧应该是想达到是否渲染音视频的目的。所以web端先拉流,再按此设置值渲染
22240
22284
  if (!streamIdRtcPlayerInfo1[streamId]) {
22241
22285
  resetStreamIdRtcPlayerInfo1(streamId);
22242
22286
  }
22243
22287
  if (!(streamIdRtcPlayerInfo1[streamId].video_type === bActive)) {
22244
- _context42.next = 4;
22288
+ _context43.next = 4;
22245
22289
  break;
22246
22290
  }
22247
22291
  defaultApi$1.writeLog("avsdk ZEGO::activateVideoPlayStream streamId: ".concat(streamId, " bActive: ").concat(bActive, " is not changed"));
22248
- return _context42.abrupt("return");
22292
+ return _context43.abrupt("return");
22249
22293
  case 4:
22250
22294
  streamIdRtcPlayerInfo1[streamId].video_type = bActive;
22251
22295
  if (!streamIdToStream[streamId]) {
22252
- _context42.next = 8;
22296
+ _context43.next = 8;
22253
22297
  break;
22254
22298
  }
22255
- _context42.next = 8;
22299
+ _context43.next = 8;
22256
22300
  return zg.mutePlayStreamVideo(streamId, !bActive);
22257
22301
  case 8:
22258
22302
  case "end":
22259
- return _context42.stop();
22303
+ return _context43.stop();
22260
22304
  }
22261
- }, _callee42);
22305
+ }, _callee43);
22262
22306
  }));
22263
22307
  return _activateVideoPlayStream.apply(this, arguments);
22264
22308
  }
@@ -22781,6 +22825,7 @@
22781
22825
  getSpeakerSimpleVolume: getSpeakerSimpleVolume,
22782
22826
  setSpeakerSimpleVolume: setSpeakerSimpleVolume,
22783
22827
  setSpeakerSimpleMute: setSpeakerSimpleMute,
22828
+ restartCaptureScreen: restartCaptureScreen,
22784
22829
  setPreviewView: setPreviewView,
22785
22830
  // native端是先设置视图再预览,WEB不需要设置视图,无此功能
22786
22831
  startPreview: startPreview,
@@ -23179,7 +23224,7 @@
23179
23224
  lib.InvalidTokenError = InvalidTokenError_1;
23180
23225
 
23181
23226
  var StaticConfig = {
23182
- agentVersion: "OmniRTC_Web_V1.1.3-peiyou.2",
23227
+ agentVersion: "OmniRTC_Web_V1.1.4-peiyou.0",
23183
23228
  logVersion: 1,
23184
23229
  serviceType: 320,
23185
23230
  logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
@@ -34487,16 +34532,16 @@
34487
34532
  var localVideoTrack, localAudioTrack, screenVideoTrack, screenAudioTrack;
34488
34533
  return __generator(this, function (_a) {
34489
34534
  switch (_a.label) {
34490
- case 0: return [4 /*yield*/, this._engine.stopScreenCapture()];
34535
+ case 0:
34536
+ // await this._engine.stopScreenCapture();
34537
+ return [4 /*yield*/, this._handleScreenVideoTrackInitConfig(config)];
34491
34538
  case 1:
34492
- _a.sent();
34493
- return [4 /*yield*/, this._handleScreenVideoTrackInitConfig(config)];
34494
- case 2:
34539
+ // await this._engine.stopScreenCapture();
34495
34540
  _a.sent();
34496
34541
  return [4 /*yield*/, this._engine.startScreenCapture({
34497
34542
  enableAudio: withAudio !== 'disable',
34498
34543
  })];
34499
- case 3:
34544
+ case 2:
34500
34545
  _a.sent();
34501
34546
  localVideoTrack = this._engine.getLocalStreamTrack(StreamIndex.STREAM_INDEX_SCREEN, 'video');
34502
34547
  localAudioTrack = this._engine.getLocalStreamTrack(StreamIndex.STREAM_INDEX_SCREEN, 'audio');
@@ -36621,10 +36666,10 @@
36621
36666
  * @returns {string}
36622
36667
  */
36623
36668
  function _getToken$1() {
36624
- _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(appid, room, user, planid) {
36669
+ _getToken$1 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee53(appid, room, user, planid) {
36625
36670
  var querys;
36626
- return regenerator.wrap(function _callee52$(_context52) {
36627
- while (1) switch (_context52.prev = _context52.next) {
36671
+ return regenerator.wrap(function _callee53$(_context53) {
36672
+ while (1) switch (_context53.prev = _context53.next) {
36628
36673
  case 0:
36629
36674
  querys = {
36630
36675
  appid: appid,
@@ -36632,12 +36677,12 @@
36632
36677
  room: room,
36633
36678
  user: formatUserId(user)
36634
36679
  };
36635
- return _context52.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
36680
+ return _context53.abrupt("return", commonFetch(getTokenServerUrl() + '/webrtc/xueersitoken', querys, 'GET'));
36636
36681
  case 2:
36637
36682
  case "end":
36638
- return _context52.stop();
36683
+ return _context53.stop();
36639
36684
  }
36640
- }, _callee52);
36685
+ }, _callee53);
36641
36686
  }));
36642
36687
  return _getToken$1.apply(this, arguments);
36643
36688
  }
@@ -38185,7 +38230,38 @@
38185
38230
  return _ref24.apply(this, arguments);
38186
38231
  };
38187
38232
  }();
38188
-
38233
+ var restartCaptureScreen$1 = /*#__PURE__*/function () {
38234
+ var _ref25 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
38235
+ return regenerator.wrap(function _callee25$(_context25) {
38236
+ while (1) switch (_context25.prev = _context25.next) {
38237
+ case 0:
38238
+ defaultApi$1.writeLog('avsdk TALRTC::restartCaptureScreen');
38239
+ if (screenTrack) {
38240
+ _context25.next = 4;
38241
+ break;
38242
+ }
38243
+ defaultApi$1.writeLog('avsdk TALRTC::restartCaptureScreen - screenTrack is not exist', null, 'error');
38244
+ return _context25.abrupt("return");
38245
+ case 4:
38246
+ screenTrack.removeAllListeners();
38247
+ _context25.next = 7;
38248
+ return startScreenCapture();
38249
+ case 7:
38250
+ if (screenPreviewDomId) {
38251
+ screenTrack.play(screenPreviewDomId, {
38252
+ fit: 'contain'
38253
+ });
38254
+ }
38255
+ case 8:
38256
+ case "end":
38257
+ return _context25.stop();
38258
+ }
38259
+ }, _callee25);
38260
+ }));
38261
+ return function restartCaptureScreen() {
38262
+ return _ref25.apply(this, arguments);
38263
+ };
38264
+ }();
38189
38265
  /**
38190
38266
  * @function 停止屏幕采集
38191
38267
  * @return Promise | void
@@ -38196,20 +38272,20 @@
38196
38272
  // return callMethod('StopScreenCapture', {});
38197
38273
  };
38198
38274
  var startDeviceCheckerPreview$1 = /*#__PURE__*/function () {
38199
- var _ref25 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25(streamId, domId) {
38200
- return regenerator.wrap(function _callee25$(_context25) {
38201
- while (1) switch (_context25.prev = _context25.next) {
38275
+ var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26(streamId, domId) {
38276
+ return regenerator.wrap(function _callee26$(_context26) {
38277
+ while (1) switch (_context26.prev = _context26.next) {
38202
38278
  case 0:
38203
38279
  defaultApi$1.writeLog("avsdk TALRTC::startDeviceCheckerPreview -- streamId: ".concat(streamId, ", domId: ").concat(domId));
38204
38280
  if (domId) {
38205
- _context25.next = 4;
38281
+ _context26.next = 4;
38206
38282
  break;
38207
38283
  }
38208
38284
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - domId is required', null, 'error');
38209
38285
  throw new Error('avsdk TALRTC::startDeviceCheckerPreview - domId is required');
38210
38286
  case 4:
38211
38287
  if (streamId) {
38212
- _context25.next = 7;
38288
+ _context26.next = 7;
38213
38289
  break;
38214
38290
  }
38215
38291
  defaultApi$1.writeLog('avsdk TALRTC::startDeviceCheckerPreview - streamId is required', null, 'error');
@@ -38217,22 +38293,22 @@
38217
38293
  case 7:
38218
38294
  deviceCheckerDomId = domId;
38219
38295
  if (!(streamId === localStreamId$1)) {
38220
- _context25.next = 12;
38296
+ _context26.next = 12;
38221
38297
  break;
38222
38298
  }
38223
- _context25.next = 11;
38299
+ _context26.next = 11;
38224
38300
  return talrtc.createCameraVideoTrack({
38225
38301
  cameraId: window.zbztAVSDK_device_checker_init.camera.use,
38226
38302
  encoderConfig: videoEncoderConfig
38227
38303
  });
38228
38304
  case 11:
38229
- deviceCheckerTrack = _context25.sent;
38305
+ deviceCheckerTrack = _context26.sent;
38230
38306
  case 12:
38231
38307
  if (!(streamId === screenStreamId$1)) {
38232
- _context25.next = 16;
38308
+ _context26.next = 16;
38233
38309
  break;
38234
38310
  }
38235
- _context25.next = 15;
38311
+ _context26.next = 15;
38236
38312
  return talrtc.createScreenVideoTrack({
38237
38313
  encoderConfig: {
38238
38314
  width: SCREEN_CONSTRAINTS.width,
@@ -38242,19 +38318,19 @@
38242
38318
  screenSourceType: 'application'
38243
38319
  }, 'disable');
38244
38320
  case 15:
38245
- deviceCheckerTrack = _context25.sent;
38321
+ deviceCheckerTrack = _context26.sent;
38246
38322
  case 16:
38247
38323
  deviceCheckerTrack.play(domId, {
38248
38324
  fit: 'contain'
38249
38325
  });
38250
38326
  case 17:
38251
38327
  case "end":
38252
- return _context25.stop();
38328
+ return _context26.stop();
38253
38329
  }
38254
- }, _callee25);
38330
+ }, _callee26);
38255
38331
  }));
38256
38332
  return function startDeviceCheckerPreview(_x24, _x25) {
38257
- return _ref25.apply(this, arguments);
38333
+ return _ref26.apply(this, arguments);
38258
38334
  };
38259
38335
  }();
38260
38336
  var stopDeviceCheckerPreview = function stopDeviceCheckerPreview() {
@@ -38274,14 +38350,14 @@
38274
38350
  * @return Promise 可从 Promise 中获取 src,Promise.then((src) => {})
38275
38351
  */
38276
38352
  var startLocalOrRemotePreview$1 = /*#__PURE__*/function () {
38277
- var _ref26 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26(isLocal, streamId, domId) {
38353
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(isLocal, streamId, domId) {
38278
38354
  var _streamId$split, _streamId$split2, roomId, _userId, _liveId, user;
38279
- return regenerator.wrap(function _callee26$(_context26) {
38280
- while (1) switch (_context26.prev = _context26.next) {
38355
+ return regenerator.wrap(function _callee27$(_context27) {
38356
+ while (1) switch (_context27.prev = _context27.next) {
38281
38357
  case 0:
38282
38358
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview streamId: ".concat(streamId, ", isLocal: ").concat(isLocal, ", domId: ").concat(domId));
38283
38359
  if (!isLocal) {
38284
- _context26.next = 12;
38360
+ _context27.next = 12;
38285
38361
  break;
38286
38362
  }
38287
38363
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - localStreamId: ".concat(localStreamId$1, ", videoTrack: ").concat(videoTrack));
@@ -38294,39 +38370,39 @@
38294
38370
  }
38295
38371
  }
38296
38372
  if (!(streamId === screenStreamId$1)) {
38297
- _context26.next = 10;
38373
+ _context27.next = 10;
38298
38374
  break;
38299
38375
  }
38300
38376
  screenPreviewDomId = domId;
38301
38377
  if (screenTrack) {
38302
- _context26.next = 9;
38378
+ _context27.next = 9;
38303
38379
  break;
38304
38380
  }
38305
- _context26.next = 9;
38381
+ _context27.next = 9;
38306
38382
  return startScreenCapture();
38307
38383
  case 9:
38308
38384
  screenTrack.play(domId, {
38309
38385
  fit: 'contain'
38310
38386
  });
38311
38387
  case 10:
38312
- _context26.next = 21;
38388
+ _context27.next = 21;
38313
38389
  break;
38314
38390
  case 12:
38315
38391
  if (!(!streamId || !domId)) {
38316
- _context26.next = 15;
38392
+ _context27.next = 15;
38317
38393
  break;
38318
38394
  }
38319
38395
  defaultApi$1.writeLog('avsdk TALRTC::startLocalOrRemotePreview - streamId and domId is required', null, 'error');
38320
- return _context26.abrupt("return");
38396
+ return _context27.abrupt("return");
38321
38397
  case 15:
38322
38398
  _streamId$split = streamId.split('_'), _streamId$split2 = _slicedToArray(_streamId$split, 4), roomId = _streamId$split2[1], _userId = _streamId$split2[2], _liveId = _streamId$split2[3];
38323
38399
  user = users.get("".concat(roomId, "_").concat(formatUserId(_userId)));
38324
38400
  if (user) {
38325
- _context26.next = 20;
38401
+ _context27.next = 20;
38326
38402
  break;
38327
38403
  }
38328
38404
  defaultApi$1.writeLog("avsdk TALRTC::startLocalOrRemotePreview - user:".concat(_userId, " not found."));
38329
- return _context26.abrupt("return");
38405
+ return _context27.abrupt("return");
38330
38406
  case 20:
38331
38407
  if (_liveId === '1') {
38332
38408
  // 主流播放
@@ -38347,12 +38423,12 @@
38347
38423
  }
38348
38424
  case 21:
38349
38425
  case "end":
38350
- return _context26.stop();
38426
+ return _context27.stop();
38351
38427
  }
38352
- }, _callee26);
38428
+ }, _callee27);
38353
38429
  }));
38354
38430
  return function startLocalOrRemotePreview(_x26, _x27, _x28) {
38355
- return _ref26.apply(this, arguments);
38431
+ return _ref27.apply(this, arguments);
38356
38432
  };
38357
38433
  }();
38358
38434
 
@@ -38361,16 +38437,16 @@
38361
38437
  * @param {'audio' | 'video' | 'both'} type
38362
38438
  */
38363
38439
  var startPushLocalStream = /*#__PURE__*/function () {
38364
- var _ref27 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27(type) {
38440
+ var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(type) {
38365
38441
  var roomId, client, tracks;
38366
- return regenerator.wrap(function _callee27$(_context27) {
38367
- while (1) switch (_context27.prev = _context27.next) {
38442
+ return regenerator.wrap(function _callee28$(_context28) {
38443
+ while (1) switch (_context28.prev = _context28.next) {
38368
38444
  case 0:
38369
38445
  defaultApi$1.writeLog("avsdk TALRTC::startPushLocalStream ".concat(type));
38370
38446
  roomId = util.getRoomIdByStreamId(localStreamId$1);
38371
38447
  client = clients.get(roomId);
38372
38448
  if (client) {
38373
- _context27.next = 7;
38449
+ _context28.next = 7;
38374
38450
  break;
38375
38451
  }
38376
38452
  defaultApi$1.writeLog('avsdk TALRTC::startPushLocalStream - init first', null, 'error');
@@ -38384,32 +38460,32 @@
38384
38460
  if ((type === 'both' || type === 'video') && videoTrack) {
38385
38461
  tracks.push(videoTrack);
38386
38462
  }
38387
- _context27.next = 12;
38463
+ _context28.next = 12;
38388
38464
  return client.publish(tracks);
38389
38465
  case 12:
38390
38466
  case "end":
38391
- return _context27.stop();
38467
+ return _context28.stop();
38392
38468
  }
38393
- }, _callee27);
38469
+ }, _callee28);
38394
38470
  }));
38395
38471
  return function startPushLocalStream(_x29) {
38396
- return _ref27.apply(this, arguments);
38472
+ return _ref28.apply(this, arguments);
38397
38473
  };
38398
38474
  }();
38399
38475
  /**
38400
38476
  * @param {'audio' | 'video' | 'both'} type
38401
38477
  */
38402
38478
  var stopPushLocalStream = /*#__PURE__*/function () {
38403
- var _ref28 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(type) {
38479
+ var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29(type) {
38404
38480
  var roomId, client, tracks;
38405
- return regenerator.wrap(function _callee28$(_context28) {
38406
- while (1) switch (_context28.prev = _context28.next) {
38481
+ return regenerator.wrap(function _callee29$(_context29) {
38482
+ while (1) switch (_context29.prev = _context29.next) {
38407
38483
  case 0:
38408
38484
  defaultApi$1.writeLog("avsdk TALRTC::stopPushLocalStream ".concat(type));
38409
38485
  roomId = util.getRoomIdByStreamId(localStreamId$1);
38410
38486
  client = clients.get(roomId);
38411
38487
  if (client) {
38412
- _context28.next = 6;
38488
+ _context29.next = 6;
38413
38489
  break;
38414
38490
  }
38415
38491
  defaultApi$1.writeLog('avsdk TALRTC::stopPushLocalStream - init first', null, 'error');
@@ -38422,29 +38498,29 @@
38422
38498
  if ((type === 'both' || type === 'video') && videoTrack) {
38423
38499
  tracks.push(videoTrack);
38424
38500
  }
38425
- _context28.next = 11;
38501
+ _context29.next = 11;
38426
38502
  return client.unpublish(tracks);
38427
38503
  case 11:
38428
38504
  case "end":
38429
- return _context28.stop();
38505
+ return _context29.stop();
38430
38506
  }
38431
- }, _callee28);
38507
+ }, _callee29);
38432
38508
  }));
38433
38509
  return function stopPushLocalStream(_x30) {
38434
- return _ref28.apply(this, arguments);
38510
+ return _ref29.apply(this, arguments);
38435
38511
  };
38436
38512
  }();
38437
38513
  var startPushScreenStream = /*#__PURE__*/function () {
38438
- var _ref29 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
38514
+ var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
38439
38515
  var roomId, client;
38440
- return regenerator.wrap(function _callee29$(_context29) {
38441
- while (1) switch (_context29.prev = _context29.next) {
38516
+ return regenerator.wrap(function _callee30$(_context30) {
38517
+ while (1) switch (_context30.prev = _context30.next) {
38442
38518
  case 0:
38443
38519
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream');
38444
38520
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
38445
38521
  client = clients.get(roomId);
38446
38522
  if (client) {
38447
- _context29.next = 7;
38523
+ _context30.next = 7;
38448
38524
  break;
38449
38525
  }
38450
38526
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - init first', null, 'error');
@@ -38452,53 +38528,53 @@
38452
38528
  throw new Error('avsdk TALRTC::startPushScreenStream - init first');
38453
38529
  case 7:
38454
38530
  if (!screenTrack) {
38455
- _context29.next = 11;
38531
+ _context30.next = 11;
38456
38532
  break;
38457
38533
  }
38458
38534
  defaultApi$1.writeLog('avsdk TALRTC::startPushScreenStream - end');
38459
- _context29.next = 11;
38535
+ _context30.next = 11;
38460
38536
  return client.publish(screenTrack);
38461
38537
  case 11:
38462
38538
  case "end":
38463
- return _context29.stop();
38539
+ return _context30.stop();
38464
38540
  }
38465
- }, _callee29);
38541
+ }, _callee30);
38466
38542
  }));
38467
38543
  return function startPushScreenStream() {
38468
- return _ref29.apply(this, arguments);
38544
+ return _ref30.apply(this, arguments);
38469
38545
  };
38470
38546
  }();
38471
38547
  var stopPushScreenStream = /*#__PURE__*/function () {
38472
- var _ref30 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
38548
+ var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
38473
38549
  var roomId, client;
38474
- return regenerator.wrap(function _callee30$(_context30) {
38475
- while (1) switch (_context30.prev = _context30.next) {
38550
+ return regenerator.wrap(function _callee31$(_context31) {
38551
+ while (1) switch (_context31.prev = _context31.next) {
38476
38552
  case 0:
38477
38553
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream');
38478
38554
  roomId = util.getRoomIdByStreamId(screenStreamId$1);
38479
38555
  client = clients.get(roomId);
38480
38556
  if (client) {
38481
- _context30.next = 6;
38557
+ _context31.next = 6;
38482
38558
  break;
38483
38559
  }
38484
38560
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - init first', null, 'error');
38485
38561
  throw new Error('avsdk TALRTC::stopPushScreenStream - init first');
38486
38562
  case 6:
38487
38563
  if (!screenTrack) {
38488
- _context30.next = 10;
38564
+ _context31.next = 10;
38489
38565
  break;
38490
38566
  }
38491
38567
  defaultApi$1.writeLog('avsdk TALRTC::stopPushScreenStream - end');
38492
- _context30.next = 10;
38568
+ _context31.next = 10;
38493
38569
  return client.unpublish(screenTrack);
38494
38570
  case 10:
38495
38571
  case "end":
38496
- return _context30.stop();
38572
+ return _context31.stop();
38497
38573
  }
38498
- }, _callee30);
38574
+ }, _callee31);
38499
38575
  }));
38500
38576
  return function stopPushScreenStream() {
38501
- return _ref30.apply(this, arguments);
38577
+ return _ref31.apply(this, arguments);
38502
38578
  };
38503
38579
  }();
38504
38580
  /**
@@ -38507,9 +38583,9 @@
38507
38583
  * @return Promise | void
38508
38584
  */
38509
38585
  var startPush = /*#__PURE__*/function () {
38510
- var _ref31 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31(streamId) {
38511
- return regenerator.wrap(function _callee31$(_context31) {
38512
- while (1) switch (_context31.prev = _context31.next) {
38586
+ var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId) {
38587
+ return regenerator.wrap(function _callee32$(_context32) {
38588
+ while (1) switch (_context32.prev = _context32.next) {
38513
38589
  case 0:
38514
38590
  if (!streamId) {
38515
38591
  streamId = localStreamId$1;
@@ -38522,22 +38598,22 @@
38522
38598
  }
38523
38599
  } catch (error) {}
38524
38600
  if (!(streamId === screenStreamId$1)) {
38525
- _context31.next = 9;
38601
+ _context32.next = 9;
38526
38602
  break;
38527
38603
  }
38528
- _context31.next = 6;
38604
+ _context32.next = 6;
38529
38605
  return startScreenCapture();
38530
38606
  case 6:
38531
- _context31.next = 8;
38607
+ _context32.next = 8;
38532
38608
  return startPushScreenStream();
38533
38609
  case 8:
38534
38610
  isScreenSharing = true;
38535
38611
  case 9:
38536
38612
  if (!(streamId === localStreamId$1)) {
38537
- _context31.next = 13;
38613
+ _context32.next = 13;
38538
38614
  break;
38539
38615
  }
38540
- _context31.next = 12;
38616
+ _context32.next = 12;
38541
38617
  return startPushLocalStream('both');
38542
38618
  case 12:
38543
38619
  isPublishing = true;
@@ -38548,12 +38624,12 @@
38548
38624
  });
38549
38625
  case 14:
38550
38626
  case "end":
38551
- return _context31.stop();
38627
+ return _context32.stop();
38552
38628
  }
38553
- }, _callee31);
38629
+ }, _callee32);
38554
38630
  }));
38555
38631
  return function startPush(_x31) {
38556
- return _ref31.apply(this, arguments);
38632
+ return _ref32.apply(this, arguments);
38557
38633
  };
38558
38634
  }();
38559
38635
 
@@ -38563,41 +38639,41 @@
38563
38639
  * @return Promise | void
38564
38640
  */
38565
38641
  var stopPush = /*#__PURE__*/function () {
38566
- var _ref32 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32(streamId) {
38567
- return regenerator.wrap(function _callee32$(_context32) {
38568
- while (1) switch (_context32.prev = _context32.next) {
38642
+ var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(streamId) {
38643
+ return regenerator.wrap(function _callee33$(_context33) {
38644
+ while (1) switch (_context33.prev = _context33.next) {
38569
38645
  case 0:
38570
38646
  if (!streamId) {
38571
38647
  streamId = localStreamId$1;
38572
38648
  }
38573
38649
  defaultApi$1.writeLog("avsdk TALRTC::stopPush streamId: ".concat(streamId));
38574
38650
  if (!(streamId === screenStreamId$1 && screenTrack)) {
38575
- _context32.next = 8;
38651
+ _context33.next = 8;
38576
38652
  break;
38577
38653
  }
38578
38654
  screenTrack.close();
38579
- _context32.next = 6;
38655
+ _context33.next = 6;
38580
38656
  return stopPushScreenStream();
38581
38657
  case 6:
38582
38658
  isScreenSharing = false;
38583
38659
  screenTrack = null;
38584
38660
  case 8:
38585
38661
  if (!(streamId === localStreamId$1)) {
38586
- _context32.next = 12;
38662
+ _context33.next = 12;
38587
38663
  break;
38588
38664
  }
38589
- _context32.next = 11;
38665
+ _context33.next = 11;
38590
38666
  return stopPushLocalStream('both');
38591
38667
  case 11:
38592
38668
  isPublishing = false;
38593
38669
  case 12:
38594
38670
  case "end":
38595
- return _context32.stop();
38671
+ return _context33.stop();
38596
38672
  }
38597
- }, _callee32);
38673
+ }, _callee33);
38598
38674
  }));
38599
38675
  return function stopPush(_x32) {
38600
- return _ref32.apply(this, arguments);
38676
+ return _ref33.apply(this, arguments);
38601
38677
  };
38602
38678
  }();
38603
38679
 
@@ -38607,27 +38683,27 @@
38607
38683
  * @return Promise | void
38608
38684
  */
38609
38685
  var muteLocalAudio = /*#__PURE__*/function () {
38610
- var _ref33 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33(mute) {
38611
- return regenerator.wrap(function _callee33$(_context33) {
38612
- while (1) switch (_context33.prev = _context33.next) {
38686
+ var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(mute) {
38687
+ return regenerator.wrap(function _callee34$(_context34) {
38688
+ while (1) switch (_context34.prev = _context34.next) {
38613
38689
  case 0:
38614
38690
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalAudio mute: ".concat(mute));
38615
38691
  if (!audioTrack) {
38616
- _context33.next = 4;
38692
+ _context34.next = 4;
38617
38693
  break;
38618
38694
  }
38619
- _context33.next = 4;
38695
+ _context34.next = 4;
38620
38696
  return audioTrack.setMuted(mute);
38621
38697
  case 4:
38622
38698
  localStreamMuteStatus.audio = mute;
38623
38699
  case 5:
38624
38700
  case "end":
38625
- return _context33.stop();
38701
+ return _context34.stop();
38626
38702
  }
38627
- }, _callee33);
38703
+ }, _callee34);
38628
38704
  }));
38629
38705
  return function muteLocalAudio(_x33) {
38630
- return _ref33.apply(this, arguments);
38706
+ return _ref34.apply(this, arguments);
38631
38707
  };
38632
38708
  }();
38633
38709
 
@@ -38637,27 +38713,27 @@
38637
38713
  * @return Promise | void
38638
38714
  */
38639
38715
  var muteLocalVideo = /*#__PURE__*/function () {
38640
- var _ref34 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34(mute) {
38641
- return regenerator.wrap(function _callee34$(_context34) {
38642
- while (1) switch (_context34.prev = _context34.next) {
38716
+ var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(mute) {
38717
+ return regenerator.wrap(function _callee35$(_context35) {
38718
+ while (1) switch (_context35.prev = _context35.next) {
38643
38719
  case 0:
38644
38720
  defaultApi$1.writeLog("avsdk TALRTC::muteLocalVideo mute: ".concat(mute));
38645
38721
  if (!videoTrack) {
38646
- _context34.next = 4;
38722
+ _context35.next = 4;
38647
38723
  break;
38648
38724
  }
38649
- _context34.next = 4;
38725
+ _context35.next = 4;
38650
38726
  return videoTrack.setMuted(mute);
38651
38727
  case 4:
38652
38728
  localStreamMuteStatus.video = mute;
38653
38729
  case 5:
38654
38730
  case "end":
38655
- return _context34.stop();
38731
+ return _context35.stop();
38656
38732
  }
38657
- }, _callee34);
38733
+ }, _callee35);
38658
38734
  }));
38659
38735
  return function muteLocalVideo(_x34) {
38660
- return _ref34.apply(this, arguments);
38736
+ return _ref35.apply(this, arguments);
38661
38737
  };
38662
38738
  }();
38663
38739
 
@@ -38689,51 +38765,51 @@
38689
38765
  * @return {Promise} Promise | void
38690
38766
  */
38691
38767
  var startPlay = /*#__PURE__*/function () {
38692
- var _ref35 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35(streamId, muteAudio, muteVideo) {
38693
- return regenerator.wrap(function _callee35$(_context35) {
38694
- while (1) switch (_context35.prev = _context35.next) {
38768
+ var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId, muteAudio, muteVideo) {
38769
+ return regenerator.wrap(function _callee36$(_context36) {
38770
+ while (1) switch (_context36.prev = _context36.next) {
38695
38771
  case 0:
38696
38772
  if (muteAudio) {
38697
- _context35.next = 8;
38773
+ _context36.next = 8;
38698
38774
  break;
38699
38775
  }
38700
38776
  if (!(streamId.split('_').length === 4)) {
38701
- _context35.next = 6;
38777
+ _context36.next = 6;
38702
38778
  break;
38703
38779
  }
38704
- _context35.next = 4;
38780
+ _context36.next = 4;
38705
38781
  return muteRemoteAudio(streamId, false);
38706
38782
  case 4:
38707
- _context35.next = 8;
38783
+ _context36.next = 8;
38708
38784
  break;
38709
38785
  case 6:
38710
- _context35.next = 8;
38786
+ _context36.next = 8;
38711
38787
  return muteRemoteScreenAudio(streamId, false);
38712
38788
  case 8:
38713
38789
  if (muteVideo) {
38714
- _context35.next = 16;
38790
+ _context36.next = 16;
38715
38791
  break;
38716
38792
  }
38717
38793
  if (!(streamId.split('_').length === 4)) {
38718
- _context35.next = 14;
38794
+ _context36.next = 14;
38719
38795
  break;
38720
38796
  }
38721
- _context35.next = 12;
38797
+ _context36.next = 12;
38722
38798
  return muteRemoteVideo(streamId, false);
38723
38799
  case 12:
38724
- _context35.next = 16;
38800
+ _context36.next = 16;
38725
38801
  break;
38726
38802
  case 14:
38727
- _context35.next = 16;
38803
+ _context36.next = 16;
38728
38804
  return muteRemoteScreenVideo(streamId, false);
38729
38805
  case 16:
38730
38806
  case "end":
38731
- return _context35.stop();
38807
+ return _context36.stop();
38732
38808
  }
38733
- }, _callee35);
38809
+ }, _callee36);
38734
38810
  }));
38735
38811
  return function startPlay(_x35, _x36, _x37) {
38736
- return _ref35.apply(this, arguments);
38812
+ return _ref36.apply(this, arguments);
38737
38813
  };
38738
38814
  }();
38739
38815
  /**
@@ -38742,37 +38818,37 @@
38742
38818
  * @return Promise | void
38743
38819
  */
38744
38820
  var stopPlay = /*#__PURE__*/function () {
38745
- var _ref36 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36(streamId) {
38746
- return regenerator.wrap(function _callee36$(_context36) {
38747
- while (1) switch (_context36.prev = _context36.next) {
38821
+ var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId) {
38822
+ return regenerator.wrap(function _callee37$(_context37) {
38823
+ while (1) switch (_context37.prev = _context37.next) {
38748
38824
  case 0:
38749
38825
  defaultApi$1.writeLog("avsdk TALRTC::stopPlay streamId: ".concat(streamId));
38750
38826
  if (!(streamId.split('_').length === 4)) {
38751
- _context36.next = 8;
38827
+ _context37.next = 8;
38752
38828
  break;
38753
38829
  }
38754
- _context36.next = 4;
38830
+ _context37.next = 4;
38755
38831
  return muteRemoteAudio(streamId, true);
38756
38832
  case 4:
38757
- _context36.next = 6;
38833
+ _context37.next = 6;
38758
38834
  return muteRemoteVideo(streamId, true);
38759
38835
  case 6:
38760
- _context36.next = 12;
38836
+ _context37.next = 12;
38761
38837
  break;
38762
38838
  case 8:
38763
- _context36.next = 10;
38839
+ _context37.next = 10;
38764
38840
  return muteRemoteScreenAudio(streamId, true);
38765
38841
  case 10:
38766
- _context36.next = 12;
38842
+ _context37.next = 12;
38767
38843
  return muteRemoteScreenVideo(streamId, true);
38768
38844
  case 12:
38769
38845
  case "end":
38770
- return _context36.stop();
38846
+ return _context37.stop();
38771
38847
  }
38772
- }, _callee36);
38848
+ }, _callee37);
38773
38849
  }));
38774
38850
  return function stopPlay(_x38) {
38775
- return _ref36.apply(this, arguments);
38851
+ return _ref37.apply(this, arguments);
38776
38852
  };
38777
38853
  }();
38778
38854
  /**
@@ -38784,9 +38860,9 @@
38784
38860
  * @return src:String 视频预览地址
38785
38861
  */
38786
38862
  var initPullFlow$1 = /*#__PURE__*/function () {
38787
- var _ref37 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
38788
- return regenerator.wrap(function _callee37$(_context37) {
38789
- while (1) switch (_context37.prev = _context37.next) {
38863
+ var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38(streamId, domId, muteAudio, pInfo, notAutoPlay, muteVideo) {
38864
+ return regenerator.wrap(function _callee38$(_context38) {
38865
+ while (1) switch (_context38.prev = _context38.next) {
38790
38866
  case 0:
38791
38867
  defaultApi$1.writeLog("TALRTC::initPullFlow_start , streamId :".concat(streamId, ", notAutoPlay: ").concat(notAutoPlay, ", audioOnly: ").concat(muteVideo));
38792
38868
  resetStreamIdRtcPlayerInfo1$1(streamId);
@@ -38797,28 +38873,28 @@
38797
38873
  heartBeatDataReport$1('start');
38798
38874
  }
38799
38875
  } catch (error) {}
38800
- _context37.next = 6;
38876
+ _context38.next = 6;
38801
38877
  return startPlay(streamId, muteAudio, muteVideo);
38802
38878
  case 6:
38803
38879
  if (notAutoPlay) {
38804
- _context37.next = 9;
38880
+ _context38.next = 9;
38805
38881
  break;
38806
38882
  }
38807
- _context37.next = 9;
38883
+ _context38.next = 9;
38808
38884
  return startLocalOrRemotePreview$1(false, streamId, domId);
38809
38885
  case 9:
38810
- return _context37.abrupt("return", {
38886
+ return _context38.abrupt("return", {
38811
38887
  videoSrc: '',
38812
38888
  playerId: 0
38813
38889
  });
38814
38890
  case 10:
38815
38891
  case "end":
38816
- return _context37.stop();
38892
+ return _context38.stop();
38817
38893
  }
38818
- }, _callee37);
38894
+ }, _callee38);
38819
38895
  }));
38820
38896
  return function initPullFlow(_x39, _x40, _x41, _x42, _x43, _x44) {
38821
- return _ref37.apply(this, arguments);
38897
+ return _ref38.apply(this, arguments);
38822
38898
  };
38823
38899
  }();
38824
38900
 
@@ -38828,42 +38904,42 @@
38828
38904
  * @return Promise | void
38829
38905
  */
38830
38906
  var teacherStartLinkMic$1 = /*#__PURE__*/function () {
38831
- var _ref38 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
38907
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
38832
38908
  var mode,
38833
- _args38 = arguments;
38834
- return regenerator.wrap(function _callee38$(_context38) {
38835
- while (1) switch (_context38.prev = _context38.next) {
38909
+ _args39 = arguments;
38910
+ return regenerator.wrap(function _callee39$(_context39) {
38911
+ while (1) switch (_context39.prev = _context39.next) {
38836
38912
  case 0:
38837
- mode = _args38.length > 0 && _args38[0] !== undefined ? _args38[0] : 0;
38838
- _context38.next = 3;
38913
+ mode = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : 0;
38914
+ _context39.next = 3;
38839
38915
  return startMicrophone$1();
38840
38916
  case 3:
38841
38917
  if (!(mode === 0)) {
38842
- _context38.next = 12;
38918
+ _context39.next = 12;
38843
38919
  break;
38844
38920
  }
38845
- _context38.next = 6;
38921
+ _context39.next = 6;
38846
38922
  return muteLocalVideo(true, localStreamId$1);
38847
38923
  case 6:
38848
- _context38.next = 8;
38924
+ _context39.next = 8;
38849
38925
  return setMicrophoneDevice$2({});
38850
38926
  case 8:
38851
- _context38.next = 10;
38927
+ _context39.next = 10;
38852
38928
  return muteLocalAudio(false);
38853
38929
  case 10:
38854
- _context38.next = 14;
38930
+ _context39.next = 14;
38855
38931
  break;
38856
38932
  case 12:
38857
- _context38.next = 14;
38933
+ _context39.next = 14;
38858
38934
  return muteLocalAudio(false);
38859
38935
  case 14:
38860
38936
  case "end":
38861
- return _context38.stop();
38937
+ return _context39.stop();
38862
38938
  }
38863
- }, _callee38);
38939
+ }, _callee39);
38864
38940
  }));
38865
38941
  return function teacherStartLinkMic() {
38866
- return _ref38.apply(this, arguments);
38942
+ return _ref39.apply(this, arguments);
38867
38943
  };
38868
38944
  }();
38869
38945
 
@@ -38873,36 +38949,36 @@
38873
38949
  * @return Promise | void
38874
38950
  */
38875
38951
  var teacherStopLinkMic$1 = /*#__PURE__*/function () {
38876
- var _ref39 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
38952
+ var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
38877
38953
  var mode,
38878
- _args39 = arguments;
38879
- return regenerator.wrap(function _callee39$(_context39) {
38880
- while (1) switch (_context39.prev = _context39.next) {
38954
+ _args40 = arguments;
38955
+ return regenerator.wrap(function _callee40$(_context40) {
38956
+ while (1) switch (_context40.prev = _context40.next) {
38881
38957
  case 0:
38882
- mode = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : 0;
38883
- _context39.next = 3;
38958
+ mode = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : 0;
38959
+ _context40.next = 3;
38884
38960
  return stopMicrophone$1();
38885
38961
  case 3:
38886
38962
  if (!(mode === 0)) {
38887
- _context39.next = 8;
38963
+ _context40.next = 8;
38888
38964
  break;
38889
38965
  }
38890
- _context39.next = 6;
38966
+ _context40.next = 6;
38891
38967
  return muteLocalAudio(true);
38892
38968
  case 6:
38893
- _context39.next = 10;
38969
+ _context40.next = 10;
38894
38970
  break;
38895
38971
  case 8:
38896
- _context39.next = 10;
38972
+ _context40.next = 10;
38897
38973
  return setSystemAudioLoopback(false);
38898
38974
  case 10:
38899
38975
  case "end":
38900
- return _context39.stop();
38976
+ return _context40.stop();
38901
38977
  }
38902
- }, _callee39);
38978
+ }, _callee40);
38903
38979
  }));
38904
38980
  return function teacherStopLinkMic() {
38905
- return _ref39.apply(this, arguments);
38981
+ return _ref40.apply(this, arguments);
38906
38982
  };
38907
38983
  }();
38908
38984
 
@@ -38914,26 +38990,26 @@
38914
38990
  return callMethod('StopPlayAll', {});
38915
38991
  };
38916
38992
  var playerSnapShot$1 = /*#__PURE__*/function () {
38917
- var _ref40 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40(streamId) {
38918
- return regenerator.wrap(function _callee40$(_context40) {
38919
- while (1) switch (_context40.prev = _context40.next) {
38993
+ var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId) {
38994
+ return regenerator.wrap(function _callee41$(_context41) {
38995
+ while (1) switch (_context41.prev = _context41.next) {
38920
38996
  case 0:
38921
38997
  defaultApi$1.writeLog("avsdk TALRTC::playerSnapShot streamId: ".concat(streamId));
38922
38998
  if (!(streamId === localStreamId$1)) {
38923
- _context40.next = 5;
38999
+ _context41.next = 5;
38924
39000
  break;
38925
39001
  }
38926
- return _context40.abrupt("return", videoTrack.getCurrentFrameData());
39002
+ return _context41.abrupt("return", videoTrack.getCurrentFrameData());
38927
39003
  case 5:
38928
- return _context40.abrupt("return", screenTrack.getCurrentFrameData());
39004
+ return _context41.abrupt("return", screenTrack.getCurrentFrameData());
38929
39005
  case 6:
38930
39006
  case "end":
38931
- return _context40.stop();
39007
+ return _context41.stop();
38932
39008
  }
38933
- }, _callee40);
39009
+ }, _callee41);
38934
39010
  }));
38935
39011
  return function playerSnapShot(_x45) {
38936
- return _ref40.apply(this, arguments);
39012
+ return _ref41.apply(this, arguments);
38937
39013
  };
38938
39014
  }();
38939
39015
  /**
@@ -38944,22 +39020,22 @@
38944
39020
  * @return Promise | void
38945
39021
  */
38946
39022
  var changePullFlow = /*#__PURE__*/function () {
38947
- var _ref41 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41(streamId, toStreamId, toDomId) {
38948
- return regenerator.wrap(function _callee41$(_context41) {
38949
- while (1) switch (_context41.prev = _context41.next) {
39023
+ var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, toStreamId, toDomId) {
39024
+ return regenerator.wrap(function _callee42$(_context42) {
39025
+ while (1) switch (_context42.prev = _context42.next) {
38950
39026
  case 0:
38951
- _context41.next = 2;
39027
+ _context42.next = 2;
38952
39028
  return stopPlay(streamId);
38953
39029
  case 2:
38954
- return _context41.abrupt("return", initPullFlow$1(toStreamId, toDomId));
39030
+ return _context42.abrupt("return", initPullFlow$1(toStreamId, toDomId));
38955
39031
  case 3:
38956
39032
  case "end":
38957
- return _context41.stop();
39033
+ return _context42.stop();
38958
39034
  }
38959
- }, _callee41);
39035
+ }, _callee42);
38960
39036
  }));
38961
39037
  return function changePullFlow(_x46, _x47, _x48) {
38962
- return _ref41.apply(this, arguments);
39038
+ return _ref42.apply(this, arguments);
38963
39039
  };
38964
39040
  }();
38965
39041
 
@@ -39033,10 +39109,10 @@
39033
39109
  * @return Promise | void
39034
39110
  */
39035
39111
  var muteRemoteAudio = /*#__PURE__*/function () {
39036
- var _ref42 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42(streamId, mute) {
39112
+ var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, mute) {
39037
39113
  var _streamId$split3, _streamId$split4, roomId, userId, numberUserId, client, user, track;
39038
- return regenerator.wrap(function _callee42$(_context42) {
39039
- while (1) switch (_context42.prev = _context42.next) {
39114
+ return regenerator.wrap(function _callee43$(_context43) {
39115
+ while (1) switch (_context43.prev = _context43.next) {
39040
39116
  case 0:
39041
39117
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
39042
39118
  _streamId$split3 = streamId.split('_'), _streamId$split4 = _slicedToArray(_streamId$split3, 3), roomId = _streamId$split4[1], userId = _streamId$split4[2];
@@ -39044,43 +39120,43 @@
39044
39120
  client = clients.get(roomId);
39045
39121
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39046
39122
  if (client) {
39047
- _context42.next = 8;
39123
+ _context43.next = 8;
39048
39124
  break;
39049
39125
  }
39050
39126
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId), null, 'error');
39051
39127
  throw new Error("avsdk TALRTC::muteRemoteAudio - no client found ".concat(roomId));
39052
39128
  case 8:
39053
39129
  if (user) {
39054
- _context42.next = 12;
39130
+ _context43.next = 12;
39055
39131
  break;
39056
39132
  }
39057
39133
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - no user found ".concat(roomId));
39058
39134
  users.set("".concat(roomId, "_").concat(numberUserId), new User(!mute, false, userId));
39059
- return _context42.abrupt("return");
39135
+ return _context43.abrupt("return");
39060
39136
  case 12:
39061
39137
  user.userId = userId;
39062
39138
  user.subAudio = !mute;
39063
39139
  if (!(!user.rtcUser || !user.rtcUser.hasAudio)) {
39064
- _context42.next = 17;
39140
+ _context43.next = 17;
39065
39141
  break;
39066
39142
  }
39067
39143
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteAudio - user:".concat(userId, " has not be published"));
39068
- return _context42.abrupt("return");
39144
+ return _context43.abrupt("return");
39069
39145
  case 17:
39070
39146
  if (!mute) {
39071
- _context42.next = 22;
39147
+ _context43.next = 22;
39072
39148
  break;
39073
39149
  }
39074
- _context42.next = 20;
39150
+ _context43.next = 20;
39075
39151
  return client.unsubscribe(user.mainStreamId, 'audio');
39076
39152
  case 20:
39077
- _context42.next = 28;
39153
+ _context43.next = 28;
39078
39154
  break;
39079
39155
  case 22:
39080
- _context42.next = 24;
39156
+ _context43.next = 24;
39081
39157
  return client.subscribe(user.mainStreamId, 'audio');
39082
39158
  case 24:
39083
- track = _context42.sent;
39159
+ track = _context43.sent;
39084
39160
  track.setVolume(speakerVolume$1);
39085
39161
  track.once('first-frame-decoded', function () {
39086
39162
  NOTICE.firstAudioSize({
@@ -39091,12 +39167,12 @@
39091
39167
  track.play();
39092
39168
  case 28:
39093
39169
  case "end":
39094
- return _context42.stop();
39170
+ return _context43.stop();
39095
39171
  }
39096
- }, _callee42);
39172
+ }, _callee43);
39097
39173
  }));
39098
39174
  return function muteRemoteAudio(_x49, _x50) {
39099
- return _ref42.apply(this, arguments);
39175
+ return _ref43.apply(this, arguments);
39100
39176
  };
39101
39177
  }();
39102
39178
 
@@ -39107,10 +39183,10 @@
39107
39183
  * @return Promise | void
39108
39184
  */
39109
39185
  var muteRemoteVideo = /*#__PURE__*/function () {
39110
- var _ref43 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43(streamId, mute) {
39186
+ var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
39111
39187
  var _streamId$split5, _streamId$split6, roomId, userId, numberUserId, client, user, track;
39112
- return regenerator.wrap(function _callee43$(_context43) {
39113
- while (1) switch (_context43.prev = _context43.next) {
39188
+ return regenerator.wrap(function _callee44$(_context44) {
39189
+ while (1) switch (_context44.prev = _context44.next) {
39114
39190
  case 0:
39115
39191
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
39116
39192
  _streamId$split5 = streamId.split('_'), _streamId$split6 = _slicedToArray(_streamId$split5, 3), roomId = _streamId$split6[1], userId = _streamId$split6[2];
@@ -39118,44 +39194,44 @@
39118
39194
  client = clients.get(roomId);
39119
39195
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39120
39196
  if (client) {
39121
- _context43.next = 8;
39197
+ _context44.next = 8;
39122
39198
  break;
39123
39199
  }
39124
39200
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId), null, 'error');
39125
39201
  throw new Error("avsdk TALRTC::muteRemoteVideo - no client found ".concat(roomId));
39126
39202
  case 8:
39127
39203
  if (user) {
39128
- _context43.next = 12;
39204
+ _context44.next = 12;
39129
39205
  break;
39130
39206
  }
39131
39207
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - no user found ".concat(roomId));
39132
39208
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, !mute, userId));
39133
- return _context43.abrupt("return");
39209
+ return _context44.abrupt("return");
39134
39210
  case 12:
39135
39211
  user.userId = userId;
39136
39212
  user.subVideo = !mute;
39137
39213
  if (!(!user.rtcUser || !user.rtcUser.hasVideo)) {
39138
- _context43.next = 17;
39214
+ _context44.next = 17;
39139
39215
  break;
39140
39216
  }
39141
39217
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteVideo - user:".concat(userId, " has not be published"));
39142
- return _context43.abrupt("return");
39218
+ return _context44.abrupt("return");
39143
39219
  case 17:
39144
39220
  if (!mute) {
39145
- _context43.next = 23;
39221
+ _context44.next = 23;
39146
39222
  break;
39147
39223
  }
39148
39224
  user.rtcUser.videoTrack && user.rtcUser.videoTrack.stop();
39149
- _context43.next = 21;
39225
+ _context44.next = 21;
39150
39226
  return client.unsubscribe(user.mainStreamId, 'video');
39151
39227
  case 21:
39152
- _context43.next = 28;
39228
+ _context44.next = 28;
39153
39229
  break;
39154
39230
  case 23:
39155
- _context43.next = 25;
39231
+ _context44.next = 25;
39156
39232
  return client.subscribe(user.mainStreamId, 'video');
39157
39233
  case 25:
39158
- track = _context43.sent;
39234
+ track = _context44.sent;
39159
39235
  track.once('first-frame-decoded', function () {
39160
39236
  NOTICE.firstVideoSize({
39161
39237
  streamId: streamId,
@@ -39169,12 +39245,12 @@
39169
39245
  }
39170
39246
  case 28:
39171
39247
  case "end":
39172
- return _context43.stop();
39248
+ return _context44.stop();
39173
39249
  }
39174
- }, _callee43);
39250
+ }, _callee44);
39175
39251
  }));
39176
39252
  return function muteRemoteVideo(_x51, _x52) {
39177
- return _ref43.apply(this, arguments);
39253
+ return _ref44.apply(this, arguments);
39178
39254
  };
39179
39255
  }();
39180
39256
 
@@ -39185,10 +39261,10 @@
39185
39261
  * @return Promise | void
39186
39262
  */
39187
39263
  var muteRemoteScreenAudio = /*#__PURE__*/function () {
39188
- var _ref44 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44(streamId, mute) {
39264
+ var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
39189
39265
  var _streamId$split7, _streamId$split8, roomId, userId, numberUserId, client, user, track;
39190
- return regenerator.wrap(function _callee44$(_context44) {
39191
- while (1) switch (_context44.prev = _context44.next) {
39266
+ return regenerator.wrap(function _callee45$(_context45) {
39267
+ while (1) switch (_context45.prev = _context45.next) {
39192
39268
  case 0:
39193
39269
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - streamId: ".concat(streamId, ", mute: ").concat(mute));
39194
39270
  _streamId$split7 = streamId.split('_'), _streamId$split8 = _slicedToArray(_streamId$split7, 3), roomId = _streamId$split8[1], userId = _streamId$split8[2];
@@ -39196,43 +39272,43 @@
39196
39272
  client = clients.get(roomId);
39197
39273
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39198
39274
  if (client) {
39199
- _context44.next = 8;
39275
+ _context45.next = 8;
39200
39276
  break;
39201
39277
  }
39202
39278
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId), null, 'error');
39203
39279
  throw new Error("avsdk TALRTC::muteRemoteScreenAudio - no client found ".concat(roomId));
39204
39280
  case 8:
39205
39281
  if (user) {
39206
- _context44.next = 12;
39282
+ _context45.next = 12;
39207
39283
  break;
39208
39284
  }
39209
39285
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - no user found ".concat(roomId));
39210
39286
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenAudio = !mute);
39211
- return _context44.abrupt("return");
39287
+ return _context45.abrupt("return");
39212
39288
  case 12:
39213
39289
  user.userId = userId;
39214
39290
  user.subScreenAudio = !mute;
39215
39291
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
39216
- _context44.next = 17;
39292
+ _context45.next = 17;
39217
39293
  break;
39218
39294
  }
39219
39295
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenAudio - user:".concat(userId, " has not be published"));
39220
- return _context44.abrupt("return");
39296
+ return _context45.abrupt("return");
39221
39297
  case 17:
39222
39298
  if (!mute) {
39223
- _context44.next = 22;
39299
+ _context45.next = 22;
39224
39300
  break;
39225
39301
  }
39226
- _context44.next = 20;
39302
+ _context45.next = 20;
39227
39303
  return client.unsubscribe(user.screenStreamId, 'audio');
39228
39304
  case 20:
39229
- _context44.next = 28;
39305
+ _context45.next = 28;
39230
39306
  break;
39231
39307
  case 22:
39232
- _context44.next = 24;
39308
+ _context45.next = 24;
39233
39309
  return client.subscribe(user.screenStreamId, 'audio');
39234
39310
  case 24:
39235
- track = _context44.sent;
39311
+ track = _context45.sent;
39236
39312
  track.setVolume(speakerVolume$1);
39237
39313
  track.once('first-frame-decoded', function () {
39238
39314
  NOTICE.firstAudioSize({
@@ -39243,12 +39319,12 @@
39243
39319
  track.play();
39244
39320
  case 28:
39245
39321
  case "end":
39246
- return _context44.stop();
39322
+ return _context45.stop();
39247
39323
  }
39248
- }, _callee44);
39324
+ }, _callee45);
39249
39325
  }));
39250
39326
  return function muteRemoteScreenAudio(_x53, _x54) {
39251
- return _ref44.apply(this, arguments);
39327
+ return _ref45.apply(this, arguments);
39252
39328
  };
39253
39329
  }();
39254
39330
  /**
@@ -39258,10 +39334,10 @@
39258
39334
  * @return Promise | void
39259
39335
  */
39260
39336
  var muteRemoteScreenVideo = /*#__PURE__*/function () {
39261
- var _ref45 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45(streamId, mute) {
39337
+ var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46(streamId, mute) {
39262
39338
  var _streamId$split9, _streamId$split10, roomId, userId, numberUserId, client, user, track;
39263
- return regenerator.wrap(function _callee45$(_context45) {
39264
- while (1) switch (_context45.prev = _context45.next) {
39339
+ return regenerator.wrap(function _callee46$(_context46) {
39340
+ while (1) switch (_context46.prev = _context46.next) {
39265
39341
  case 0:
39266
39342
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - streamId: ".concat(streamId, ", mute: ").concat(mute));
39267
39343
  _streamId$split9 = streamId.split('_'), _streamId$split10 = _slicedToArray(_streamId$split9, 3), roomId = _streamId$split10[1], userId = _streamId$split10[2];
@@ -39269,44 +39345,44 @@
39269
39345
  client = clients.get(roomId);
39270
39346
  user = users.get("".concat(roomId, "_").concat(numberUserId));
39271
39347
  if (client) {
39272
- _context45.next = 8;
39348
+ _context46.next = 8;
39273
39349
  break;
39274
39350
  }
39275
39351
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId), null, 'error');
39276
39352
  throw new Error("avsdk TALRTC::muteRemoteScreenVideo - no client found ".concat(roomId));
39277
39353
  case 8:
39278
39354
  if (user) {
39279
- _context45.next = 12;
39355
+ _context46.next = 12;
39280
39356
  break;
39281
39357
  }
39282
39358
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - no user found ".concat(roomId));
39283
39359
  users.set("".concat(roomId, "_").concat(numberUserId), new User(false, false, userId).subScreenVideo = !mute);
39284
- return _context45.abrupt("return");
39360
+ return _context46.abrupt("return");
39285
39361
  case 12:
39286
39362
  user.userId = userId;
39287
39363
  user.subScreenVideo = !mute;
39288
39364
  if (!(!user.rtcUser || !user.rtcUser.hasScreen)) {
39289
- _context45.next = 17;
39365
+ _context46.next = 17;
39290
39366
  break;
39291
39367
  }
39292
39368
  defaultApi$1.writeLog("avsdk TALRTC::muteRemoteScreenVideo - user:".concat(userId, " has not be published"));
39293
- return _context45.abrupt("return");
39369
+ return _context46.abrupt("return");
39294
39370
  case 17:
39295
39371
  if (!mute) {
39296
- _context45.next = 23;
39372
+ _context46.next = 23;
39297
39373
  break;
39298
39374
  }
39299
39375
  user.rtcUser.screenTrack && user.rtcUser.screenTrack.stop();
39300
- _context45.next = 21;
39376
+ _context46.next = 21;
39301
39377
  return client.unsubscribe(user.screenStreamId, 'video');
39302
39378
  case 21:
39303
- _context45.next = 28;
39379
+ _context46.next = 28;
39304
39380
  break;
39305
39381
  case 23:
39306
- _context45.next = 25;
39382
+ _context46.next = 25;
39307
39383
  return client.subscribe(user.screenStreamId, 'video');
39308
39384
  case 25:
39309
- track = _context45.sent;
39385
+ track = _context46.sent;
39310
39386
  track.once('first-frame-decoded', function () {
39311
39387
  NOTICE.firstVideoSize({
39312
39388
  streamId: streamId,
@@ -39320,32 +39396,32 @@
39320
39396
  }
39321
39397
  case 28:
39322
39398
  case "end":
39323
- return _context45.stop();
39399
+ return _context46.stop();
39324
39400
  }
39325
- }, _callee45);
39401
+ }, _callee46);
39326
39402
  }));
39327
39403
  return function muteRemoteScreenVideo(_x55, _x56) {
39328
- return _ref45.apply(this, arguments);
39404
+ return _ref46.apply(this, arguments);
39329
39405
  };
39330
39406
  }();
39331
39407
  //开启同屏
39332
39408
  var startMultiScreen$1 = /*#__PURE__*/function () {
39333
- var _ref46 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
39334
- return regenerator.wrap(function _callee46$(_context46) {
39335
- while (1) switch (_context46.prev = _context46.next) {
39409
+ var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
39410
+ return regenerator.wrap(function _callee47$(_context47) {
39411
+ while (1) switch (_context47.prev = _context47.next) {
39336
39412
  case 0:
39337
39413
  defaultApi$1.writeLog('info', 'avsdk TALRTC::startMultiScreen');
39338
39414
  // await enableExternalVideoSource(true,1);
39339
- _context46.next = 3;
39415
+ _context47.next = 3;
39340
39416
  return LoadCollectionOutputEntry2();
39341
39417
  case 3:
39342
39418
  case "end":
39343
- return _context46.stop();
39419
+ return _context47.stop();
39344
39420
  }
39345
- }, _callee46);
39421
+ }, _callee47);
39346
39422
  }));
39347
39423
  return function startMultiScreen() {
39348
- return _ref46.apply(this, arguments);
39424
+ return _ref47.apply(this, arguments);
39349
39425
  };
39350
39426
  }();
39351
39427
 
@@ -39354,10 +39430,10 @@
39354
39430
  * @return Promise | void
39355
39431
  */
39356
39432
  var leaveRoom$1 = /*#__PURE__*/function () {
39357
- var _ref47 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47(isChangeSDK) {
39433
+ var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48(isChangeSDK) {
39358
39434
  var key;
39359
- return regenerator.wrap(function _callee47$(_context47) {
39360
- while (1) switch (_context47.prev = _context47.next) {
39435
+ return regenerator.wrap(function _callee48$(_context48) {
39436
+ while (1) switch (_context48.prev = _context48.next) {
39361
39437
  case 0:
39362
39438
  if (!isChangeSDK) {
39363
39439
  globalVariables.localPreviewDomId = null;
@@ -39381,12 +39457,12 @@
39381
39457
  streamIdRtcPlayerInfo1$1 = {};
39382
39458
  case 14:
39383
39459
  case "end":
39384
- return _context47.stop();
39460
+ return _context48.stop();
39385
39461
  }
39386
- }, _callee47);
39462
+ }, _callee48);
39387
39463
  }));
39388
39464
  return function leaveRoom(_x57) {
39389
- return _ref47.apply(this, arguments);
39465
+ return _ref48.apply(this, arguments);
39390
39466
  };
39391
39467
  }();
39392
39468
 
@@ -39414,19 +39490,19 @@
39414
39490
  * @returns {Promise<any>}
39415
39491
  */
39416
39492
  var startRecord = /*#__PURE__*/function () {
39417
- var _ref48 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48(fileName, fileType, idx) {
39493
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(fileName, fileType, idx) {
39418
39494
  var streamId;
39419
- return regenerator.wrap(function _callee48$(_context48) {
39420
- while (1) switch (_context48.prev = _context48.next) {
39495
+ return regenerator.wrap(function _callee49$(_context49) {
39496
+ while (1) switch (_context49.prev = _context49.next) {
39421
39497
  case 0:
39422
39498
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39423
39499
  defaultApi$1.writeLog("avsdk TALRTC::startRecord fileName: ".concat(fileName, ", fileType: ").concat(fileType, ", idx: ").concat(idx, ", streamId: ").concat(streamId));
39424
39500
  if (!(idx === 1 && !screenStreamId$1)) {
39425
- _context48.next = 5;
39501
+ _context49.next = 5;
39426
39502
  break;
39427
39503
  }
39428
39504
  defaultApi$1.writeLog('avsdk TALRTC::startRecord screenStreamId is null', null, 'error');
39429
- return _context48.abrupt("return");
39505
+ return _context49.abrupt("return");
39430
39506
  case 5:
39431
39507
  if (!fileName) {
39432
39508
  fileName = "".concat(streamId, "-").concat(util.currentTimeString().replace(/:/g, '-'));
@@ -39437,7 +39513,7 @@
39437
39513
  idx: idx,
39438
39514
  streamId: streamId
39439
39515
  });
39440
- return _context48.abrupt("return", callMethod('StartRecord', {
39516
+ return _context49.abrupt("return", callMethod('StartRecord', {
39441
39517
  streamId: streamId,
39442
39518
  recordType: 3,
39443
39519
  // 1:音频 2:视频 3:音视频
@@ -39446,12 +39522,12 @@
39446
39522
  }));
39447
39523
  case 8:
39448
39524
  case "end":
39449
- return _context48.stop();
39525
+ return _context49.stop();
39450
39526
  }
39451
- }, _callee48);
39527
+ }, _callee49);
39452
39528
  }));
39453
39529
  return function startRecord(_x58, _x59, _x60) {
39454
- return _ref48.apply(this, arguments);
39530
+ return _ref49.apply(this, arguments);
39455
39531
  };
39456
39532
  }();
39457
39533
  /**
@@ -39460,10 +39536,10 @@
39460
39536
  * @returns
39461
39537
  */
39462
39538
  var stopRecord = /*#__PURE__*/function () {
39463
- var _ref49 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49(idx) {
39539
+ var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(idx) {
39464
39540
  var streamId;
39465
- return regenerator.wrap(function _callee49$(_context49) {
39466
- while (1) switch (_context49.prev = _context49.next) {
39541
+ return regenerator.wrap(function _callee50$(_context50) {
39542
+ while (1) switch (_context50.prev = _context50.next) {
39467
39543
  case 0:
39468
39544
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39469
39545
  defaultApi$1.writeLog("avsdk TALRTC::stopRecord idx: ".concat(idx, ", streamId: ").concat(streamId));
@@ -39471,17 +39547,17 @@
39471
39547
  idx: idx,
39472
39548
  streamId: streamId
39473
39549
  });
39474
- return _context49.abrupt("return", callMethod('StopRecord', {
39550
+ return _context50.abrupt("return", callMethod('StopRecord', {
39475
39551
  streamId: streamId
39476
39552
  }));
39477
39553
  case 4:
39478
39554
  case "end":
39479
- return _context49.stop();
39555
+ return _context50.stop();
39480
39556
  }
39481
- }, _callee49);
39557
+ }, _callee50);
39482
39558
  }));
39483
39559
  return function stopRecord(_x61) {
39484
- return _ref49.apply(this, arguments);
39560
+ return _ref50.apply(this, arguments);
39485
39561
  };
39486
39562
  }();
39487
39563
  /**
@@ -39490,24 +39566,24 @@
39490
39566
  * @returns
39491
39567
  */
39492
39568
  var startCapture = /*#__PURE__*/function () {
39493
- var _ref50 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50(idx) {
39569
+ var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
39494
39570
  var streamId;
39495
- return regenerator.wrap(function _callee50$(_context50) {
39496
- while (1) switch (_context50.prev = _context50.next) {
39571
+ return regenerator.wrap(function _callee51$(_context51) {
39572
+ while (1) switch (_context51.prev = _context51.next) {
39497
39573
  case 0:
39498
39574
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39499
39575
  defaultApi$1.writeLog("avsdk TALRTC::startCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
39500
- return _context50.abrupt("return", callMethod('StartCapture', {
39576
+ return _context51.abrupt("return", callMethod('StartCapture', {
39501
39577
  streamId: streamId
39502
39578
  }));
39503
39579
  case 3:
39504
39580
  case "end":
39505
- return _context50.stop();
39581
+ return _context51.stop();
39506
39582
  }
39507
- }, _callee50);
39583
+ }, _callee51);
39508
39584
  }));
39509
39585
  return function startCapture(_x62) {
39510
- return _ref50.apply(this, arguments);
39586
+ return _ref51.apply(this, arguments);
39511
39587
  };
39512
39588
  }();
39513
39589
  /**
@@ -39516,24 +39592,24 @@
39516
39592
  * @returns
39517
39593
  */
39518
39594
  var stopCapture = /*#__PURE__*/function () {
39519
- var _ref51 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51(idx) {
39595
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52(idx) {
39520
39596
  var streamId;
39521
- return regenerator.wrap(function _callee51$(_context51) {
39522
- while (1) switch (_context51.prev = _context51.next) {
39597
+ return regenerator.wrap(function _callee52$(_context52) {
39598
+ while (1) switch (_context52.prev = _context52.next) {
39523
39599
  case 0:
39524
39600
  streamId = [localStreamId$1, screenStreamId$1, 'rtmp'][idx];
39525
39601
  defaultApi$1.writeLog("avsdk TALRTC::stopCapture idx: ".concat(idx, ", streamId: ").concat(streamId));
39526
- return _context51.abrupt("return", callMethod('StopCapture', {
39602
+ return _context52.abrupt("return", callMethod('StopCapture', {
39527
39603
  streamId: streamId
39528
39604
  }));
39529
39605
  case 3:
39530
39606
  case "end":
39531
- return _context51.stop();
39607
+ return _context52.stop();
39532
39608
  }
39533
- }, _callee51);
39609
+ }, _callee52);
39534
39610
  }));
39535
39611
  return function stopCapture(_x63) {
39536
- return _ref51.apply(this, arguments);
39612
+ return _ref52.apply(this, arguments);
39537
39613
  };
39538
39614
  }();
39539
39615
  var heartBeatRealKeys$1 = ['video_fps', 'video_bitrate', 'audio_fps', 'audio_bitrate'];
@@ -39821,6 +39897,7 @@
39821
39897
  setCurrentMicrophoneVolume: setCurrentMicrophoneVolume,
39822
39898
  getCurrentMicrophoneVolume: getCurrentMicrophoneVolume,
39823
39899
  startLocalOrRemotePreview: startLocalOrRemotePreview$1,
39900
+ restartCaptureScreen: restartCaptureScreen$1,
39824
39901
  startDeviceCheckerPreview: startDeviceCheckerPreview$1,
39825
39902
  stopDeviceCheckerPreview: stopDeviceCheckerPreview,
39826
39903
  enableAudioSpeakerCapture: enableAudioSpeakerCapture,
@@ -40369,6 +40446,17 @@
40369
40446
  return getOrLocateVideo(args.isLocal, args.streamId, args.domId);
40370
40447
  }
40371
40448
  };
40449
+ var restartCaptureScreen$2 = function restartCaptureScreen() {
40450
+ switch (window.zbztAVSDK_init_sdk_type) {
40451
+ case ZEGO:
40452
+ return zegosdk.restartCaptureScreen();
40453
+ case TALRTC:
40454
+ case NERTC:
40455
+ case VOLCRTC:
40456
+ default:
40457
+ return talrtcsdk.restartCaptureScreen();
40458
+ }
40459
+ };
40372
40460
  var startDeviceCheckerPreview$2 = function startDeviceCheckerPreview(streamId, domId) {
40373
40461
  switch (window.zbztAVSDK_init_sdk_type) {
40374
40462
  case ZEGO:
@@ -42151,6 +42239,7 @@
42151
42239
  setCameraDevice: setCameraDevice$2,
42152
42240
  openOrCloseCamera: openOrCloseCamera$2,
42153
42241
  getOrLocateVideo: getOrLocateVideo$1,
42242
+ restartCaptureScreen: restartCaptureScreen$2,
42154
42243
  startDeviceCheckerPreview: startDeviceCheckerPreview$2,
42155
42244
  stopDeviceCheckerPreview: stopDeviceCheckerPreview$1,
42156
42245
  getSpeakerDeviceList: getSpeakerDeviceList$3,
@@ -61495,45 +61584,61 @@
61495
61584
  }, _callee11);
61496
61585
  }))();
61497
61586
  },
61498
- deviceCheckerPreview: function deviceCheckerPreview(args) {
61587
+ restartCaptureScreen: function restartCaptureScreen() {
61499
61588
  return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee12() {
61500
- var streamId;
61501
61589
  return regenerator.wrap(function _callee12$(_context12) {
61502
61590
  while (1) switch (_context12.prev = _context12.next) {
61591
+ case 0:
61592
+ defaultApi$1.writeLog('sdk action : restartCaptureScreen');
61593
+ userFunc('restartCaptureScreen');
61594
+ _context12.next = 4;
61595
+ return zbztAVSDK.restartCaptureScreen();
61596
+ case 4:
61597
+ case "end":
61598
+ return _context12.stop();
61599
+ }
61600
+ }, _callee12);
61601
+ }))();
61602
+ },
61603
+ deviceCheckerPreview: function deviceCheckerPreview(args) {
61604
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee13() {
61605
+ var streamId;
61606
+ return regenerator.wrap(function _callee13$(_context13) {
61607
+ while (1) switch (_context13.prev = _context13.next) {
61503
61608
  case 0:
61504
61609
  defaultApi$1.writeLog("sdk action : deviceCheckerPreview --start args : ".concat(JSON.stringify(args)));
61505
61610
  userFunc('deviceCheckerPreview', args);
61506
61611
  streamId = args.streamId || args.userId && generateStreamId(args.userId, args.groupId);
61507
- _context12.next = 5;
61612
+ _context13.next = 5;
61508
61613
  return zbztAVSDK.startDeviceCheckerPreview(streamId, args.domId);
61509
61614
  case 5:
61510
61615
  case "end":
61511
- return _context12.stop();
61616
+ return _context13.stop();
61512
61617
  }
61513
- }, _callee12);
61618
+ }, _callee13);
61514
61619
  }))();
61515
61620
  },
61516
61621
  stopDeviceCheckerPreview: function stopDeviceCheckerPreview(args) {
61517
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee13() {
61518
- return regenerator.wrap(function _callee13$(_context13) {
61519
- while (1) switch (_context13.prev = _context13.next) {
61622
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee14() {
61623
+ return regenerator.wrap(function _callee14$(_context14) {
61624
+ while (1) switch (_context14.prev = _context14.next) {
61520
61625
  case 0:
61521
61626
  defaultApi$1.writeLog("sdk action : stopDeviceCheckerPreview --start args : ".concat(JSON.stringify(args)));
61522
61627
  userFunc('stopDeviceCheckerPreview', args);
61523
- _context13.next = 4;
61628
+ _context14.next = 4;
61524
61629
  return zbztAVSDK.stopDeviceCheckerPreview();
61525
61630
  case 4:
61526
61631
  case "end":
61527
- return _context13.stop();
61632
+ return _context14.stop();
61528
61633
  }
61529
- }, _callee13);
61634
+ }, _callee14);
61530
61635
  }))();
61531
61636
  },
61532
61637
  linkMicReport: function linkMicReport(args) {
61533
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee14() {
61638
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee15() {
61534
61639
  var name, pull_uid, trace_id, pull_uid1;
61535
- return regenerator.wrap(function _callee14$(_context14) {
61536
- while (1) switch (_context14.prev = _context14.next) {
61640
+ return regenerator.wrap(function _callee15$(_context15) {
61641
+ while (1) switch (_context15.prev = _context15.next) {
61537
61642
  case 0:
61538
61643
  defaultApi$1.writeLog("sdk action : linkMicReport args : ".concat(JSON.stringify(args)));
61539
61644
  name = args.name, pull_uid = args.pull_uid, trace_id = args.trace_id;
@@ -61550,9 +61655,9 @@
61550
61655
  ;
61551
61656
  case 6:
61552
61657
  case "end":
61553
- return _context14.stop();
61658
+ return _context15.stop();
61554
61659
  }
61555
- }, _callee14);
61660
+ }, _callee15);
61556
61661
  }))();
61557
61662
  },
61558
61663
  /**
@@ -61563,10 +61668,10 @@
61563
61668
  */
61564
61669
  startPushFlow: function startPushFlow(streamid, idx) {
61565
61670
  var _this4 = this;
61566
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee15() {
61671
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee16() {
61567
61672
  var initParams;
61568
- return regenerator.wrap(function _callee15$(_context15) {
61569
- while (1) switch (_context15.prev = _context15.next) {
61673
+ return regenerator.wrap(function _callee16$(_context16) {
61674
+ while (1) switch (_context16.prev = _context16.next) {
61570
61675
  case 0:
61571
61676
  defaultApi$1.writeLog("sdk action : startPushFlow streamId:".concat(streamid, " idx: ").concat(idx));
61572
61677
  userFunc('startPushFlow', {
@@ -61581,7 +61686,7 @@
61581
61686
  }) : dataReport$2.startPublish();
61582
61687
  } catch (e) {}
61583
61688
  ;
61584
- _context15.next = 7;
61689
+ _context16.next = 7;
61585
61690
  return zbztAVSDK.startPushFlow(streamid, idx);
61586
61691
  case 7:
61587
61692
  // 不重新推流此情况不适用,推流状态跟着设备开关情况改变,以下仅用作数据上报
@@ -61601,15 +61706,15 @@
61601
61706
  }
61602
61707
  case 10:
61603
61708
  case "end":
61604
- return _context15.stop();
61709
+ return _context16.stop();
61605
61710
  }
61606
- }, _callee15);
61711
+ }, _callee16);
61607
61712
  }))();
61608
61713
  },
61609
61714
  stopPushFlow: function stopPushFlow(idx, streamid) {
61610
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee16() {
61611
- return regenerator.wrap(function _callee16$(_context16) {
61612
- while (1) switch (_context16.prev = _context16.next) {
61715
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee17() {
61716
+ return regenerator.wrap(function _callee17$(_context17) {
61717
+ while (1) switch (_context17.prev = _context17.next) {
61613
61718
  case 0:
61614
61719
  defaultApi$1.writeLog("sdk action : stopPushFlow streamid:".concat(streamid, " idx:").concat(idx));
61615
61720
  userFunc('stopPushFlow', {
@@ -61617,7 +61722,7 @@
61617
61722
  streamid: streamid
61618
61723
  });
61619
61724
  userAndDeviceStatusInfo.isPushingFlow = false;
61620
- _context16.next = 5;
61725
+ _context17.next = 5;
61621
61726
  return zbztAVSDK.stopPushFlow(idx, streamid);
61622
61727
  case 5:
61623
61728
  try {
@@ -61636,27 +61741,27 @@
61636
61741
  }
61637
61742
  case 10:
61638
61743
  case "end":
61639
- return _context16.stop();
61744
+ return _context17.stop();
61640
61745
  }
61641
- }, _callee16);
61746
+ }, _callee17);
61642
61747
  }))();
61643
61748
  },
61644
61749
  initPullFlow: function initPullFlow(args) {
61645
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee17() {
61750
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee18() {
61646
61751
  var streamId, mute, audioOnly, streamType, result, _yield$result$videoSr, videoSrc, playerId;
61647
- return regenerator.wrap(function _callee17$(_context17) {
61648
- while (1) switch (_context17.prev = _context17.next) {
61752
+ return regenerator.wrap(function _callee18$(_context18) {
61753
+ while (1) switch (_context18.prev = _context18.next) {
61649
61754
  case 0:
61650
61755
  defaultApi$1.writeLog("sdk action : initPullFlow ,".concat(JSON.stringify(args)));
61651
61756
  userFunc('initPullFlow', args);
61652
61757
  streamId = args.streamId || generateStreamId(args.userId, args.groupId);
61653
61758
  if (!pullingStatus[streamId]) {
61654
- _context17.next = 7;
61759
+ _context18.next = 7;
61655
61760
  break;
61656
61761
  }
61657
61762
  defaultApi$1.writeLog("sdk action : initPullFlow - pulling, streamId : ".concat(streamId));
61658
61763
  userFunc('initPullFlow - pulling', args);
61659
- return _context17.abrupt("return");
61764
+ return _context18.abrupt("return");
61660
61765
  case 7:
61661
61766
  ;
61662
61767
  pullingStatus[streamId] = true;
@@ -61683,53 +61788,53 @@
61683
61788
  });
61684
61789
  } catch (e) {}
61685
61790
  ;
61686
- _context17.next = 18;
61791
+ _context18.next = 18;
61687
61792
  return result.videoSrc;
61688
61793
  case 18:
61689
- _yield$result$videoSr = _context17.sent;
61794
+ _yield$result$videoSr = _context18.sent;
61690
61795
  videoSrc = _yield$result$videoSr.videoSrc;
61691
61796
  playerId = _yield$result$videoSr.playerId;
61692
61797
  pullingStatus[streamId] = false;
61693
61798
  defaultApi$1.writeLog("sdk initPullFlow ".concat(JSON.stringify(args), ", streamId : ").concat(streamId, ", result :").concat(result.sdk_type, ": ").concat(videoSrc, " type:").concat(streamType, " playerId:").concat(playerId));
61694
61799
  if (!args.needPlayerId) {
61695
- _context17.next = 25;
61800
+ _context18.next = 25;
61696
61801
  break;
61697
61802
  }
61698
- return _context17.abrupt("return", _objectSpread$a({
61803
+ return _context18.abrupt("return", _objectSpread$a({
61699
61804
  videoSrc: videoSrc,
61700
61805
  playerId: playerId,
61701
61806
  streamId: streamId
61702
61807
  }, args));
61703
61808
  case 25:
61704
- return _context17.abrupt("return", videoSrc);
61809
+ return _context18.abrupt("return", videoSrc);
61705
61810
  case 26:
61706
61811
  case "end":
61707
- return _context17.stop();
61812
+ return _context18.stop();
61708
61813
  }
61709
- }, _callee17);
61814
+ }, _callee18);
61710
61815
  }))();
61711
61816
  },
61712
61817
  startPullFlow: function startPullFlow(userId, groupId) {
61713
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee18() {
61818
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee19() {
61714
61819
  var streamId;
61715
- return regenerator.wrap(function _callee18$(_context18) {
61716
- while (1) switch (_context18.prev = _context18.next) {
61820
+ return regenerator.wrap(function _callee19$(_context19) {
61821
+ while (1) switch (_context19.prev = _context19.next) {
61717
61822
  case 0:
61718
61823
  userFunc('startPullFlow', {
61719
61824
  userId: userId,
61720
61825
  groupId: groupId
61721
61826
  });
61722
61827
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
61723
- _context18.next = 6;
61828
+ _context19.next = 6;
61724
61829
  break;
61725
61830
  }
61726
61831
  defaultApi$1.writeLog("sdk action : startPullFlow ,userId : ".concat(JSON.stringify(userId), ", param error"));
61727
- return _context18.abrupt("return");
61832
+ return _context19.abrupt("return");
61728
61833
  case 6:
61729
61834
  defaultApi$1.writeLog("sdk action : startPullFlow ,userId : ".concat(JSON.stringify(userId), ", begin"));
61730
61835
  case 7:
61731
61836
  streamId = generateStreamId(userId, groupId);
61732
- _context18.next = 10;
61837
+ _context19.next = 10;
61733
61838
  return zbztAVSDK.startPullFlow(streamId);
61734
61839
  case 10:
61735
61840
  // userAndDeviceStatusInfo.ignoreList.delete(userId)
@@ -61737,16 +61842,16 @@
61737
61842
  defaultApi$1.writeLog("sdk action : startPullFlow \uFF0CuserId ".concat(userId, ", notice: stream_recover"));
61738
61843
  case 12:
61739
61844
  case "end":
61740
- return _context18.stop();
61845
+ return _context19.stop();
61741
61846
  }
61742
- }, _callee18);
61847
+ }, _callee19);
61743
61848
  }))();
61744
61849
  },
61745
61850
  stopPullFlow: function stopPullFlow(userId, groupId, recovery, streamid) {
61746
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee19() {
61851
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee20() {
61747
61852
  var streamId;
61748
- return regenerator.wrap(function _callee19$(_context19) {
61749
- while (1) switch (_context19.prev = _context19.next) {
61853
+ return regenerator.wrap(function _callee20$(_context20) {
61854
+ while (1) switch (_context20.prev = _context20.next) {
61750
61855
  case 0:
61751
61856
  userFunc('stopPullFlow', {
61752
61857
  userId: userId,
@@ -61755,16 +61860,16 @@
61755
61860
  });
61756
61861
  // const {userId, groupId, recovery, streamid} = args;
61757
61862
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
61758
- _context19.next = 6;
61863
+ _context20.next = 6;
61759
61864
  break;
61760
61865
  }
61761
61866
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", param error"));
61762
- return _context19.abrupt("return");
61867
+ return _context20.abrupt("return");
61763
61868
  case 6:
61764
61869
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", begin"));
61765
61870
  case 7:
61766
61871
  streamId = streamid || generateStreamId(userId, groupId);
61767
- _context19.next = 10;
61872
+ _context20.next = 10;
61768
61873
  return zbztAVSDK.stopPullFlow(streamId, recovery);
61769
61874
  case 10:
61770
61875
  try {
@@ -61778,9 +61883,9 @@
61778
61883
  defaultApi$1.writeLog("sdk action : stopPullFlow ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", notice: stream_stopped"));
61779
61884
  case 14:
61780
61885
  case "end":
61781
- return _context19.stop();
61886
+ return _context20.stop();
61782
61887
  }
61783
- }, _callee19);
61888
+ }, _callee20);
61784
61889
  }))();
61785
61890
  },
61786
61891
  /**
@@ -61788,56 +61893,56 @@
61788
61893
  * @return Promise | void
61789
61894
  */
61790
61895
  stopAllPullFlow: function stopAllPullFlow() {
61791
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee20() {
61792
- return regenerator.wrap(function _callee20$(_context20) {
61793
- while (1) switch (_context20.prev = _context20.next) {
61896
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee21() {
61897
+ return regenerator.wrap(function _callee21$(_context21) {
61898
+ while (1) switch (_context21.prev = _context21.next) {
61794
61899
  case 0:
61795
61900
  defaultApi$1.writeLog('sdk action : stopAllPullFlow begin');
61796
61901
  userFunc('stopAllPullFlow');
61797
- _context20.next = 4;
61902
+ _context21.next = 4;
61798
61903
  return zbztAVSDK.stopAllPullFlow();
61799
61904
  case 4:
61800
61905
  defaultApi$1.writeLog('sdk action : stopAllPullFlow end');
61801
61906
  case 5:
61802
61907
  case "end":
61803
- return _context20.stop();
61908
+ return _context21.stop();
61804
61909
  }
61805
- }, _callee20);
61910
+ }, _callee21);
61806
61911
  }))();
61807
61912
  },
61808
61913
  playDestroy: function playDestroy(userId, groupId) {
61809
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee21() {
61914
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee22() {
61810
61915
  var streamId;
61811
- return regenerator.wrap(function _callee21$(_context21) {
61812
- while (1) switch (_context21.prev = _context21.next) {
61916
+ return regenerator.wrap(function _callee22$(_context22) {
61917
+ while (1) switch (_context22.prev = _context22.next) {
61813
61918
  case 0:
61814
61919
  if (!(typeof userId !== 'number' && typeof userId !== 'string')) {
61815
- _context21.next = 5;
61920
+ _context22.next = 5;
61816
61921
  break;
61817
61922
  }
61818
61923
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", param error"));
61819
- return _context21.abrupt("return");
61924
+ return _context22.abrupt("return");
61820
61925
  case 5:
61821
61926
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", begin"));
61822
61927
  case 6:
61823
61928
  streamId = generateStreamId(userId, groupId);
61824
- _context21.next = 9;
61929
+ _context22.next = 9;
61825
61930
  return zbztAVSDK.playDestroy(streamId);
61826
61931
  case 9:
61827
61932
  noticeStreamStatus(userId, 'stream_destroy');
61828
61933
  defaultApi$1.writeLog("sdk action : playDestroy ,userId : ".concat(userId, ", groupId: ").concat(groupId, ", notice: stream_destroy"));
61829
61934
  case 11:
61830
61935
  case "end":
61831
- return _context21.stop();
61936
+ return _context22.stop();
61832
61937
  }
61833
- }, _callee21);
61938
+ }, _callee22);
61834
61939
  }))();
61835
61940
  },
61836
61941
  changePullFlow: function changePullFlow(args) {
61837
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee22() {
61942
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee23() {
61838
61943
  var streamId, toStreamId, result, _yield$result, videoSrc, playerId;
61839
- return regenerator.wrap(function _callee22$(_context22) {
61840
- while (1) switch (_context22.prev = _context22.next) {
61944
+ return regenerator.wrap(function _callee23$(_context23) {
61945
+ while (1) switch (_context23.prev = _context23.next) {
61841
61946
  case 0:
61842
61947
  defaultApi$1.writeLog("sdk action : changePullFlow ,".concat(JSON.stringify(args)));
61843
61948
  streamId = generateStreamId(args.userId, args.groupId);
@@ -61847,121 +61952,121 @@
61847
61952
  streamId: streamId,
61848
61953
  toStreamId: toStreamId
61849
61954
  });
61850
- _context22.next = 6;
61955
+ _context23.next = 6;
61851
61956
  return result;
61852
61957
  case 6:
61853
- _yield$result = _context22.sent;
61958
+ _yield$result = _context23.sent;
61854
61959
  videoSrc = _yield$result.videoSrc;
61855
61960
  playerId = _yield$result.playerId;
61856
61961
  defaultApi$1.writeLog("sdk changePullFlow ".concat(JSON.stringify(args), ", streamId : ").concat(streamId, ", toStreamId : ").concat(toStreamId, ", result :").concat(result.sdk_type, ": ").concat(videoSrc));
61857
61962
  if (!args.needPlayerId) {
61858
- _context22.next = 12;
61963
+ _context23.next = 12;
61859
61964
  break;
61860
61965
  }
61861
- return _context22.abrupt("return", {
61966
+ return _context23.abrupt("return", {
61862
61967
  videoSrc: videoSrc,
61863
61968
  playerId: playerId
61864
61969
  });
61865
61970
  case 12:
61866
- return _context22.abrupt("return", videoSrc);
61971
+ return _context23.abrupt("return", videoSrc);
61867
61972
  case 13:
61868
61973
  case "end":
61869
- return _context22.stop();
61974
+ return _context23.stop();
61870
61975
  }
61871
- }, _callee22);
61976
+ }, _callee23);
61872
61977
  }))();
61873
61978
  },
61874
61979
  getSpeakerDeviceList: function getSpeakerDeviceList() {
61875
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee23() {
61980
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee24() {
61876
61981
  var devices;
61877
- return regenerator.wrap(function _callee23$(_context23) {
61878
- while (1) switch (_context23.prev = _context23.next) {
61982
+ return regenerator.wrap(function _callee24$(_context24) {
61983
+ while (1) switch (_context24.prev = _context24.next) {
61879
61984
  case 0:
61880
61985
  defaultApi$1.writeLog('sdk action : getSpeakerDeviceList');
61881
61986
  userFunc('getSpeakerDeviceList');
61882
- _context23.next = 4;
61987
+ _context24.next = 4;
61883
61988
  return zbztAVSDK.getSpeakerDeviceList();
61884
61989
  case 4:
61885
- devices = _context23.sent;
61990
+ devices = _context24.sent;
61886
61991
  defaultApi$1.writeLog("sdk action : getSpeakerDeviceList ".concat(JSON.stringify(devices)));
61887
61992
  userFunc('getSpeakerDeviceList', devices);
61888
- return _context23.abrupt("return", devices);
61993
+ return _context24.abrupt("return", devices);
61889
61994
  case 8:
61890
61995
  case "end":
61891
- return _context23.stop();
61996
+ return _context24.stop();
61892
61997
  }
61893
- }, _callee23);
61998
+ }, _callee24);
61894
61999
  }))();
61895
62000
  },
61896
62001
  setSpeakerDevice: function setSpeakerDevice(deviceId) {
61897
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee24() {
61898
- return regenerator.wrap(function _callee24$(_context24) {
61899
- while (1) switch (_context24.prev = _context24.next) {
62002
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
62003
+ return regenerator.wrap(function _callee25$(_context25) {
62004
+ while (1) switch (_context25.prev = _context25.next) {
61900
62005
  case 0:
61901
62006
  defaultApi$1.writeLog("sdk action : setSpeakerDevice deviceId:".concat(deviceId));
61902
62007
  userFunc('setSpeakerDevice', deviceId);
61903
- _context24.next = 4;
62008
+ _context25.next = 4;
61904
62009
  return zbztAVSDK.setSpeakerDevice(deviceId, 'client');
61905
62010
  case 4:
61906
62011
  case "end":
61907
- return _context24.stop();
62012
+ return _context25.stop();
61908
62013
  }
61909
- }, _callee24);
62014
+ }, _callee25);
61910
62015
  }))();
61911
62016
  },
61912
62017
  getSpeakerDevice: function getSpeakerDevice() {
61913
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee25() {
61914
- return regenerator.wrap(function _callee25$(_context25) {
61915
- while (1) switch (_context25.prev = _context25.next) {
62018
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26() {
62019
+ return regenerator.wrap(function _callee26$(_context26) {
62020
+ while (1) switch (_context26.prev = _context26.next) {
61916
62021
  case 0:
61917
62022
  defaultApi$1.writeLog('sdk action : getSpeakerDevice');
61918
- return _context25.abrupt("return", zbztAVSDK.getSpeakerDevice());
62023
+ return _context26.abrupt("return", zbztAVSDK.getSpeakerDevice());
61919
62024
  case 2:
61920
62025
  case "end":
61921
- return _context25.stop();
62026
+ return _context26.stop();
61922
62027
  }
61923
- }, _callee25);
62028
+ }, _callee26);
61924
62029
  }))();
61925
62030
  },
61926
62031
  getSpeakerVolume: function getSpeakerVolume() {
61927
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee26() {
61928
- return regenerator.wrap(function _callee26$(_context26) {
61929
- while (1) switch (_context26.prev = _context26.next) {
62032
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27() {
62033
+ return regenerator.wrap(function _callee27$(_context27) {
62034
+ while (1) switch (_context27.prev = _context27.next) {
61930
62035
  case 0:
61931
62036
  defaultApi$1.writeLog('sdk action : getSpeakerVolume ');
61932
- _context26.next = 3;
62037
+ _context27.next = 3;
61933
62038
  return zbztAVSDK.getSpeakerVolume();
61934
62039
  case 3:
61935
- return _context26.abrupt("return", _context26.sent);
62040
+ return _context27.abrupt("return", _context27.sent);
61936
62041
  case 4:
61937
62042
  case "end":
61938
- return _context26.stop();
62043
+ return _context27.stop();
61939
62044
  }
61940
- }, _callee26);
62045
+ }, _callee27);
61941
62046
  }))();
61942
62047
  },
61943
62048
  setSpeakerVolume: function setSpeakerVolume(volume) {
61944
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee27() {
61945
- return regenerator.wrap(function _callee27$(_context27) {
61946
- while (1) switch (_context27.prev = _context27.next) {
62049
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28() {
62050
+ return regenerator.wrap(function _callee28$(_context28) {
62051
+ while (1) switch (_context28.prev = _context28.next) {
61947
62052
  case 0:
61948
- _context27.next = 2;
62053
+ _context28.next = 2;
61949
62054
  return zbztAVSDK.setSpeakerVolume(volume);
61950
62055
  case 2:
61951
62056
  defaultApi$1.writeLog("sdk action : setSpeakerVolume ".concat(volume));
61952
62057
  case 3:
61953
62058
  case "end":
61954
- return _context27.stop();
62059
+ return _context28.stop();
61955
62060
  }
61956
- }, _callee27);
62061
+ }, _callee28);
61957
62062
  }))();
61958
62063
  },
61959
62064
  setSpeakerMute: function setSpeakerMute(mute) {
61960
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28() {
61961
- return regenerator.wrap(function _callee28$(_context28) {
61962
- while (1) switch (_context28.prev = _context28.next) {
62065
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
62066
+ return regenerator.wrap(function _callee29$(_context29) {
62067
+ while (1) switch (_context29.prev = _context29.next) {
61963
62068
  case 0:
61964
- _context28.next = 2;
62069
+ _context29.next = 2;
61965
62070
  return zbztAVSDK.setSpeakerMute(mute);
61966
62071
  case 2:
61967
62072
  try {
@@ -61976,141 +62081,141 @@
61976
62081
  defaultApi$1.writeLog("sdk action : setSpeakerMute ".concat(mute));
61977
62082
  case 5:
61978
62083
  case "end":
61979
- return _context28.stop();
62084
+ return _context29.stop();
61980
62085
  }
61981
- }, _callee28);
62086
+ }, _callee29);
61982
62087
  }))();
61983
62088
  },
61984
62089
  openOrCloseCameraAndMicrophone: function openOrCloseCameraAndMicrophone(type) {
61985
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee29() {
61986
- return regenerator.wrap(function _callee29$(_context29) {
61987
- while (1) switch (_context29.prev = _context29.next) {
62090
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
62091
+ return regenerator.wrap(function _callee30$(_context30) {
62092
+ while (1) switch (_context30.prev = _context30.next) {
61988
62093
  case 0:
61989
- _context29.next = 2;
62094
+ _context30.next = 2;
61990
62095
  return zbztAVSDK.openOrCloseCameraAndMicrophone(type);
61991
62096
  case 2:
61992
62097
  defaultApi$1.writeLog("sdk action : openOrCloseCameraAndMicrophone ".concat(type));
61993
62098
  case 3:
61994
62099
  case "end":
61995
- return _context29.stop();
62100
+ return _context30.stop();
61996
62101
  }
61997
- }, _callee29);
62102
+ }, _callee30);
61998
62103
  }))();
61999
62104
  },
62000
62105
  getAppVolume: function getAppVolume() {
62001
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee30() {
62106
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
62002
62107
  var volume;
62003
- return regenerator.wrap(function _callee30$(_context30) {
62004
- while (1) switch (_context30.prev = _context30.next) {
62108
+ return regenerator.wrap(function _callee31$(_context31) {
62109
+ while (1) switch (_context31.prev = _context31.next) {
62005
62110
  case 0:
62006
- _context30.next = 2;
62111
+ _context31.next = 2;
62007
62112
  return zbztAVSDK.getAppVolume();
62008
62113
  case 2:
62009
- volume = _context30.sent;
62114
+ volume = _context31.sent;
62010
62115
  defaultApi$1.writeLog("sdk action : getAppVolume ".concat(volume));
62011
- return _context30.abrupt("return", volume);
62116
+ return _context31.abrupt("return", volume);
62012
62117
  case 5:
62013
62118
  case "end":
62014
- return _context30.stop();
62119
+ return _context31.stop();
62015
62120
  }
62016
- }, _callee30);
62121
+ }, _callee31);
62017
62122
  }))();
62018
62123
  },
62019
62124
  setAppVolume: function setAppVolume(volume) {
62020
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee31() {
62021
- return regenerator.wrap(function _callee31$(_context31) {
62022
- while (1) switch (_context31.prev = _context31.next) {
62125
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
62126
+ return regenerator.wrap(function _callee32$(_context32) {
62127
+ while (1) switch (_context32.prev = _context32.next) {
62023
62128
  case 0:
62024
- _context31.next = 2;
62129
+ _context32.next = 2;
62025
62130
  return zbztAVSDK.setAppVolume(volume);
62026
62131
  case 2:
62027
62132
  defaultApi$1.writeLog("sdk action : setAppVolume ".concat(volume));
62028
62133
  case 3:
62029
62134
  case "end":
62030
- return _context31.stop();
62135
+ return _context32.stop();
62031
62136
  }
62032
- }, _callee31);
62137
+ }, _callee32);
62033
62138
  }))();
62034
62139
  },
62035
62140
  setAppMute: function setAppMute(mute) {
62036
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee32() {
62037
- return regenerator.wrap(function _callee32$(_context32) {
62038
- while (1) switch (_context32.prev = _context32.next) {
62141
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33() {
62142
+ return regenerator.wrap(function _callee33$(_context33) {
62143
+ while (1) switch (_context33.prev = _context33.next) {
62039
62144
  case 0:
62040
- _context32.next = 2;
62145
+ _context33.next = 2;
62041
62146
  return zbztAVSDK.setAppMute(mute);
62042
62147
  case 2:
62043
62148
  defaultApi$1.writeLog("sdk action : setAppMute ".concat(mute));
62044
62149
  case 3:
62045
62150
  case "end":
62046
- return _context32.stop();
62151
+ return _context33.stop();
62047
62152
  }
62048
- }, _callee32);
62153
+ }, _callee33);
62049
62154
  }))();
62050
62155
  },
62051
62156
  getMicrophoneDeviceList: function getMicrophoneDeviceList() {
62052
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee33() {
62157
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34() {
62053
62158
  var devices;
62054
- return regenerator.wrap(function _callee33$(_context33) {
62055
- while (1) switch (_context33.prev = _context33.next) {
62159
+ return regenerator.wrap(function _callee34$(_context34) {
62160
+ while (1) switch (_context34.prev = _context34.next) {
62056
62161
  case 0:
62057
62162
  defaultApi$1.writeLog('sdk action : getMicrophoneDeviceList');
62058
62163
  userFunc('getMicrophoneDeviceList');
62059
- _context33.next = 4;
62164
+ _context34.next = 4;
62060
62165
  return zbztAVSDK.getMicrophoneDeviceList();
62061
62166
  case 4:
62062
- devices = _context33.sent;
62167
+ devices = _context34.sent;
62063
62168
  defaultApi$1.writeLog("sdk action : getMicrophoneDeviceList ".concat(JSON.stringify(devices)));
62064
62169
  userFunc('getMicrophoneDeviceList', devices);
62065
- return _context33.abrupt("return", devices);
62170
+ return _context34.abrupt("return", devices);
62066
62171
  case 8:
62067
62172
  case "end":
62068
- return _context33.stop();
62173
+ return _context34.stop();
62069
62174
  }
62070
- }, _callee33);
62175
+ }, _callee34);
62071
62176
  }))();
62072
62177
  },
62073
62178
  setMicrophoneDevice: function setMicrophoneDevice(deviceId) {
62074
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee34() {
62075
- return regenerator.wrap(function _callee34$(_context34) {
62076
- while (1) switch (_context34.prev = _context34.next) {
62179
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35() {
62180
+ return regenerator.wrap(function _callee35$(_context35) {
62181
+ while (1) switch (_context35.prev = _context35.next) {
62077
62182
  case 0:
62078
62183
  defaultApi$1.writeLog("sdk action : setMicrophoneDevice ".concat(deviceId));
62079
62184
  userFunc('setMicrophoneDevice', deviceId);
62080
- _context34.next = 4;
62185
+ _context35.next = 4;
62081
62186
  return zbztAVSDK.setMicrophoneDevice(deviceId, 'client');
62082
62187
  case 4:
62083
62188
  case "end":
62084
- return _context34.stop();
62189
+ return _context35.stop();
62085
62190
  }
62086
- }, _callee34);
62191
+ }, _callee35);
62087
62192
  }))();
62088
62193
  },
62089
62194
  openOrCloseMicrophone: function openOrCloseMicrophone(operation) {
62090
62195
  var _this5 = this;
62091
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee35() {
62092
- return regenerator.wrap(function _callee35$(_context35) {
62093
- while (1) switch (_context35.prev = _context35.next) {
62196
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36() {
62197
+ return regenerator.wrap(function _callee36$(_context36) {
62198
+ while (1) switch (_context36.prev = _context36.next) {
62094
62199
  case 0:
62095
62200
  defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(operation, " --start"));
62096
62201
  userFunc('openOrCloseMicrophone', operation);
62097
62202
  userAndDeviceStatusInfo.microPhone = operation;
62098
62203
  //记录麦克风状态,用作推流类型上报,是否推声音
62099
62204
  _this5.deviceStatus.microphone = operation;
62100
- _context35.prev = 4;
62101
- _context35.next = 7;
62205
+ _context36.prev = 4;
62206
+ _context36.next = 7;
62102
62207
  return zbztAVSDK.openOrCloseMicrophone(operation);
62103
62208
  case 7:
62104
- _context35.next = 14;
62209
+ _context36.next = 14;
62105
62210
  break;
62106
62211
  case 9:
62107
- _context35.prev = 9;
62108
- _context35.t0 = _context35["catch"](4);
62109
- defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(_context35.t0), null, 'error');
62212
+ _context36.prev = 9;
62213
+ _context36.t0 = _context36["catch"](4);
62214
+ defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(_context36.t0), null, 'error');
62110
62215
  if (operation) {
62111
- NOTICE.openMicphoneError(_context35.t0);
62216
+ NOTICE.openMicphoneError(_context36.t0);
62112
62217
  }
62113
- return _context35.abrupt("return");
62218
+ return _context36.abrupt("return");
62114
62219
  case 14:
62115
62220
  try {
62116
62221
  dataReport$2.deviceChange({
@@ -62125,17 +62230,17 @@
62125
62230
  defaultApi$1.writeLog("sdk action : openOrCloseMicrophone ".concat(operation, " --end"));
62126
62231
  case 18:
62127
62232
  case "end":
62128
- return _context35.stop();
62233
+ return _context36.stop();
62129
62234
  }
62130
- }, _callee35, null, [[4, 9]]);
62235
+ }, _callee36, null, [[4, 9]]);
62131
62236
  }))();
62132
62237
  },
62133
62238
  //听或不听指定用户的声音
62134
62239
  setAudioMute: function setAudioMute(userId, mute, groupId, streamid) {
62135
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee36() {
62240
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37() {
62136
62241
  var streamId;
62137
- return regenerator.wrap(function _callee36$(_context36) {
62138
- while (1) switch (_context36.prev = _context36.next) {
62242
+ return regenerator.wrap(function _callee37$(_context37) {
62243
+ while (1) switch (_context37.prev = _context37.next) {
62139
62244
  case 0:
62140
62245
  defaultApi$1.writeLog("sdk action : setAudioMute userId ".concat(userId, ", mute ").concat(mute, ", groupId ").concat(groupId, ", streamid ").concat(streamid));
62141
62246
  userFunc('setAudioMute', {
@@ -62145,13 +62250,13 @@
62145
62250
  streamid: streamid
62146
62251
  });
62147
62252
  streamId = streamid || generateStreamId(userId, groupId);
62148
- _context36.next = 5;
62253
+ _context37.next = 5;
62149
62254
  return zbztAVSDK.setAudioMute(streamId, mute);
62150
62255
  case 5:
62151
62256
  case "end":
62152
- return _context36.stop();
62257
+ return _context37.stop();
62153
62258
  }
62154
- }, _callee36);
62259
+ }, _callee37);
62155
62260
  }))();
62156
62261
  },
62157
62262
  /**
@@ -62161,82 +62266,82 @@
62161
62266
  * @return Promise | void
62162
62267
  */
62163
62268
  pullAudioFlow: function pullAudioFlow(streamid, operation) {
62164
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee37() {
62165
- return regenerator.wrap(function _callee37$(_context37) {
62166
- while (1) switch (_context37.prev = _context37.next) {
62269
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
62270
+ return regenerator.wrap(function _callee38$(_context38) {
62271
+ while (1) switch (_context38.prev = _context38.next) {
62167
62272
  case 0:
62168
62273
  defaultApi$1.writeLog("sdk action : pullAudioFlow --start ".concat(operation, ", streamid ").concat(streamid));
62169
62274
  userFunc('pullAudioFlow', {
62170
62275
  streamid: streamid,
62171
62276
  operation: operation
62172
62277
  });
62173
- _context37.next = 4;
62278
+ _context38.next = 4;
62174
62279
  return zbztAVSDK.pullAudioFlow(streamid, operation);
62175
62280
  case 4:
62176
62281
  defaultApi$1.writeLog("sdk action : pullAudioFlow --end ".concat(operation, ", streamid ").concat(streamid));
62177
62282
  case 5:
62178
62283
  case "end":
62179
- return _context37.stop();
62284
+ return _context38.stop();
62180
62285
  }
62181
- }, _callee37);
62286
+ }, _callee38);
62182
62287
  }))();
62183
62288
  },
62184
62289
  getMicrophoneVolume: function getMicrophoneVolume() {
62185
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee38() {
62186
- return regenerator.wrap(function _callee38$(_context38) {
62187
- while (1) switch (_context38.prev = _context38.next) {
62290
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
62291
+ return regenerator.wrap(function _callee39$(_context39) {
62292
+ while (1) switch (_context39.prev = _context39.next) {
62188
62293
  case 0:
62189
62294
  defaultApi$1.writeLog('sdk action : getMicrophoneVolume');
62190
- _context38.next = 3;
62295
+ _context39.next = 3;
62191
62296
  return zbztAVSDK.getMicrophoneVolume();
62192
62297
  case 3:
62193
- return _context38.abrupt("return", _context38.sent);
62298
+ return _context39.abrupt("return", _context39.sent);
62194
62299
  case 4:
62195
62300
  case "end":
62196
- return _context38.stop();
62301
+ return _context39.stop();
62197
62302
  }
62198
- }, _callee38);
62303
+ }, _callee39);
62199
62304
  }))();
62200
62305
  },
62201
62306
  setMicrophoneVolume: function setMicrophoneVolume(volume, mute) {
62202
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee39() {
62203
- return regenerator.wrap(function _callee39$(_context39) {
62204
- while (1) switch (_context39.prev = _context39.next) {
62307
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
62308
+ return regenerator.wrap(function _callee40$(_context40) {
62309
+ while (1) switch (_context40.prev = _context40.next) {
62205
62310
  case 0:
62206
62311
  defaultApi$1.writeLog("sdk action : setMicrophoneVolume ".concat(volume, " ").concat(mute));
62207
62312
  userFunc('setMicrophoneVolume', {
62208
62313
  volume: volume,
62209
62314
  mute: mute
62210
62315
  });
62211
- _context39.next = 4;
62316
+ _context40.next = 4;
62212
62317
  return zbztAVSDK.setMicrophoneVolume(volume, mute);
62213
62318
  case 4:
62214
62319
  case "end":
62215
- return _context39.stop();
62320
+ return _context40.stop();
62216
62321
  }
62217
- }, _callee39);
62322
+ }, _callee40);
62218
62323
  }))();
62219
62324
  },
62220
62325
  setMicrophoneMute: function setMicrophoneMute(mute) {
62221
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee40() {
62222
- return regenerator.wrap(function _callee40$(_context40) {
62223
- while (1) switch (_context40.prev = _context40.next) {
62326
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41() {
62327
+ return regenerator.wrap(function _callee41$(_context41) {
62328
+ while (1) switch (_context41.prev = _context41.next) {
62224
62329
  case 0:
62225
- _context40.next = 2;
62330
+ _context41.next = 2;
62226
62331
  return zbztAVSDK.setMicrophoneMute(mute);
62227
62332
  case 2:
62228
62333
  defaultApi$1.writeLog("sdk action : setMicrophoneMute ".concat(mute));
62229
62334
  case 3:
62230
62335
  case "end":
62231
- return _context40.stop();
62336
+ return _context41.stop();
62232
62337
  }
62233
- }, _callee40);
62338
+ }, _callee41);
62234
62339
  }))();
62235
62340
  },
62236
62341
  leaveRoom: function leaveRoom(type) {
62237
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee41() {
62238
- return regenerator.wrap(function _callee41$(_context41) {
62239
- while (1) switch (_context41.prev = _context41.next) {
62342
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42() {
62343
+ return regenerator.wrap(function _callee42$(_context42) {
62344
+ while (1) switch (_context42.prev = _context42.next) {
62240
62345
  case 0:
62241
62346
  //未初始化完成,无须卸载
62242
62347
  // if (sdk_status === -1) {
@@ -62256,7 +62361,7 @@
62256
62361
  channelClient.sendLeave(window.zbzt_sdk_init_params);
62257
62362
  channelClient.leaveRoom();
62258
62363
  // 重置设备检测初始化状态
62259
- _context41.next = 7;
62364
+ _context42.next = 7;
62260
62365
  return zbztAVSDK.leaveRoom(type);
62261
62366
  case 7:
62262
62367
  windowObjArr[0].concat(windowObjArr[1]).forEach(function (item) {
@@ -62276,25 +62381,25 @@
62276
62381
  window.zbztAVSDK_device_checker_init = null;
62277
62382
  case 14:
62278
62383
  case "end":
62279
- return _context41.stop();
62384
+ return _context42.stop();
62280
62385
  }
62281
- }, _callee41);
62386
+ }, _callee42);
62282
62387
  }))();
62283
62388
  },
62284
62389
  //崩溃后的销毁引擎,反初始化
62285
62390
  deinit: function deinit() {
62286
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee42() {
62287
- return regenerator.wrap(function _callee42$(_context42) {
62288
- while (1) switch (_context42.prev = _context42.next) {
62391
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43() {
62392
+ return regenerator.wrap(function _callee43$(_context43) {
62393
+ while (1) switch (_context43.prev = _context43.next) {
62289
62394
  case 0:
62290
62395
  defaultApi$1.writeLog('sdk action : deinit');
62291
- _context42.next = 3;
62396
+ _context43.next = 3;
62292
62397
  return zbztAVSDK.deinit();
62293
62398
  case 3:
62294
62399
  case "end":
62295
- return _context42.stop();
62400
+ return _context43.stop();
62296
62401
  }
62297
- }, _callee42);
62402
+ }, _callee43);
62298
62403
  }))();
62299
62404
  },
62300
62405
  /**
@@ -62303,19 +62408,19 @@
62303
62408
  * @return Promise | void
62304
62409
  */
62305
62410
  turnPush: function turnPush(cmd) {
62306
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee43() {
62307
- return regenerator.wrap(function _callee43$(_context43) {
62308
- while (1) switch (_context43.prev = _context43.next) {
62411
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44() {
62412
+ return regenerator.wrap(function _callee44$(_context44) {
62413
+ while (1) switch (_context44.prev = _context44.next) {
62309
62414
  case 0:
62310
- _context43.next = 2;
62415
+ _context44.next = 2;
62311
62416
  return zbztAVSDK.turnPush(cmd);
62312
62417
  case 2:
62313
62418
  defaultApi$1.writeLog("sdk action : turnPush ".concat(cmd));
62314
62419
  case 3:
62315
62420
  case "end":
62316
- return _context43.stop();
62421
+ return _context44.stop();
62317
62422
  }
62318
- }, _callee43);
62423
+ }, _callee44);
62319
62424
  }))();
62320
62425
  },
62321
62426
  openMicVolumeCb: function openMicVolumeCb(open) {
@@ -62357,18 +62462,18 @@
62357
62462
  */
62358
62463
  recordPublish: function recordPublish(args) {
62359
62464
  var _this6 = this;
62360
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee44() {
62361
- return regenerator.wrap(function _callee44$(_context44) {
62362
- while (1) switch (_context44.prev = _context44.next) {
62465
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45() {
62466
+ return regenerator.wrap(function _callee45$(_context45) {
62467
+ while (1) switch (_context45.prev = _context45.next) {
62363
62468
  case 0:
62364
62469
  args.streamId = _this6.getStreamInfo(args.userId, args.groupId).streamId;
62365
62470
  zbztAVSDK.recordPublishTarget(args);
62366
62471
  defaultApi$1.writeLog("sdk action : recordPublish, args: ".concat(JSON.stringify(args)));
62367
62472
  case 3:
62368
62473
  case "end":
62369
- return _context44.stop();
62474
+ return _context45.stop();
62370
62475
  }
62371
- }, _callee44);
62476
+ }, _callee45);
62372
62477
  }))();
62373
62478
  },
62374
62479
  /**
@@ -62501,9 +62606,9 @@
62501
62606
  */
62502
62607
  teacherStartLinkMic: function teacherStartLinkMic(mode) {
62503
62608
  var _this7 = this;
62504
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee45() {
62505
- return regenerator.wrap(function _callee45$(_context45) {
62506
- while (1) switch (_context45.prev = _context45.next) {
62609
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
62610
+ return regenerator.wrap(function _callee46$(_context46) {
62611
+ while (1) switch (_context46.prev = _context46.next) {
62507
62612
  case 0:
62508
62613
  defaultApi$1.writeLog("sdk action: teacherStartLinkMic, mode: ".concat(mode));
62509
62614
  try {
@@ -62514,15 +62619,15 @@
62514
62619
  });
62515
62620
  } catch (e) {}
62516
62621
  ;
62517
- _context45.next = 5;
62622
+ _context46.next = 5;
62518
62623
  return zbztAVSDK.teacherStartLinkMic(mode);
62519
62624
  case 5:
62520
- return _context45.abrupt("return", _this7.startPushFlow());
62625
+ return _context46.abrupt("return", _this7.startPushFlow());
62521
62626
  case 6:
62522
62627
  case "end":
62523
- return _context45.stop();
62628
+ return _context46.stop();
62524
62629
  }
62525
- }, _callee45);
62630
+ }, _callee46);
62526
62631
  }))();
62527
62632
  },
62528
62633
  /**
@@ -62532,9 +62637,9 @@
62532
62637
  */
62533
62638
  teacherStopLinkMic: function teacherStopLinkMic(mode) {
62534
62639
  var _this8 = this;
62535
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee46() {
62536
- return regenerator.wrap(function _callee46$(_context46) {
62537
- while (1) switch (_context46.prev = _context46.next) {
62640
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
62641
+ return regenerator.wrap(function _callee47$(_context47) {
62642
+ while (1) switch (_context47.prev = _context47.next) {
62538
62643
  case 0:
62539
62644
  defaultApi$1.writeLog("sdk action: teacherStopLinkMic, mode: ".concat(mode));
62540
62645
  try {
@@ -62545,22 +62650,22 @@
62545
62650
  });
62546
62651
  } catch (e) {}
62547
62652
  ;
62548
- _context46.next = 5;
62653
+ _context47.next = 5;
62549
62654
  return zbztAVSDK.teacherStopLinkMic(mode);
62550
62655
  case 5:
62551
62656
  if (!(mode === 0)) {
62552
- _context46.next = 8;
62657
+ _context47.next = 8;
62553
62658
  break;
62554
62659
  }
62555
- _context46.next = 8;
62660
+ _context47.next = 8;
62556
62661
  return zbztAVSDK.stopPreview();
62557
62662
  case 8:
62558
- return _context46.abrupt("return", _this8.stopPushFlow());
62663
+ return _context47.abrupt("return", _this8.stopPushFlow());
62559
62664
  case 9:
62560
62665
  case "end":
62561
- return _context46.stop();
62666
+ return _context47.stop();
62562
62667
  }
62563
- }, _callee46);
62668
+ }, _callee47);
62564
62669
  }))();
62565
62670
  },
62566
62671
  getSdkStatus: function getSdkStatus() {
@@ -62733,10 +62838,10 @@
62733
62838
  */
62734
62839
  startCaptureRecord: function startCaptureRecord() {
62735
62840
  var _arguments2 = arguments;
62736
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee47() {
62841
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48() {
62737
62842
  var fileType, fileName, idx, result;
62738
- return regenerator.wrap(function _callee47$(_context47) {
62739
- while (1) switch (_context47.prev = _context47.next) {
62843
+ return regenerator.wrap(function _callee48$(_context48) {
62844
+ while (1) switch (_context48.prev = _context48.next) {
62740
62845
  case 0:
62741
62846
  fileType = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : 2;
62742
62847
  fileName = _arguments2.length > 1 ? _arguments2[1] : undefined;
@@ -62751,19 +62856,19 @@
62751
62856
  if (idx !== 0 && idx !== 1 && idx !== 2) {
62752
62857
  idx = 2;
62753
62858
  }
62754
- _context47.next = 9;
62859
+ _context48.next = 9;
62755
62860
  return zbztAVSDK.startRecord(fileName, fileType, idx);
62756
62861
  case 9:
62757
- result = _context47.sent;
62758
- _context47.next = 12;
62862
+ result = _context48.sent;
62863
+ _context48.next = 12;
62759
62864
  return zbztAVSDK.startCapture(idx);
62760
62865
  case 12:
62761
- return _context47.abrupt("return", result);
62866
+ return _context48.abrupt("return", result);
62762
62867
  case 13:
62763
62868
  case "end":
62764
- return _context47.stop();
62869
+ return _context48.stop();
62765
62870
  }
62766
- }, _callee47);
62871
+ }, _callee48);
62767
62872
  }))();
62768
62873
  },
62769
62874
  /**
@@ -62773,21 +62878,21 @@
62773
62878
  */
62774
62879
  stopCaptureRecord: function stopCaptureRecord() {
62775
62880
  var _arguments3 = arguments;
62776
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee48() {
62881
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49() {
62777
62882
  var idx;
62778
- return regenerator.wrap(function _callee48$(_context48) {
62779
- while (1) switch (_context48.prev = _context48.next) {
62883
+ return regenerator.wrap(function _callee49$(_context49) {
62884
+ while (1) switch (_context49.prev = _context49.next) {
62780
62885
  case 0:
62781
62886
  idx = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : 2;
62782
- _context48.next = 3;
62887
+ _context49.next = 3;
62783
62888
  return zbztAVSDK.stopRecord(idx);
62784
62889
  case 3:
62785
- return _context48.abrupt("return", zbztAVSDK.stopCapture(idx));
62890
+ return _context49.abrupt("return", zbztAVSDK.stopCapture(idx));
62786
62891
  case 4:
62787
62892
  case "end":
62788
- return _context48.stop();
62893
+ return _context49.stop();
62789
62894
  }
62790
- }, _callee48);
62895
+ }, _callee49);
62791
62896
  }))();
62792
62897
  },
62793
62898
  /**
@@ -62809,10 +62914,10 @@
62809
62914
  // return code ;
62810
62915
  // },
62811
62916
  changeSdkType: function changeSdkType(institutionId, sdkName, teacherId, liveId) {
62812
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee49() {
62917
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50() {
62813
62918
  var code, param, res;
62814
- return regenerator.wrap(function _callee49$(_context49) {
62815
- while (1) switch (_context49.prev = _context49.next) {
62919
+ return regenerator.wrap(function _callee50$(_context50) {
62920
+ while (1) switch (_context50.prev = _context50.next) {
62816
62921
  case 0:
62817
62922
  defaultApi$1.writeLog("sdk action: changeSdkType, institutionId: ".concat(institutionId, ", sdkName: ").concat(sdkName, ", teacherId: ").concat(teacherId, ", liveId: ").concat(liveId));
62818
62923
  param = {
@@ -62821,18 +62926,18 @@
62821
62926
  lectureStreamId: "lecturer_".concat(teacherId, "_").concat(liveId),
62822
62927
  workCode: 0
62823
62928
  };
62824
- _context49.next = 4;
62929
+ _context50.next = 4;
62825
62930
  return changeSdkInRoom(param);
62826
62931
  case 4:
62827
- res = _context49.sent;
62932
+ res = _context50.sent;
62828
62933
  defaultApi$1.writeLog("sdk action: changeSdkType, sdk\u5207\u6362".concat(res.code == 0 ? '成功' : '失败', ", ").concat(JSON.stringify(res)));
62829
62934
  code = res.code == 0 ? 0 : 1; //0切换成功 ,1切换失败
62830
- return _context49.abrupt("return", code);
62935
+ return _context50.abrupt("return", code);
62831
62936
  case 8:
62832
62937
  case "end":
62833
- return _context49.stop();
62938
+ return _context50.stop();
62834
62939
  }
62835
- }, _callee49);
62940
+ }, _callee50);
62836
62941
  }))();
62837
62942
  },
62838
62943
  /**
@@ -62844,17 +62949,17 @@
62844
62949
  * @returns
62845
62950
  */
62846
62951
  startCDNRecord: function startCDNRecord(args) {
62847
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee50() {
62848
- return regenerator.wrap(function _callee50$(_context50) {
62849
- while (1) switch (_context50.prev = _context50.next) {
62952
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51() {
62953
+ return regenerator.wrap(function _callee51$(_context51) {
62954
+ while (1) switch (_context51.prev = _context51.next) {
62850
62955
  case 0:
62851
62956
  defaultApi$1.writeLog("sdk action: startCDNRecord, args: ".concat(JSON.stringify(args)));
62852
- return _context50.abrupt("return", zbztAVSDK.startCDNRecord(args));
62957
+ return _context51.abrupt("return", zbztAVSDK.startCDNRecord(args));
62853
62958
  case 2:
62854
62959
  case "end":
62855
- return _context50.stop();
62960
+ return _context51.stop();
62856
62961
  }
62857
- }, _callee50);
62962
+ }, _callee51);
62858
62963
  }))();
62859
62964
  },
62860
62965
  /**
@@ -62863,17 +62968,17 @@
62863
62968
  * @returns
62864
62969
  */
62865
62970
  stopCDNRecord: function stopCDNRecord(taskID) {
62866
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee51() {
62867
- return regenerator.wrap(function _callee51$(_context51) {
62868
- while (1) switch (_context51.prev = _context51.next) {
62971
+ return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee52() {
62972
+ return regenerator.wrap(function _callee52$(_context52) {
62973
+ while (1) switch (_context52.prev = _context52.next) {
62869
62974
  case 0:
62870
62975
  defaultApi$1.writeLog("sdk action: stopCDNRecord, taskID: ".concat(taskID));
62871
- return _context51.abrupt("return", zbztAVSDK.stopCDNRecord(taskID));
62976
+ return _context52.abrupt("return", zbztAVSDK.stopCDNRecord(taskID));
62872
62977
  case 2:
62873
62978
  case "end":
62874
- return _context51.stop();
62979
+ return _context52.stop();
62875
62980
  }
62876
- }, _callee51);
62981
+ }, _callee52);
62877
62982
  }))();
62878
62983
  }
62879
62984
  };