@ray-js/ray-ipc-utils 1.1.0 → 1.1.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/service/index.js +9 -6
- package/package.json +1 -1
package/lib/service/index.js
CHANGED
|
@@ -175,15 +175,16 @@ export const getCameraConfigInfo = async deviceId => {
|
|
|
175
175
|
// 获取支持的对讲方式
|
|
176
176
|
const supportedIntercomModes = rtcApiResult === null || rtcApiResult === void 0 || (_rtcApiResult$audioAt3 = rtcApiResult.audioAttributes) === null || _rtcApiResult$audioAt3 === void 0 ? void 0 : _rtcApiResult$audioAt3.callMode;
|
|
177
177
|
if (isIntercomSupported && supportedIntercomModes.length > 0) {
|
|
178
|
-
var _appIntercomCached$da;
|
|
179
178
|
intercomInfo.defaultIntercomMode = intercomCallMode[supportedIntercomModes[0]];
|
|
180
179
|
intercomInfo.supportedIntercomModes = supportedIntercomModes.map(mode => intercomCallMode[mode]);
|
|
181
180
|
// 获取APP当前存储的对讲模式, 因目前设置页对讲设置使用的还是原生页面,需要读取APP缓存保持一致
|
|
182
181
|
const appIntercomCached = await getCurrentSupportedTalkMode(deviceId);
|
|
183
182
|
if (appIntercomCached.code !== 0) {
|
|
184
|
-
|
|
183
|
+
intercomInfo.cachedIntercomMode = intercomCallMode[supportedIntercomModes[0]];
|
|
184
|
+
} else {
|
|
185
|
+
var _appIntercomCached$da;
|
|
186
|
+
intercomInfo.cachedIntercomMode = intercomCallMode[appIntercomCached === null || appIntercomCached === void 0 || (_appIntercomCached$da = appIntercomCached.data) === null || _appIntercomCached$da === void 0 ? void 0 : _appIntercomCached$da.talkbackMode];
|
|
185
187
|
}
|
|
186
|
-
intercomInfo.cachedIntercomMode = intercomCallMode[appIntercomCached === null || appIntercomCached === void 0 || (_appIntercomCached$da = appIntercomCached.data) === null || _appIntercomCached$da === void 0 ? void 0 : _appIntercomCached$da.talkbackMode];
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
// 3. 视频分辨率模块
|
|
@@ -219,15 +220,17 @@ export const getCameraConfigInfo = async deviceId => {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
} else {
|
|
222
|
-
var _intercomStorage$data2,
|
|
223
|
+
var _intercomStorage$data2, _resolutionStorage$da2, _microphoneStorage$da2, _maxZoomSettingsStora2;
|
|
223
224
|
// 对于对讲缓存的方式每次需从APP获取更新
|
|
224
225
|
const intercomStorageData = intercomStorage === null || intercomStorage === void 0 || (_intercomStorage$data2 = intercomStorage.data) === null || _intercomStorage$data2 === void 0 ? void 0 : _intercomStorage$data2.data;
|
|
225
226
|
intercomInfo = intercomStorageData;
|
|
226
227
|
const appIntercomCached = await getCurrentSupportedTalkMode(deviceId);
|
|
227
228
|
if (appIntercomCached.code !== 0) {
|
|
228
|
-
|
|
229
|
+
intercomInfo.cachedIntercomMode = intercomCallMode[supportedIntercomModes[0]];
|
|
230
|
+
} else {
|
|
231
|
+
var _appIntercomCached$da2;
|
|
232
|
+
intercomInfo.cachedIntercomMode = intercomCallMode[appIntercomCached === null || appIntercomCached === void 0 || (_appIntercomCached$da2 = appIntercomCached.data) === null || _appIntercomCached$da2 === void 0 ? void 0 : _appIntercomCached$da2.talkbackMode];
|
|
229
233
|
}
|
|
230
|
-
intercomInfo.cachedIntercomMode = intercomCallMode[appIntercomCached === null || appIntercomCached === void 0 || (_appIntercomCached$da2 = appIntercomCached.data) === null || _appIntercomCached$da2 === void 0 ? void 0 : _appIntercomCached$da2.talkbackMode];
|
|
231
234
|
if (intercomStorageData.cachedIntercomMode !== intercomInfo.cachedIntercomMode) {
|
|
232
235
|
setNativeStorage(`${deviceId}_intercom`, intercomInfo);
|
|
233
236
|
}
|