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

Support for changes on a single layer #4

Open
pinballpower opened this issue May 22, 2022 · 4 comments
Open

Support for changes on a single layer #4

pinballpower opened this issue May 22, 2022 · 4 comments

Comments

@pinballpower
Copy link
Contributor

As far as I understand the current API only allows to replace the whole play script, but not a single layer while leaving the other layers intact.

For my applicatons, it's necessary to only change a single layer on the fly. I would propose the following functionality:

  1. Assign an ID to each layer
  2. Add an API endpoint that allows to only replace the part of the script for this layer - ideally seamless.

From my understanding of the architecture this means controlling a single "frame loader" which seems to be possible internally already.

I'm also happy to help with this when the basics of my external code are ready (first need to make sure Pivid works in general for my application).

@egnor
Copy link
Owner

egnor commented May 22, 2022

Is it difficult to just re-send the entire script (with the one layer changed)? Unless you have many hundreds of layers (in which case you'll have other problems!), parsing and replacing the script is very fast.

@pinballpower
Copy link
Contributor Author

I'm not sure how this will impact the running players. Would a looping video player just go on or would it start from the beginning of the file again?
The idea is basically, to replace a single video without impacting the running playback of other layers.

@egnor
Copy link
Owner

egnor commented May 22, 2022

If the layer definition is the same, there should be zero impact, it should continue seamlessly without restarting or glitching. That's why everything uses absolute timestamps (possibly annoying as that is). That's the whole design, to be able to "slipstream" arbitrary changes in while media is playing.

@pinballpower
Copy link
Contributor Author

Ok, good to know. I'll try this first. I didn't yet dig into the timestamping stuff at all and didn't even check what's the meaning of all the parameters of a layer.

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