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 2a8f371643
commit d6f288427a

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);
}
}
/**