fcr-core 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/room-control/ability-control/index.js +1 -1
- package/lib/room-control/index.js +1 -1
- package/lib/room-control/interpreter-control/index.js +11 -3
- package/lib/room-control/stream-control/index.js +53 -8
- package/lib/service/api.d.ts +26 -0
- package/lib/service/api.js +41 -0
- package/package.json +4 -4
|
@@ -66,4 +66,4 @@ class FcrAbilityControlImpl {
|
|
|
66
66
|
}
|
|
67
67
|
exports.FcrAbilityControlImpl = FcrAbilityControlImpl;
|
|
68
68
|
_FcrAbilityControlImpl = FcrAbilityControlImpl;
|
|
69
|
-
[_initProto] = _applyDecs(_FcrAbilityControlImpl, [[_imports.trace, 2, "
|
|
69
|
+
[_initProto] = _applyDecs(_FcrAbilityControlImpl, [[_imports.trace, 2, "isPlatformAbilitySupported"]], []).e;
|
|
@@ -565,6 +565,6 @@ class FcrBaseRoomControlImpl {
|
|
|
565
565
|
*/
|
|
566
566
|
exports.FcrBaseRoomControlImpl = FcrBaseRoomControlImpl;
|
|
567
567
|
_FcrBaseRoomControlImpl = FcrBaseRoomControlImpl;
|
|
568
|
-
[_initProto] = _applyDecs(_FcrBaseRoomControlImpl, [[_imports.trace, 2, "getSyncTimestamp"], [_imports.trace, 2, "getRoomInfo"], [_imports.trace, 2, "getRoomSchedule"], [_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_imports.trace, 2, "start"], [_imports.trace, 2, "end"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getRoomState"], [_imports.trace, 2, "getRoomProperties"], [_imports.trace, 2, "getRoomPropertiesByKeyPath"], [_imports.trace, 2, "updateRoomProperties"], [_imports.trace, 2, "updateIncrementRoomProperties"], [_imports.trace, 2, "deleteRoomProperties"], [_imports.trace, 2, "startCloudRecording"], [_imports.trace, 2, "pauseCloudRecording"], [_imports.trace, 2, "resumeCloudRecording"], [_imports.trace, 2, "stopCloudRecording"], [_imports.trace, 2, "getLiveStreamingState"], [_imports.trace, 2, "getLiveStreamingConfig"], [_imports.trace, 2, "startLiveStreaming"], [_imports.trace, 2, "updateLiveStreamingLayout"], [_imports.trace, 2, "stopLiveStreaming"], [_imports.trace, 2, "getCloudRecordingState"], [_imports.trace, 2, "sendRoomMessage"]
|
|
568
|
+
[_initProto] = _applyDecs(_FcrBaseRoomControlImpl, [[_imports.trace, 2, "getSyncTimestamp"], [_imports.trace, 2, "getRoomInfo"], [_imports.trace, 2, "getRoomSchedule"], [_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_imports.trace, 2, "start"], [_imports.trace, 2, "end"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getRoomState"], [_imports.trace, 2, "getRoomProperties"], [_imports.trace, 2, "getRoomPropertiesByKeyPath"], [_imports.trace, 2, "updateRoomProperties"], [_imports.trace, 2, "updateIncrementRoomProperties"], [_imports.trace, 2, "deleteRoomProperties"], [_imports.trace, 2, "startCloudRecording"], [_imports.trace, 2, "pauseCloudRecording"], [_imports.trace, 2, "resumeCloudRecording"], [_imports.trace, 2, "stopCloudRecording"], [_imports.trace, 2, "getLiveStreamingState"], [_imports.trace, 2, "getLiveStreamingConfig"], [_imports.trace, 2, "startLiveStreaming"], [_imports.trace, 2, "updateLiveStreamingLayout"], [_imports.trace, 2, "stopLiveStreaming"], [_imports.trace, 2, "getCloudRecordingState"], [_imports.trace, 2, "sendRoomMessage"]], []).e;
|
|
569
569
|
class FcrSubRoomControlImpl extends FcrBaseRoomControlImpl {}
|
|
570
570
|
exports.FcrSubRoomControlImpl = FcrSubRoomControlImpl;
|
|
@@ -54,6 +54,7 @@ class FcrInterpreterControlImpl {
|
|
|
54
54
|
prefix: 'FcrInterpreterControlImpl'
|
|
55
55
|
})));
|
|
56
56
|
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
57
|
+
(0, _defineProperty2.default)(this, "_interpreterUserList", null);
|
|
57
58
|
this._api = _api;
|
|
58
59
|
this._scene = _scene;
|
|
59
60
|
this._config = _config;
|
|
@@ -63,6 +64,7 @@ class FcrInterpreterControlImpl {
|
|
|
63
64
|
this._roomCache = _sharedCache.getRoomCache(this._scene.sceneId);
|
|
64
65
|
this._roomId = this._scene.sceneId;
|
|
65
66
|
this._addInterpreterObservers();
|
|
67
|
+
this._setInterpreterUserList();
|
|
66
68
|
}
|
|
67
69
|
createRoomControl(roomId) {
|
|
68
70
|
return new _room.FcrInterpreterRoomControlImpl(this._engine, this._engine.createScene({
|
|
@@ -111,7 +113,7 @@ class FcrInterpreterControlImpl {
|
|
|
111
113
|
};
|
|
112
114
|
}) : null;
|
|
113
115
|
}
|
|
114
|
-
|
|
116
|
+
_setInterpreterUserList() {
|
|
115
117
|
const interpreter = this._scene.getScenePropertiesByKeyPath('interpreter');
|
|
116
118
|
const {
|
|
117
119
|
translates
|
|
@@ -131,7 +133,10 @@ class FcrInterpreterControlImpl {
|
|
|
131
133
|
targetLanguage
|
|
132
134
|
};
|
|
133
135
|
});
|
|
134
|
-
|
|
136
|
+
this._interpreterUserList = results.length > 0 ? results : null;
|
|
137
|
+
}
|
|
138
|
+
getInterpreterUserList() {
|
|
139
|
+
return this._interpreterUserList;
|
|
135
140
|
}
|
|
136
141
|
getInterpreterLanguageList() {
|
|
137
142
|
const languages = this._scene.getScenePropertiesByKeyPath('interpreter.languages');
|
|
@@ -157,6 +162,9 @@ class FcrInterpreterControlImpl {
|
|
|
157
162
|
const isUpdated = [
|
|
158
163
|
// FcrInterpreterActionType.OPEN,
|
|
159
164
|
_types.FcrInterpreterActionType.UPDATE].includes(actionType);
|
|
165
|
+
if (isStateUpdated || isUpdated) {
|
|
166
|
+
this._setInterpreterUserList();
|
|
167
|
+
}
|
|
160
168
|
if (isStateUpdated) {
|
|
161
169
|
this._observable.notifyObservers('onInterpreterStateUpdated', this._roomId, this.getState(), operatorUser);
|
|
162
170
|
}
|
|
@@ -177,4 +185,4 @@ class FcrInterpreterControlImpl {
|
|
|
177
185
|
}
|
|
178
186
|
exports.FcrInterpreterControlImpl = FcrInterpreterControlImpl;
|
|
179
187
|
_FcrInterpreterControlImpl = FcrInterpreterControlImpl;
|
|
180
|
-
[_initProto] = _applyDecs(_FcrInterpreterControlImpl, [[_createRoomControlDecs, 2, "createRoomControl"], [_setInterpreterUsersDecs, 2, "setInterpreterUsers"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getState"], [_imports.trace, 2, "getInterpreterRoomList"], [_imports.trace, 2, "
|
|
188
|
+
[_initProto] = _applyDecs(_FcrInterpreterControlImpl, [[_createRoomControlDecs, 2, "createRoomControl"], [_setInterpreterUsersDecs, 2, "setInterpreterUsers"], [_imports.trace, 2, "close"], [_imports.trace, 2, "getState"], [_imports.trace, 2, "getInterpreterRoomList"], [_imports.trace, 2, "getInterpreterLanguageList"]], []).e;
|
|
@@ -43,6 +43,7 @@ var _error = require("../../utilities/error");
|
|
|
43
43
|
var _logger = require("../../utilities/logger");
|
|
44
44
|
var _validateParams = _interopRequireDefault(require("../../utilities/validate-params"));
|
|
45
45
|
var _schema = require("../../schema");
|
|
46
|
+
var _type2 = require("agora-rte-sdk/lib/core/scene/type");
|
|
46
47
|
var _FcrStreamControlImpl;
|
|
47
48
|
let _initProto, _addLocalStreamsDecs, _bindLocalStreamsDecs, _updatePublishPrivilegeOfStreamsDecs, _removeStreamsDecs, _setVideoEncoderConfigDecs, _startRenderRemoteVideoStreamDecs, _stopRenderRemoteVideoStreamDecs, _startPlayRemoteAudioStreamDecs, _stopPlayRemoteAudioStreamDecs, _takeSnapshotDecs, _addLocalScreenStreamDecs, _adjustRemoteAudioStreamVolumeDecs, _mergeAudioStreamDecs, _splitAudioStreamDecs, _ref;
|
|
48
49
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -52,10 +53,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
52
53
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
53
54
|
function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
54
55
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
|
|
55
|
-
_ref = (_addLocalStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrLocalStreamCreateArrayConfigSchema)], _bindLocalStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrStreamBindConfigArrySchema)], _updatePublishPrivilegeOfStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrUpdateStreamCustomSchema, _schema.fcrUpdateStreamPrivilegeScopeSchema.optional())], _removeStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringArraySchema)], _setVideoEncoderConfigDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.agoraRtcVideoEncoderConfigurationSchema, _schema.fcrVideoStreamTypeSchema)], _startRenderRemoteVideoStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.fcrVideoStreamTypeSchema, _schema.fcrRenderConfigSchema, (0, _schema.createUnionSchema)([_schema.fcrRenderViewSchema, _imports.objectSchema]))], _stopRenderRemoteVideoStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.fcrRenderViewSchema)], _startPlayRemoteAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _stopPlayRemoteAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _takeSnapshotDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.stringSchema)], _addLocalScreenStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrScreenStreamCreateConfigSchema)], _adjustRemoteAudioStreamVolumeDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.numberSchema)], _mergeAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _splitAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], "logger");
|
|
56
56
|
/**
|
|
57
57
|
* @internal
|
|
58
58
|
*/
|
|
59
|
+
_ref = (_addLocalStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrLocalStreamCreateArrayConfigSchema)], _bindLocalStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrStreamBindConfigArrySchema)], _updatePublishPrivilegeOfStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrUpdateStreamCustomSchema, _schema.fcrUpdateStreamPrivilegeScopeSchema.optional())], _removeStreamsDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringArraySchema)], _setVideoEncoderConfigDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.agoraRtcVideoEncoderConfigurationSchema, _schema.fcrVideoStreamTypeSchema)], _startRenderRemoteVideoStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.fcrVideoStreamTypeSchema, _schema.fcrRenderConfigSchema, (0, _schema.createUnionSchema)([_schema.fcrRenderViewSchema, _imports.objectSchema]))], _stopRenderRemoteVideoStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.fcrRenderViewSchema)], _startPlayRemoteAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _stopPlayRemoteAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _takeSnapshotDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.stringSchema)], _addLocalScreenStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.fcrScreenStreamCreateConfigSchema)], _adjustRemoteAudioStreamVolumeDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.numberSchema)], _mergeAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _splitAudioStreamDecs = [_imports.bound, _imports.trace, (0, _validateParams.default)(_schema.stringSchema)], "logger");
|
|
59
60
|
class FcrStreamControlImpl {
|
|
60
61
|
constructor(_engine, _scene, _api, _sharedCache) {
|
|
61
62
|
//@internal
|
|
@@ -160,6 +161,9 @@ class FcrStreamControlImpl {
|
|
|
160
161
|
connectorType: info.connectorType
|
|
161
162
|
};
|
|
162
163
|
});
|
|
164
|
+
(0, _defineProperty2.default)(this, "_getPublishStateByPrivilege", privilege => {
|
|
165
|
+
return privilege === _type2.AgoraRteStreamPrivilegeOperation.HAS_PRIVILEGE ? 1 : privilege === _type2.AgoraRteStreamPrivilegeOperation.NOPRIVILEGE ? 0 : undefined;
|
|
166
|
+
});
|
|
163
167
|
(0, _defineProperty2.default)(this, "_convertStreamEvent", event => {
|
|
164
168
|
return {
|
|
165
169
|
modifiedStream: this._convertStreamInfo(event.modifiedStream),
|
|
@@ -231,28 +235,69 @@ class FcrStreamControlImpl {
|
|
|
231
235
|
}
|
|
232
236
|
}
|
|
233
237
|
addLocalStreams(streams) {
|
|
234
|
-
return (0, _error.handleRequestError)(() => this.
|
|
238
|
+
return (0, _error.handleRequestError)(() => this._api.upsertStreamBatch(this._scene.sceneId, streams.map(config => {
|
|
239
|
+
var _config$generateToken;
|
|
240
|
+
return _objectSpread({
|
|
241
|
+
streamName: config.streamName,
|
|
242
|
+
streamUuid: '0',
|
|
243
|
+
// means that this stream needs to be created
|
|
244
|
+
generateToken: (_config$generateToken = config.generateToken) !== null && _config$generateToken !== void 0 ? _config$generateToken : config.videoSourceType === _imports.AgoraRteVideoSourceType.SCREEN,
|
|
245
|
+
userUuid: config.ownerId,
|
|
246
|
+
videoSourceType: config.videoSourceType,
|
|
247
|
+
audioSourceType: config.audioSourceType,
|
|
248
|
+
videoSourceUuid: config.videoSourceId,
|
|
249
|
+
audioSourceUuid: config.audioSourceId
|
|
250
|
+
}, (0, _imports.convertStreamTypeToPublishState)(config.streamType));
|
|
251
|
+
})), _error.FcrErrorModuleCode.ROOM_STREAM, 'add local streams failed');
|
|
235
252
|
}
|
|
236
253
|
bindLocalStreams(streams) {
|
|
237
|
-
return (0, _error.handleRequestError)(() => this.
|
|
254
|
+
return (0, _error.handleRequestError)(() => this._api.upsertStreamBatch(this._scene.sceneId, streams.map(config => ({
|
|
255
|
+
streamUuid: config.streamId,
|
|
256
|
+
videoSourceUuid: config.videoSourceId,
|
|
257
|
+
audioSourceUuid: config.audioSourceId
|
|
258
|
+
}))), _error.FcrErrorModuleCode.ROOM_STREAM, 'bind local streams failed');
|
|
238
259
|
}
|
|
239
260
|
updatePublishPrivilegeOfStreams() {
|
|
240
261
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
241
262
|
args[_key] = arguments[_key];
|
|
242
263
|
}
|
|
243
264
|
if (args.length === 1) {
|
|
244
|
-
|
|
265
|
+
const privileges = args[0];
|
|
266
|
+
return (0, _error.handleRequestError)(() => this._api.upsertStreamBatch(this._scene.sceneId, Object.keys(privileges).map(streamId => ({
|
|
267
|
+
streamUuid: streamId,
|
|
268
|
+
audioState: this._getPublishStateByPrivilege(privileges[streamId].audioPrivilege),
|
|
269
|
+
videoState: this._getPublishStateByPrivilege(privileges[streamId].videoPrivilege)
|
|
270
|
+
}))), _error.FcrErrorModuleCode.ROOM_STREAM, 'update publish privilege of streams failed');
|
|
245
271
|
} else if (args.length === 2) {
|
|
246
272
|
const [privilege, scope] = args;
|
|
247
273
|
const targetRteRoles = scope.targetRoleType.map(role => _type.FcrUserRoleToStringMap[role]);
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
274
|
+
const includeRoles = [];
|
|
275
|
+
const excludeRoles = [];
|
|
276
|
+
const condition = {
|
|
277
|
+
videoSourceType: scope.videoSourceType,
|
|
278
|
+
audioSourceType: scope.audioSourceType
|
|
279
|
+
};
|
|
280
|
+
if (scope.targetRoleTypeIsInclude) {
|
|
281
|
+
includeRoles.push(...targetRteRoles);
|
|
282
|
+
} else {
|
|
283
|
+
excludeRoles.push(...targetRteRoles);
|
|
284
|
+
}
|
|
285
|
+
const audioState = this._getPublishStateByPrivilege(privilege.audioPrivilege);
|
|
286
|
+
const videoState = this._getPublishStateByPrivilege(privilege.videoPrivilege);
|
|
287
|
+
return (0, _error.handleRequestError)(() => this._api.updateStreamBatchByCondition({
|
|
288
|
+
roomUuid: this._scene.sceneId,
|
|
289
|
+
includeRoles,
|
|
290
|
+
excludeRoles,
|
|
291
|
+
videoState,
|
|
292
|
+
audioState,
|
|
293
|
+
condition
|
|
251
294
|
}), _error.FcrErrorModuleCode.ROOM_STREAM, 'update publish privilege of streams failed');
|
|
252
295
|
}
|
|
253
296
|
}
|
|
254
297
|
removeStreams(streams) {
|
|
255
|
-
return (0, _error.handleRequestError)(() => this.
|
|
298
|
+
return (0, _error.handleRequestError)(() => this._api.deleteStreamBatch(this._scene.sceneId, streams.map(streamUuid => ({
|
|
299
|
+
streamUuid
|
|
300
|
+
}))), _error.FcrErrorModuleCode.ROOM_STREAM, 'remove streams failed');
|
|
256
301
|
}
|
|
257
302
|
setVideoEncoderConfig(streamId, config, streamType) {
|
|
258
303
|
return this._scene.localUser.setVideoEncoderConfig(config, streamType, streamId);
|
package/lib/service/api.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { FcrCheckInParams, FcrChatRoomTokenResData } from './type';
|
|
|
5
5
|
import { FcrBoardRegion, FcrSharePermissionState } from '../room-control/whiteboard-control/enums';
|
|
6
6
|
import { FcrPrivilegeUserRole, FcrSecuritySendChatPayload } from '../room-control/privilege-control/type';
|
|
7
7
|
import { FcrUserKickedOutType } from '../room-control/user-control/type';
|
|
8
|
+
import { AgoraRteAudioSourceType, AgoraRteMediaPublishState, AgoraRteVideoSourceType } from 'agora-rte-sdk/lib/type';
|
|
8
9
|
export declare class FcrCoreServiceApi {
|
|
9
10
|
private _client;
|
|
10
11
|
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
@@ -347,4 +348,29 @@ export declare class FcrCoreServiceApi {
|
|
|
347
348
|
closeInterpreter(params: {
|
|
348
349
|
roomId: string;
|
|
349
350
|
}): Promise<any>;
|
|
351
|
+
upsertStreamBatch(roomUuid: string, streams: {
|
|
352
|
+
streamName?: string;
|
|
353
|
+
userUuid?: string;
|
|
354
|
+
streamUuid?: string;
|
|
355
|
+
videoState?: AgoraRteMediaPublishState;
|
|
356
|
+
audioState?: AgoraRteMediaPublishState;
|
|
357
|
+
videoSourceType?: AgoraRteVideoSourceType;
|
|
358
|
+
audioSourceType?: AgoraRteAudioSourceType;
|
|
359
|
+
videoSourceUuid?: string;
|
|
360
|
+
audioSourceUuid?: string;
|
|
361
|
+
}[]): Promise<any>;
|
|
362
|
+
updateStreamBatchByCondition({ roomUuid, videoState, audioState, includeRoles, excludeRoles, condition, }: {
|
|
363
|
+
roomUuid: string;
|
|
364
|
+
videoState?: number;
|
|
365
|
+
audioState?: number;
|
|
366
|
+
includeRoles?: string[];
|
|
367
|
+
excludeRoles?: string[];
|
|
368
|
+
condition?: {
|
|
369
|
+
videoSourceType?: number;
|
|
370
|
+
audioSourceType?: number;
|
|
371
|
+
};
|
|
372
|
+
}): Promise<any>;
|
|
373
|
+
deleteStreamBatch(roomUuid: string, streams: {
|
|
374
|
+
streamUuid: string;
|
|
375
|
+
}[]): Promise<any>;
|
|
350
376
|
}
|
package/lib/service/api.js
CHANGED
|
@@ -960,5 +960,46 @@ class FcrCoreServiceApi {
|
|
|
960
960
|
});
|
|
961
961
|
return res;
|
|
962
962
|
}
|
|
963
|
+
async upsertStreamBatch(roomUuid, streams) {
|
|
964
|
+
return await this._client.fetch({
|
|
965
|
+
path: "/v1/rooms/".concat(roomUuid, "/streams"),
|
|
966
|
+
method: 'PUT',
|
|
967
|
+
data: {
|
|
968
|
+
streams
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
async updateStreamBatchByCondition(_ref21) {
|
|
973
|
+
let {
|
|
974
|
+
roomUuid,
|
|
975
|
+
videoState,
|
|
976
|
+
audioState,
|
|
977
|
+
includeRoles,
|
|
978
|
+
excludeRoles,
|
|
979
|
+
condition
|
|
980
|
+
} = _ref21;
|
|
981
|
+
return await this._client.fetch({
|
|
982
|
+
path: "/v1/rooms/".concat(roomUuid, "/conditions/streams"),
|
|
983
|
+
method: 'PUT',
|
|
984
|
+
data: {
|
|
985
|
+
includeRoles,
|
|
986
|
+
excludeRoles,
|
|
987
|
+
stream: {
|
|
988
|
+
videoState,
|
|
989
|
+
audioState
|
|
990
|
+
},
|
|
991
|
+
condition
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
async deleteStreamBatch(roomUuid, streams) {
|
|
996
|
+
return await this._client.fetch({
|
|
997
|
+
path: "/v1/rooms/".concat(roomUuid, "/streams"),
|
|
998
|
+
method: 'DELETE',
|
|
999
|
+
data: {
|
|
1000
|
+
streams
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
963
1004
|
}
|
|
964
1005
|
exports.FcrCoreServiceApi = FcrCoreServiceApi;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fcr-core",
|
|
3
3
|
"description": "Core APIs for building online scenes",
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.1",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/lodash": "^4.14.168",
|
|
41
41
|
"@types/sinon": "^17.0.2",
|
|
42
42
|
"@types/uuid": "^8.3.0",
|
|
43
|
-
"agora-toolchain": "
|
|
43
|
+
"agora-toolchain": "~3.6.1",
|
|
44
44
|
"core-js": "^3.33.3",
|
|
45
45
|
"decomment": "^0.9.5",
|
|
46
46
|
"husky": "^9.0.11",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@netless/video-js-plugin": "^0.3.8",
|
|
61
61
|
"@netless/white-snapshot": "^0.4.2",
|
|
62
62
|
"@netless/window-manager": "^0.4.72",
|
|
63
|
-
"agora-foundation": "
|
|
64
|
-
"agora-rte-sdk": "
|
|
63
|
+
"agora-foundation": "~3.6.1",
|
|
64
|
+
"agora-rte-sdk": "~3.6.1",
|
|
65
65
|
"await-to-js": "^3.0.0",
|
|
66
66
|
"dayjs": "^1.10.4",
|
|
67
67
|
"easemob-websdk": "4.8.1",
|