mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Print a warning when trying to seek in VideoPlayer
Seeking isn't implemented in built-in video formats and can only
be supported in GDNative-provided video formats.
(cherry picked from commit ea46639e22
)
This commit is contained in:
parent
595a1edd3b
commit
f0d1bedc74
3 changed files with 5 additions and 6 deletions
|
@ -74,6 +74,7 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position">
|
<member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position">
|
||||||
The current position of the stream, in seconds.
|
The current position of the stream, in seconds.
|
||||||
|
[b]Note:[/b] Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on.
|
||||||
</member>
|
</member>
|
||||||
<member name="volume" type="float" setter="set_volume" getter="get_volume">
|
<member name="volume" type="float" setter="set_volume" getter="get_volume">
|
||||||
Audio volume as a linear value.
|
Audio volume as a linear value.
|
||||||
|
|
|
@ -617,10 +617,9 @@ float VideoStreamPlaybackTheora::get_playback_position() const {
|
||||||
return get_time();
|
return get_time();
|
||||||
};
|
};
|
||||||
|
|
||||||
void VideoStreamPlaybackTheora::seek(float p_time){
|
void VideoStreamPlaybackTheora::seek(float p_time) {
|
||||||
|
WARN_PRINT_ONCE("Seeking in Theora and WebM videos is not implemented yet (it's only supported for GDNative-provided video streams).");
|
||||||
// no
|
}
|
||||||
};
|
|
||||||
|
|
||||||
void VideoStreamPlaybackTheora::set_mix_callback(AudioMixCallback p_callback, void *p_userdata) {
|
void VideoStreamPlaybackTheora::set_mix_callback(AudioMixCallback p_callback, void *p_userdata) {
|
||||||
|
|
||||||
|
|
|
@ -222,8 +222,7 @@ float VideoStreamPlaybackWebm::get_playback_position() const {
|
||||||
return video_pos;
|
return video_pos;
|
||||||
}
|
}
|
||||||
void VideoStreamPlaybackWebm::seek(float p_time) {
|
void VideoStreamPlaybackWebm::seek(float p_time) {
|
||||||
|
WARN_PRINT_ONCE("Seeking in Theora and WebM videos is not implemented yet (it's only supported for GDNative-provided video streams).");
|
||||||
//Not implemented
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoStreamPlaybackWebm::set_audio_track(int p_idx) {
|
void VideoStreamPlaybackWebm::set_audio_track(int p_idx) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue