Skip to content

Added option for local Hydra instance for file serving and videos are not restarted on re-runs#323

Open
MaikSteiger wants to merge 2 commits into
hydra-synth:mainfrom
MaikSteiger:main
Open

Added option for local Hydra instance for file serving and videos are not restarted on re-runs#323
MaikSteiger wants to merge 2 commits into
hydra-synth:mainfrom
MaikSteiger:main

Conversation

@MaikSteiger

Copy link
Copy Markdown

I have made two commits, one targeting the possibility of using local files from your machine in the video synthesizer directly, rather than providing a URL to a remote resource. The second one just handles code re-runs on video sources, such that they are not reinitialized to play from frame=0 for each re-run, but it just continuously plays for a better live coding experience.

For the local files, it will mostly be useful for local instances running Hydra via npm run dev. For that use case I have introduced a new constant in the code editor F that directly points to the URL serving the files.

Example:
I want to use a video file called foo.mp4 as source for my project. I would just drag and drop that file into the files directory in the Hydra Repository and load it via:

// More general syntax
s0.initVideo(F + "foo.mp4")

// Or use string concatenation
s0.initVideo(`${F}foo.mp4`)

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

Successfully merging this pull request may close these issues.

1 participant