Closed lucasconstantino closed 4 years ago
I'm only just starting to look at this library myself, but it seems that it supports adding new videos dynamically during playback. I took their CompositingNode demo and modified it to add a video node during playback: https://codesandbox.io/s/videocontext-adding-video-to-end-dynamically-jo3qs
(If you see an error, click CodeSandbox's refresh icon. The demos seem to error initially and I'm not sure why)
The main change I made was to move the addition of the videoNode2
into a setTimeout
that triggers 8 seconds after playback begins, and also to use the startAt
and stopAt
functions to set its time instead of start
and stop
.
I think for your use case you'd need to manually keep track of the "stop" point of the last video, so that you can add new videos after it, but it does seem to work.
@dceddia thanks so much for your reply. Question answered!
Hello,
I'm exploring this library as a possible solution to a game experience which uses background videos dynamically defined based on game states. Is it supported to add new videos to the end of the video context while already playing?