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

Array of loops #85

Open
malcabe opened this issue Apr 24, 2020 · 1 comment
Open

Array of loops #85

malcabe opened this issue Apr 24, 2020 · 1 comment

Comments

@malcabe
Copy link

malcabe commented Apr 24, 2020

Hi - Thank you for creating this library - very useful!
Do you think it's possible to pass in an array of loop / durations, such that we can control how long each image is shown before transitioning?
Thanks again!

@h2non
Copy link
Owner

h2non commented Apr 24, 2020

Yes, see this example for controlling how long an image should be displayed:

videoshow([{
    path: 'image1.jpg',
    loop: 5, // seconds
    caption: 'Hello world as video subtitle'
  }, {
    path: 'image2.jpg',
    caption: 'This is a sample subtitle',
    loop: 10 // seconds
  }])
  .save('video.mp4')
  .on('error', function () {})
  .on('end', function () {})

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