Skip to content

Commit

Permalink
feat(MediaViewer): autoplay videos
Browse files Browse the repository at this point in the history
part of: #299
  • Loading branch information
GeopJr committed Jun 1, 2023
1 parent 13c6ada commit 9c1bfaf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Views/MediaViewer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ public class Tuba.Views.MediaViewer : Gtk.Box {
}

public void add_video (string url, Gdk.Paintable? preview, int? pos) {
var video = new Gtk.Video ();
var video = new Gtk.Video () {
autoplay = true
};
var item = new Item (video, url, preview, null, true);
if (pos == null) {
carousel.append (item);
Expand Down Expand Up @@ -456,7 +458,9 @@ public class Tuba.Views.MediaViewer : Gtk.Box {
}

public void set_remote_video (string url, Gdk.Paintable? preview, string? user_friendly_url = null) {
var video = new Gtk.Video ();
var video = new Gtk.Video () {
autoplay = true
};
var item = new Item (video, user_friendly_url, preview, null, true);

File file = File.new_for_uri (url);
Expand Down

0 comments on commit 9c1bfaf

Please sign in to comment.