@ray-js/lock-sdk 1.2.1-beta.4 → 1.2.1-beta.6

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.
@@ -97,6 +97,7 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
97
97
  defaultMode: "VR",
98
98
  modes: [],
99
99
  coverMode: "VR",
100
+ options: {},
100
101
  },
101
102
  ai: {
102
103
  support: false,
@@ -165,6 +166,24 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
165
166
  deviceAdvanceAbilityCache.vr.modes?.[0]?.mode;
166
167
  }
167
168
  deviceAdvanceAbilityCache.vr.coverMode = data.photo_cover_format;
169
+ if (data.configs) {
170
+ let options;
171
+ try {
172
+ options = JSON.parse(data.configs);
173
+ }
174
+ catch (e) {
175
+ }
176
+ if (options.zoomIn) {
177
+ deviceAdvanceAbilityCache.vr.options.zoomIn =
178
+ Number(options.zoomIn?.value) > 0
179
+ ? Number(options.zoomIn?.value)
180
+ : undefined;
181
+ deviceAdvanceAbilityCache.vr.options.radialEmphasis =
182
+ Number(options.radialEmphasis?.value) > 0
183
+ ? Number(options.radialEmphasis?.value)
184
+ : undefined;
185
+ }
186
+ }
168
187
  }
169
188
  break;
170
189
  }
@@ -18,7 +18,7 @@ import { ipc, yuChannelSyncSingleSync } from "../../platform";
18
18
  import { sdkLog } from "../../utils/sdk-log";
19
19
  import { ProductCommunicationType, RotateType } from "../../constant";
20
20
  import { isHarmony } from "../../utils";
21
- import { getError } from "src/utils/errors";
21
+ import { getError } from "../../utils/errors";
22
22
  export const initState = async (runtime) => {
23
23
  const { devInfo: { dps, devId, yuNetState }, dpSchema, } = runtime.config;
24
24
  const startedAt = Date.now();
@@ -374,6 +374,10 @@ export interface DeviceAdvancedAbility {
374
374
  value: number;
375
375
  }>;
376
376
  defaultMode: VRModeType;
377
+ options: {
378
+ zoomIn?: number;
379
+ radialEmphasis?: number;
380
+ };
377
381
  };
378
382
  ai: {
379
383
  support: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.2.1-beta.4",
3
+ "version": "1.2.1-beta.6",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"