agora-rte-sdk 3.8.0-alpha → 3.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.
|
@@ -1164,7 +1164,7 @@ var AgoraRtcClientImpl = exports.AgoraRtcClientImpl = /*#__PURE__*/function (_Ag
|
|
|
1164
1164
|
newDevice = audioPlaybackDevices.find(function (device) {
|
|
1165
1165
|
return _this4._isValidDevice(device) && device.deviceId === deviceId;
|
|
1166
1166
|
});
|
|
1167
|
-
deviceInfoString = "".concat(newDevice === null || newDevice === void 0 ? void 0 : newDevice.deviceName, "
|
|
1167
|
+
deviceInfoString = "deviceName\uFF1A".concat(newDevice === null || newDevice === void 0 ? void 0 : newDevice.deviceName, " deviceId: ").concat(newDevice === null || newDevice === void 0 ? void 0 : newDevice.deviceId, ", vendorId: ").concat(newDevice === null || newDevice === void 0 ? void 0 : newDevice.vendorId, ", productId: ").concat(newDevice === null || newDevice === void 0 ? void 0 : newDevice.productId);
|
|
1168
1168
|
this.logger.info("[RtcClient] PlaybackDevices deviceInfoString: ".concat(deviceInfoString));
|
|
1169
1169
|
if (!(newDevice && newDevice.deviceId && newDevice.deviceName)) {
|
|
1170
1170
|
_context5.next = 2;
|
|
@@ -1082,7 +1082,7 @@ var AgoraRtcSourceManagerImpl = exports.AgoraRtcSourceManagerImpl = /*#__PURE__*
|
|
|
1082
1082
|
productId: device.productId
|
|
1083
1083
|
};
|
|
1084
1084
|
newMicList.set(device.deviceId, deviceInfo);
|
|
1085
|
-
var deviceInfoString = "".concat(deviceInfo.deviceName, "
|
|
1085
|
+
var deviceInfoString = "deviceName\uFF1A".concat(deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.deviceName, " deviceId: ").concat(deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.deviceId, ", vendorId: ").concat(deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.vendorId, ", productId: ").concat(deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.productId);
|
|
1086
1086
|
_this1.logger.info("[RtcClient] RecordingDevices deviceInfoString: ".concat(deviceInfoString));
|
|
1087
1087
|
}
|
|
1088
1088
|
});
|
|
@@ -31,7 +31,7 @@ export declare const convertCameraSourceTypeToPublishConfig: (sourceType: VideoS
|
|
|
31
31
|
/**
|
|
32
32
|
* 摄像头视频源类型列表
|
|
33
33
|
*/
|
|
34
|
-
export declare const cameraVideoSourceTypes: readonly [
|
|
34
|
+
export declare const cameraVideoSourceTypes: readonly [0, 1, 11, 12];
|
|
35
35
|
/**
|
|
36
36
|
* 比较两个设备信息 Map,返回新增和移除的设备列表
|
|
37
37
|
* @param oldMap - 旧设备信息 Map
|
|
@@ -347,7 +347,30 @@ var startVideoRender = exports.startVideoRender = function startVideoRender(_ref
|
|
|
347
347
|
}
|
|
348
348
|
return rtcEngine.setRemoteRenderModeEx(Number(sourceId), renderModeType, mirrorModeType, connection);
|
|
349
349
|
} else {
|
|
350
|
-
|
|
350
|
+
// 使用此API会更新所有本地视图,谨慎使用
|
|
351
|
+
// return rtcEngine.setLocalRenderMode(
|
|
352
|
+
// renderModeType,
|
|
353
|
+
// 2 satisfies VideoMirrorModeType.VideoMirrorModeDisabled,
|
|
354
|
+
// );
|
|
355
|
+
|
|
356
|
+
var vst;
|
|
357
|
+
if (sourceType === _type.AgoraRtcRenderSourceType.LOCAL_SCREEN) {
|
|
358
|
+
vst = 2;
|
|
359
|
+
} else {
|
|
360
|
+
var sourceIndex = sourceManager.getCameraSourceIndex(sourceId);
|
|
361
|
+
if (sourceIndex === -1) {
|
|
362
|
+
logger.warn("Invalid source index for sourceId: ".concat(sourceId));
|
|
363
|
+
return _constant.AgoraRtcErrorCode.SOURCE_INDEX_IS_NOT_VALID;
|
|
364
|
+
}
|
|
365
|
+
vst = convertSourceIndexToSourceType(sourceIndex);
|
|
366
|
+
}
|
|
367
|
+
return rtcEngine.setupLocalVideo({
|
|
368
|
+
view: placementRef,
|
|
369
|
+
setupMode: 0,
|
|
370
|
+
sourceType: vst,
|
|
371
|
+
renderMode: renderModeType,
|
|
372
|
+
mirrorMode: mirrorModeType
|
|
373
|
+
});
|
|
351
374
|
}
|
|
352
375
|
}
|
|
353
376
|
case _type.AgoraRtcRenderResultType.ADD:
|
|
@@ -365,6 +388,7 @@ var startVideoRender = exports.startVideoRender = function startVideoRender(_ref
|
|
|
365
388
|
return _constant.AgoraRtcErrorCode.PLACEMENT_IS_NOT_RENDERED;
|
|
366
389
|
}
|
|
367
390
|
canvasTagPool.ifNeedStopRenderCanvas(view);
|
|
391
|
+
// 创建新的 placementRef 之前的 placementRef不需要先删除吗?
|
|
368
392
|
placementRef = createVideoRendererPlacement(view);
|
|
369
393
|
canvas = createCanvasAndAddTag(view, sourceId, placementRef, renderMode, isMirror, sourceType, canvasTagPool, connection);
|
|
370
394
|
return addRenderer();
|
|
@@ -105,7 +105,7 @@ var AgoraRtcWebAdapterImp = exports.AgoraRtcWebAdapterImp = /*#__PURE__*/functio
|
|
|
105
105
|
(0, _classCallCheck2["default"])(this, AgoraRtcWebAdapterImp);
|
|
106
106
|
_this = _callSuper(this, AgoraRtcWebAdapterImp);
|
|
107
107
|
(0, _defineProperty2["default"])(_this, "logger", (_initProto(_this), (0, _logger.createLogger)({
|
|
108
|
-
prefix: '
|
|
108
|
+
prefix: 'AgoraRtcWebAdapterImpl'
|
|
109
109
|
})));
|
|
110
110
|
// @internal
|
|
111
111
|
(0, _defineProperty2["default"])(_this, "_cameraViewCanvasMap", new Map());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-rte-sdk",
|
|
3
|
-
"version": "3.8.0
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "SDK for building interactive scenarios",
|
|
5
5
|
"author": "agora.io",
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/sinon": "^17.0.2",
|
|
29
29
|
"@types/ua-parser-js": "^0.7.35",
|
|
30
30
|
"agora-token": "^2.0.3",
|
|
31
|
-
"agora-toolchain": "3.8.0
|
|
31
|
+
"agora-toolchain": "3.8.0",
|
|
32
32
|
"core-js": "^3.33.3",
|
|
33
33
|
"electron": "22.3.27",
|
|
34
34
|
"husky": "^9.0.11",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"agora-extension-ai-denoiser": "^1.0.0",
|
|
44
44
|
"agora-extension-beauty-effect": "^1.0.1-beta",
|
|
45
45
|
"agora-extension-virtual-background": "^2.1.0",
|
|
46
|
-
"agora-foundation": "3.8.0
|
|
46
|
+
"agora-foundation": "3.8.0",
|
|
47
47
|
"agora-rtc-sdk-ng": "4.23.3",
|
|
48
48
|
"agora-rtm": "2.2.2-3",
|
|
49
49
|
"await-to-js": "^3.0.0",
|