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