Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Questions About Jukebox API

1709021302
Coryphon
Pro
Sheet Author
Hi All, I’ve just finished writing a ‘Slideshow’ API script that allows automating of fading in/out multiple shapes (path objects) and text to do scripted reveals of pages for intro sequences, showing hidden writing etc. It uses async Promises and awaits and works nicely. It can also execute other macros as part of the sequence so I can fade in/out audio simultaneously for example. The problems I’m having are: 1) playJukeboxPlaylist (and stop) don’t seem to work, are these deprecated? 2) I wrote my own track fade in/out stop/start (I know there are API scripts out there that do this, but wanted to try for myself ;-) BUT if the track had already been played partially then it always starts from that point, eg halfway through… Is there a way with the API to ‘reset’ a track to the beginning? I’ve tried messing with the ‘softstop’ track attribute but it doesn’t seem to make a difference… Any thoughts? Regards, ~ Coryphon ~
1709050248
The Aaron
Roll20 Production Team
API Scripter
Right now, there isn't a way for the API to set the location for playback.   That looks like something that could be added pretty easily as a percentage, which would at least let you rewind/fast-forward tracks.  I don't see where the length of a track is exposed to the API as yet, but I might be able to add that in future iterations.
1709056517

Edited 1709056535
Coryphon
Pro
Sheet Author
The Aaron said: Right now, there isn't a way for the API to set the location for playback.   That looks like something that could be added pretty easily as a percentage, which would at least let you rewind/fast-forward tracks.  I don't see where the length of a track is exposed to the API as yet, but I might be able to add that in future iterations. Thanks The Aaron… With respect to my first point ( playJukeboxPlaylist), should these functions work do u know…? ~ C ~
1709064214
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Coryphon! Out of curiosity, are you planning on publishing that script when it is done? It sounds very interesting.
1709072760
The Aaron
Roll20 Production Team
API Scripter
Play and stop should both work.
1709149007

Edited 1709149760
Coryphon
Pro
Sheet Author
keithcurtis said: Hi Coryphon! Out of curiosity, are you planning on publishing that script when it is done? It sounds very interesting. I can certainly look to do that, needs tidying ;-) Thanks for the interest, ~ C ~
1711735850
Victor B.
Pro
Sheet Author
API Scripter
Look at Roll20AM for managing tracks.  Also, it's not possible to go back to a spot in the track.  Roll20 doesn't provide that info (or least didn't when Roll20AM was written).