@ray-js/ipc-player-integration 0.0.52-beta.4 → 0.0.52-beta.5

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.
@@ -47,10 +47,11 @@ export async function getCaptureResultSummary(result, fallbackCount, devId) {
47
47
  };
48
48
  }
49
49
  const legacySplitCount = fallbackCount && fallbackCount > 1 ? fallbackCount : 0;
50
- const multiLensAbilityCount = legacySplitCount ? 0 : await getMultiLensCountFromAbility(devId);
50
+ const multiLensAbilityCount = await getMultiLensCountFromAbility(devId);
51
51
 
52
- // Preserve the legacy split protocol as a count fallback without applying the
53
- // new multi-lens file-name convention to it.
52
+ // The native multi-lens snapshot can return one object while writing lens-specific
53
+ // files. Use the ability result to distinguish that file-name convention from the
54
+ // legacy split protocol.
54
55
  const multiCount = legacySplitCount || multiLensAbilityCount;
55
56
  if (multiCount > 1) {
56
57
  return {
@@ -30,15 +30,15 @@ describe('getCaptureResultSummary', () => {
30
30
  thumbnailPath: 'thingfile://tmp/capture_123_lens1.jpg'
31
31
  });
32
32
  });
33
- it('does not apply the new file-name convention to the legacy split protocol', async () => {
33
+ it('keeps the legacy path when the ability is unavailable', async () => {
34
34
  await expect(getCaptureResultSummary(createCaptureResult(basePath), 4, 'dev-1')).resolves.toEqual({
35
35
  count: 4,
36
36
  isMultiLens: true,
37
37
  thumbnailPath: basePath
38
38
  });
39
- expect(mockGetDeviceInfo).not.toHaveBeenCalled();
39
+ expect(mockGetDeviceInfo).toHaveBeenCalledWith('dev-1');
40
40
  });
41
- it('keeps the legacy path when both multi-lens sources are present', async () => {
41
+ it('uses the lens path when both multi-lens sources are present', async () => {
42
42
  mockGetDeviceInfo.mockResolvedValue({
43
43
  configMetas: {
44
44
  tyabimr4v3: {
@@ -49,7 +49,7 @@ describe('getCaptureResultSummary', () => {
49
49
  await expect(getCaptureResultSummary(createCaptureResult(basePath), 4, 'dev-1')).resolves.toEqual({
50
50
  count: 4,
51
51
  isMultiLens: true,
52
- thumbnailPath: basePath
52
+ thumbnailPath: 'thingfile://tmp/capture_123_lens1.jpg'
53
53
  });
54
54
  });
55
55
  it('does not add a duplicate lens suffix', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.52-beta.4",
3
+ "version": "0.0.52-beta.5",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [