video: When autoplaying, start playing once the video is prepared

This fixe video sources with longer loading times not automatically
playing.
This commit is contained in:
Benjamin Otte
2020-12-16 02:22:26 +01:00
parent a17042963e
commit d8dec82bdd

View File

@@ -545,6 +545,11 @@ gtk_video_notify_cb (GtkMediaStream *stream,
gtk_video_update_error (self);
if (g_str_equal (pspec->name, "playing"))
gtk_video_update_playing (self);
if (g_str_equal (pspec->name, "prepared"))
{
if (self->autoplay && gtk_media_stream_is_prepared (stream))
gtk_media_stream_play (stream);
}
}
/**