-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
VideoPlayer: Fix reloading translation remapped stream #84794
VideoPlayer: Fix reloading translation remapped stream #84794
Conversation
I investigated and it's caused by this: godot/modules/theora/video_stream_theora.cpp Lines 676 to 678 in d443f12
The best part is that any resource with this method will not appear on the list. Consequently, any resource you can select does not implement handles_type() . I wonder what is this method for 🙃
|
@@ -237,6 +237,12 @@ bool VideoStreamPlayer::has_loop() const { | |||
void VideoStreamPlayer::set_stream(const Ref<VideoStream> &p_stream) { | |||
stop(); | |||
|
|||
// Make sure to handle stream changes seamlessly, e.g. when done via | |||
// translation remapping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this comment be below, at connect()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was meant to cover both at once, but since they're split it's not very clear yeah.
Cherry-picked for 4.2.1. |
Cherry-picked for 4.1.4. (Adjusted for the old API lacking |
MRP ported from Godot 3 (might need opening a couple of times, there's some weirdness with the font):
VideoRemaps.zip
Notes
.ogv
extension doesn't show up in the list of resources that can be picked from translation remaps. So one needs to select "All Files" to select.ogv
files.video_de.ogv
should automatically select "German", andvideo_de_AT
should automatically select "German (Austria)".But it may not be easy to seek to the previous position. To do so, we would need to only emit
changed
, but not handle in the VideoStreamPlayer, leaving it to the user to implement.Alternatively the VideoStreamPlayer could have more signals like
stream_changed
that could include relevant information about the previous state (was playing, position, etc.). But the current player is fairly barebones and that's way outside the scope of this bugfix.