If setting stream position from a valid position doesn't work, it sounds like a bug with the node. Or maybe there is an order between the time you play and the time you seek? If it doesn't work either it could be reported on the issue tracker.
Instead of saving the stream position, a workaround would be to not destroy the video player when you change scenes, keep the whole node around in a branch of the tree that doesn't get wiped out (like an autoload) or tweak your game so that it doesn't need to use change_scene
, instead change only a child branch (because change_scene
is only a shortcut to replace the first child of the scene tree root with another instance).
root
- CurrentLevel <-- if this is swapped it will wipe VideoPlayer
- VideoPlayer
- Other stuff
root
- VideoPlayer
- CurrentLevel <-- this can be swapped without wiping VideoPlayer
- Other stuff