You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2b65b4e
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -68,6 +70,8 @@ You can embed one composition inside another in two ways: loading from an extern
68
70
</div>
69
71
</template>
70
72
```
73
+
74
+
`data-playback-start` selects the child timeline time shown when the host begins. It defaults to `0`. A left trim or split advances this source-time offset by the elapsed host time multiplied by `data-playback-rate`, so the nested animation remains continuous instead of restarting.
71
75
</Tab>
72
76
<Tabtitle="Inline">
73
77
Define a nested composition directly inside the parent. This is simpler for one-off compositions that do not need to be reused.
Copy file name to clipboardExpand all lines: docs/concepts/data-attributes.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Hyperframes uses HTML data attributes to control timing, media playback, and [co
18
18
| Attribute | Example | Description |
19
19
|-----------|---------|-------------|
20
20
|`data-media-start`|`"2"`| Media playback offset / trim point in seconds. Default: `0`|
21
+
|`data-playback-start`|`"2"`| Source-time offset in seconds for media wrappers and nested composition hosts. Missing values default to `0`; Studio writes this attribute when a composition is trimmed or split. |
22
+
|`data-playback-rate`|`"1.5"`| Source playback multiplier, clamped to `0.1`–`5`. Source time advances by timeline elapsed time multiplied by the canonical rate; invalid values default to `1`. |
21
23
|`data-volume`|`"0.8"`| Audio/video volume, 0 to 1 |
22
24
|`data-has-audio`|`"true"`| Indicates video has an audio track |
Copy file name to clipboardExpand all lines: docs/reference/html-schema.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,11 @@ Common sizes:
52
52
|`id`| All | Yes | Unique identifier (e.g., `"el-1"`). Used for relative timing references and CSS targeting. |
53
53
|`class="clip"`| Visible elements | Yes | Enables runtime visibility management. Omit for audio-only clips. |
54
54
|`data-start`| All | Yes | Start time in seconds (e.g., `"0"`, `"5.5"`), or a clip ID reference for [relative timing](#relative-timing) (e.g., `"intro"`). |
55
-
|`data-duration`| video, img, audio| See below |Duration in seconds. **Required** for images. Optional for video/audio (defaults to source duration). Not used on compositions. |
55
+
|`data-duration`| video, img, audio, nested composition hosts | See below |Timeline slot duration in seconds. **Required** for images and nested composition hosts. Optional for video/audio (defaults to source duration). |
56
56
|`data-track-index`| All | Yes | Timeline track number. Controls z-ordering (higher = in front). Clips on the same track cannot overlap. |
57
57
|`data-media-start`| video, audio | No | Playback offset / trim point in source file (seconds). Default: `0`. See [Data Attributes](/concepts/data-attributes). |
58
+
|`data-playback-start`| video, audio, composition | No | Source-time offset in seconds. On a nested composition, this is the child timeline time shown at the host's `data-start`. Default: `0`. |
59
+
|`data-playback-rate`| video, audio, composition | No | Source playback multiplier clamped to `0.1`–`5`. Invalid values default to `1`. |
58
60
|`data-volume`| audio, video | No | Volume level from `0` to `1`. Default: `1`. |
59
61
|`data-composition-id`| div | On compositions | Unique composition ID. Must match the key used in `window.__timelines`. |
60
62
|`data-composition-src`| div | No | Path to external composition HTML file (for [nested compositions](#composition-clips)). |
0 commit comments