@hyperframes/inspector 0.8.186 → 0.8.188
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const AUDIBLE_VIDEO_QUALIFIER = ":not([muted]):is(:not([data-has-audio]),[data-has-audio=\"true\"])";
|
|
2
|
+
export declare const AUDIBLE_MEDIA_SELECTOR = "audio[data-start], video[data-start]:not([muted]):is(:not([data-has-audio]),[data-has-audio=\"true\"])";
|
|
3
|
+
export declare function isAudibleVideoElement(el: {
|
|
4
|
+
tagName: string;
|
|
5
|
+
hasAttribute(name: string): boolean;
|
|
6
|
+
getAttribute(name: string): string | null;
|
|
7
|
+
}): boolean;
|
|
8
|
+
export declare function audibleVideoNeedsWebAudio(fields: {
|
|
9
|
+
volume?: number | null;
|
|
10
|
+
fxChain?: string | null;
|
|
11
|
+
automation?: string | null;
|
|
12
|
+
audioGroup?: string | null;
|
|
13
|
+
masterChain?: string | null;
|
|
14
|
+
}): boolean;
|
|
@@ -120,6 +120,12 @@ export interface AutomationRange {
|
|
|
120
120
|
* disables the fader while a lane owns it, so there was no way back.
|
|
121
121
|
*/
|
|
122
122
|
export declare const VOLUME_RANGE: AutomationRange;
|
|
123
|
+
/** Bounded sampling for volume curves drawn as straight pieces by the PCM baker. */
|
|
124
|
+
export declare function volumeSegmentSampleCount(duration: number): number;
|
|
125
|
+
/** Whether the segment leaving `point` bends: by `curve`, or through a `viaX`/`viaY` point. */
|
|
126
|
+
export declare function isBentSegment(point: Pick<HfAutomationPoint, "curve" | "viaX" | "viaY">): boolean;
|
|
127
|
+
export declare function gainedVolume(v: number, gain: number, gainAhead?: boolean): number;
|
|
128
|
+
export declare function gainedVolumePoints(lane: HfAutomationLane, gain: number, gainAhead?: boolean): HfAutomationPoint[];
|
|
123
129
|
export declare const RATE_RANGE: AutomationRange;
|
|
124
130
|
/**
|
|
125
131
|
* Resolve a lane's target against a chain. Returns null when the target names
|
|
@@ -15,6 +15,10 @@ export declare const MAX_AUDIO_GAIN: number;
|
|
|
15
15
|
export declare const AUDIO_GAIN_FADER_MIN = -100;
|
|
16
16
|
export declare const AUDIO_GAIN_FADER_MAX = 100;
|
|
17
17
|
export declare function clampAudioGain(value: number): number;
|
|
18
|
+
/** `data-volume` is a gain on the volume lane, as clip gain offsets the keyframes in an NLE. */
|
|
19
|
+
export declare function gainTimesLane(gain: number, lane: number): number;
|
|
20
|
+
/** `data-volume` as clip gain, ahead of the FX chain; unity when a GSAP tween's absolute values own the level. */
|
|
21
|
+
export declare function clipGain(volume: number, tweened: boolean): number;
|
|
18
22
|
export declare function clampNativeMediaVolume(value: number): number;
|
|
19
23
|
/**
|
|
20
24
|
* Serialize an authored gain for `data-volume`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document-unique identity for media elements in a compiled render document.
|
|
3
|
+
*
|
|
4
|
+
* Element `id`s are only unique within one composition FILE. The render
|
|
5
|
+
* document is the inlined union of every file, so ids collide there in two
|
|
6
|
+
* ways an author cannot avoid:
|
|
7
|
+
*
|
|
8
|
+
* 1. Two scenes each declare `<video id="clip">` — legal per file, duplicated
|
|
9
|
+
* once inlined.
|
|
10
|
+
* 2. Two scenes each declare a bare `<video>` — the timing compiler numbers
|
|
11
|
+
* auto-ids per file, so both become `hf-video-0`.
|
|
12
|
+
*
|
|
13
|
+
* The render pipeline keys media on that id (extract, inject, visibility,
|
|
14
|
+
* bounds), so a collision collapses N elements into one entry and every
|
|
15
|
+
* lookup resolves to whichever element happens to come first in the document.
|
|
16
|
+
* The surviving clip's frames land on the wrong element and the visible scene
|
|
17
|
+
* paints without footage.
|
|
18
|
+
*
|
|
19
|
+
* This module is the single owner of the fix: after inlining, every media
|
|
20
|
+
* element gets a document-unique `data-hf-render-id`. It equals the element's
|
|
21
|
+
* own id whenever that id is already unique, so uncolliding documents keep
|
|
22
|
+
* byte-identical pipeline keys and log output. Author-visible `id` attributes
|
|
23
|
+
* are never rewritten — 158 of the 161 registry blocks reference their own ids
|
|
24
|
+
* from `#id` CSS or `getElementById`, so renaming would break scene styling to
|
|
25
|
+
* fix scene footage.
|
|
26
|
+
*/
|
|
27
|
+
export declare const MEDIA_RENDER_ID_ATTR = "data-hf-render-id";
|
|
28
|
+
/**
|
|
29
|
+
* The bus a member belongs to, as a DOCUMENT-unique key.
|
|
30
|
+
*
|
|
31
|
+
* `data-audio-group` names a bus by author id, unique only per composition FILE
|
|
32
|
+
* — so a sub-composition that declares a bus AND its members, used twice, put
|
|
33
|
+
* both instances' members under one key and let the second bus element
|
|
34
|
+
* overwrite the first. The mixer then sub-mixed two independent buses as one,
|
|
35
|
+
* applied instance B's fader, chain and label to instance A's audio, and — with
|
|
36
|
+
* only B muted — dropped BOTH instances from the export. This attribute is that
|
|
37
|
+
* collision resolved at the same boundary the media ids are.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AUDIO_GROUP_RENDER_ID_ATTR = "data-hf-group-render-id";
|
|
40
|
+
interface MediaElementLike {
|
|
41
|
+
readonly tagName?: string;
|
|
42
|
+
getAttribute(name: string): string | null;
|
|
43
|
+
setAttribute(name: string, value: string): void;
|
|
44
|
+
}
|
|
45
|
+
interface DocumentLike {
|
|
46
|
+
querySelectorAll(selector: string): Iterable<MediaElementLike>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stamp `data-hf-render-id` on every media element in a compiled document.
|
|
50
|
+
*
|
|
51
|
+
* Preserve unique existing stamps on recompilation. Repair stamps that collide
|
|
52
|
+
* after independently compiled scenes are merged.
|
|
53
|
+
*/
|
|
54
|
+
export declare function assignMediaRenderIds(document: DocumentLike): void;
|
|
55
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/inspector",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.188",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"htmlparser2": "^10.1.0",
|
|
44
44
|
"postcss": "^8.5.8",
|
|
45
45
|
"puppeteer-core": "^25.8.0",
|
|
46
|
-
"@hyperframes/core": "0.8.
|
|
47
|
-
"@hyperframes/parsers": "0.8.
|
|
46
|
+
"@hyperframes/core": "0.8.188",
|
|
47
|
+
"@hyperframes/parsers": "0.8.188"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.0.10",
|