mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 06:30:03 +00:00
fix(studio): ensure GSAP timeline stays paused after seek
Call tl.pause() both before AND after tl.seek() in the adapter. GSAP's seek() can reactivate a timeline depending on internal state; the second pause() guarantees it stays frozen at the seeked position.
This commit is contained in:
@@ -135,8 +135,10 @@ export function wrapTimeline(tl: TimelineLike): PlaybackAdapter {
|
||||
play: () => tl.play(),
|
||||
pause: () => tl.pause(),
|
||||
seek: (t, options) => {
|
||||
if (!options?.keepPlaying) tl.pause();
|
||||
const shouldPause = !options?.keepPlaying;
|
||||
if (shouldPause) tl.pause();
|
||||
tl.seek(t);
|
||||
if (shouldPause) tl.pause();
|
||||
},
|
||||
getTime: () => tl.time(),
|
||||
getDuration: () => tl.duration(),
|
||||
|
||||
Reference in New Issue
Block a user