@ray-js/ray-ipc-utils 1.1.0-beta-12 → 1.1.0-beta-13
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/service/index.js +8 -4
- package/package.json +1 -1
package/lib/service/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const errStyle = 'background: red; color: #fff;';
|
|
|
11
11
|
|
|
12
12
|
// 获取 IPC 配置信息
|
|
13
13
|
const get_ipc_config_info_api = {
|
|
14
|
-
url: '
|
|
14
|
+
url: 'm.ipc.v4.rtc.config.get',
|
|
15
15
|
version: '1.0'
|
|
16
16
|
};
|
|
17
17
|
// 获取 IPC 收藏点信息
|
|
@@ -152,6 +152,10 @@ export const getCameraConfigInfo = async deviceId => {
|
|
|
152
152
|
if (rtcInfo.code === 0) {
|
|
153
153
|
var _rtcApiResult$audioAt, _rtcApiResult$audioAt2, _rtcApiResult$audioAt3;
|
|
154
154
|
const rtcApiResult = rtcInfo.data;
|
|
155
|
+
const {
|
|
156
|
+
p2pType
|
|
157
|
+
} = rtcApiResult;
|
|
158
|
+
const p2p4 = p2pType >= 8;
|
|
155
159
|
// 1. 拾音器模块
|
|
156
160
|
const isMicrophoneSupported = rtcApiResult === null || rtcApiResult === void 0 || (_rtcApiResult$audioAt = rtcApiResult.audioAttributes) === null || _rtcApiResult$audioAt === void 0 || (_rtcApiResult$audioAt = _rtcApiResult$audioAt.hardwareCapability) === null || _rtcApiResult$audioAt === void 0 ? void 0 : _rtcApiResult$audioAt.includes(1);
|
|
157
161
|
// 拾音器默认声音都为关闭, 若接口返回不支持,则将缓存值设置为关闭
|
|
@@ -177,9 +181,8 @@ export const getCameraConfigInfo = async deviceId => {
|
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
// 3. 视频分辨率模块
|
|
180
|
-
videoResolution.defaultResolution = videoResolutionMode[rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.vedioClarity];
|
|
181
|
-
|
|
182
|
-
const supportedVideoClarity = rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.vedioClaritys;
|
|
184
|
+
videoResolution.defaultResolution = p2p4 ? videoResolutionMode[rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.videoClarity] : videoResolutionMode[rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.vedioClarity];
|
|
185
|
+
const supportedVideoClarity = p2p4 ? rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.videoClaritys : rtcApiResult === null || rtcApiResult === void 0 ? void 0 : rtcApiResult.vedioClaritys;
|
|
183
186
|
videoResolution.availableResolutions = supportedVideoClarity.map(mode => videoResolutionMode[mode]);
|
|
184
187
|
|
|
185
188
|
// 4. 最大倍数模块
|
|
@@ -226,6 +229,7 @@ export const getCameraConfigInfo = async deviceId => {
|
|
|
226
229
|
microphoneSettings = microphoneStorage === null || microphoneStorage === void 0 || (_microphoneStorage$da2 = microphoneStorage.data) === null || _microphoneStorage$da2 === void 0 ? void 0 : _microphoneStorage$da2.data;
|
|
227
230
|
maxZoomSettings = maxZoomSettingsStorage === null || maxZoomSettingsStorage === void 0 || (_maxZoomSettingsStora2 = maxZoomSettingsStorage.data) === null || _maxZoomSettingsStora2 === void 0 ? void 0 : _maxZoomSettingsStora2.data;
|
|
228
231
|
}
|
|
232
|
+
console.log(videoResolution, intercomInfo, microphoneSettings, maxZoomSettings, '_____');
|
|
229
233
|
const ipcConfig = {
|
|
230
234
|
videoResolution,
|
|
231
235
|
intercomInfo,
|