Re-render the timeline at the current playhead after an in-place edit.
(iframe: HTMLIFrameElement, timeline: RuntimeTimeline)
| 225 | |
| 226 | /** Re-render the timeline at the current playhead after an in-place edit. */ |
| 227 | function seekToCurrent(iframe: HTMLIFrameElement, timeline: RuntimeTimeline): void { |
| 228 | const player = playerOf(iframe); |
| 229 | const currentTime = |
| 230 | typeof player?.getTime === "function" |
| 231 | ? player.getTime() |
| 232 | : typeof timeline.time === "function" |
| 233 | ? timeline.time() |
| 234 | : 0; |
| 235 | player?.seek?.(Number.isFinite(currentTime) ? currentTime : 0); |
| 236 | } |
| 237 | |
| 238 | /** Apply `change` to the resolved tween. `true` if applied, `false` to soft-reload. |
| 239 | * `global-set` is handled before this (no tween) and never reaches here. */ |
no test coverage detected