Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way for the time not to start at 0? #36

Open
mcosti opened this issue Nov 23, 2023 · 2 comments
Open

Is there any way for the time not to start at 0? #36

mcosti opened this issue Nov 23, 2023 · 2 comments

Comments

@mcosti
Copy link

mcosti commented Nov 23, 2023

Hey! Awesome library, thank you for your work.

Did anyone figure out a way for the timeline to start at negative values?

My use case is syncing an audio offset which would great improve my UX if it would be possible for the timeline to start at negative values. Right now what I did is I pushed both actions more to the right so there is a virtual offset, but it requires quite a lot of effort in synchronizing it with a videoplayer.

Thanks

@mcosti
Copy link
Author

mcosti commented Nov 24, 2023

Kind of answered my question, at least for my use case:

Adding minStart on the action as a negative value works

@zane-programs
Copy link

Nice! Here's how I did it in my use case by using the getScaleRender prop:

// ...

function getScaleRender(scale: number) {
  return <>{scale + 1}</>;
}

// ...

function TimelineComponent() {
  // ...
  return (
    <Timeline
      // ...
      getScaleRender={getScaleRender}
    />
  );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants