@hyperframes/studio 0.8.198 → 0.8.199
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/dist/assets/{hyperframes-player-DDoxfTBd.js → hyperframes-player-BDtBfwof.js} +1 -1
- package/dist/assets/{index-D9WoRF2S.js → index--W_0fuR8.js} +1 -1
- package/dist/assets/{index-BAKWbo0z.js → index-BFfBBQMu.js} +4 -4
- package/dist/index.html +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -8
- package/src/player/lib/timelineIframeHelpers.test.ts +40 -0
- package/src/player/lib/timelineIframeHelpers.ts +1 -4
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-BFfBBQMu.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-CYbvOVp-.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -29437,7 +29437,7 @@ function resolveScrubAudioEl(doc, music) {
|
|
|
29437
29437
|
const byId = previewElementFinder(doc, "audio")(music);
|
|
29438
29438
|
if (isAudioNode(byId)) return byId;
|
|
29439
29439
|
}
|
|
29440
|
-
return doc.querySelector("audio[data-timeline-role='music']")
|
|
29440
|
+
return doc.querySelector("audio[data-timeline-role='music']");
|
|
29441
29441
|
}
|
|
29442
29442
|
function leaseScrubElement(el) {
|
|
29443
29443
|
el.ownerDocument.defaultView?.__hf?.leasePausedMedia?.(el);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.199",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"dockview-react": "8.3.1",
|
|
61
61
|
"gsap": "^3.13.0",
|
|
62
62
|
"mediabunny": "^1.45.3",
|
|
63
|
-
"@hyperframes/
|
|
64
|
-
"@hyperframes/
|
|
65
|
-
"@hyperframes/sdk": "0.8.
|
|
66
|
-
"@hyperframes/
|
|
67
|
-
"@hyperframes/
|
|
68
|
-
"@hyperframes/
|
|
63
|
+
"@hyperframes/core": "0.8.199",
|
|
64
|
+
"@hyperframes/parsers": "0.8.199",
|
|
65
|
+
"@hyperframes/sdk": "0.8.199",
|
|
66
|
+
"@hyperframes/player": "0.8.199",
|
|
67
|
+
"@hyperframes/shader-transitions": "0.8.199",
|
|
68
|
+
"@hyperframes/studio-server": "0.8.199"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vite": "^6.4.2",
|
|
83
83
|
"vitest": "^4.1.11",
|
|
84
84
|
"zustand": "^5.0.0",
|
|
85
|
-
"@hyperframes/producer": "0.8.
|
|
85
|
+
"@hyperframes/producer": "0.8.199"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"react": "19",
|
|
@@ -241,6 +241,46 @@ describe("scrubPreviewAudio", () => {
|
|
|
241
241
|
stopScrubPreviewAudio();
|
|
242
242
|
});
|
|
243
243
|
|
|
244
|
+
/** An edit to a sub-composition rebuilds the media inside it, so the music row can
|
|
245
|
+
* name a track that is not in the preview for a moment. Auditioning whatever audio
|
|
246
|
+
* came first then previews the voiceover, which is not the track being scrubbed. */
|
|
247
|
+
it("previews nothing when the music row's own track is not in the preview", () => {
|
|
248
|
+
const iframe = document.createElement("iframe");
|
|
249
|
+
document.body.append(iframe);
|
|
250
|
+
const previewDoc = iframe.contentDocument;
|
|
251
|
+
if (!previewDoc?.body) throw new Error("expected an iframe document");
|
|
252
|
+
|
|
253
|
+
const voiceover = previewDoc.createElement("audio");
|
|
254
|
+
voiceover.id = "voiceover";
|
|
255
|
+
voiceover.play = vi.fn(async () => {});
|
|
256
|
+
voiceover.pause = vi.fn();
|
|
257
|
+
previewDoc.body.append(voiceover);
|
|
258
|
+
|
|
259
|
+
scrubPreviewAudio(iframe, 0.5, { id: "music-bed" }, 1);
|
|
260
|
+
|
|
261
|
+
expect(voiceover.play).not.toHaveBeenCalled();
|
|
262
|
+
expect(voiceover.volume).toBe(1);
|
|
263
|
+
stopScrubPreviewAudio();
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
it("still previews the track marked as the music when the row's own id is gone", () => {
|
|
267
|
+
const iframe = document.createElement("iframe");
|
|
268
|
+
document.body.append(iframe);
|
|
269
|
+
const previewDoc = iframe.contentDocument;
|
|
270
|
+
if (!previewDoc?.body) throw new Error("expected an iframe document");
|
|
271
|
+
previewDoc.body.innerHTML =
|
|
272
|
+
'<audio id="voiceover"></audio><audio id="bed" data-timeline-role="music"></audio>';
|
|
273
|
+
const [voiceover, bed] = Array.from(previewDoc.querySelectorAll("audio"));
|
|
274
|
+
for (const audio of [voiceover, bed])
|
|
275
|
+
Object.assign(audio!, { play: vi.fn(async () => {}), pause: vi.fn() });
|
|
276
|
+
|
|
277
|
+
scrubPreviewAudio(iframe, 0.5, { id: "music-bed" }, 1);
|
|
278
|
+
|
|
279
|
+
expect(bed!.play).toHaveBeenCalled();
|
|
280
|
+
expect(voiceover!.play).not.toHaveBeenCalled();
|
|
281
|
+
stopScrubPreviewAudio();
|
|
282
|
+
});
|
|
283
|
+
|
|
244
284
|
/** A scrub audition is media running under a paused clock, which the runtime now
|
|
245
285
|
* stops on sight. So it borrows the element. That a leased element survives the
|
|
246
286
|
* tick is asserted runtime-side in core's `transportPark.test.ts`; here the
|
|
@@ -243,10 +243,7 @@ function resolveScrubAudioEl(doc: Document, music?: PreviewTarget | null): HTMLA
|
|
|
243
243
|
const byId = previewElementFinder(doc, "audio")(music);
|
|
244
244
|
if (isAudioNode(byId)) return byId;
|
|
245
245
|
}
|
|
246
|
-
return (
|
|
247
|
-
doc.querySelector<HTMLAudioElement>("audio[data-timeline-role='music']") ??
|
|
248
|
-
doc.querySelector<HTMLAudioElement>("audio")
|
|
249
|
-
);
|
|
246
|
+
return doc.querySelector<HTMLAudioElement>("audio[data-timeline-role='music']");
|
|
250
247
|
}
|
|
251
248
|
|
|
252
249
|
/** The runtime stops any media running under a paused clock, and a scrub audition
|