@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.
@@ -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: 'tuya.m.rtc.config.get',
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
- console.log(rtcApiResult, 'rtcApiResult');
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-utils",
3
- "version": "1.1.0-beta-12",
3
+ "version": "1.1.0-beta-13",
4
4
  "description": "IPC 工具库",
5
5
  "main": "lib/index",
6
6
  "files": [