Verified Commit 8fab7cae authored by Todd Weaver's avatar Todd Weaver
Browse files

NULLing out unused players (vs PAUSED which leaves Gstreamer open (and showing...

NULLing out unused players (vs PAUSED which leaves Gstreamer open (and showing audio settings in GNOME for all open players))
parent 9359128c
......@@ -347,6 +347,12 @@ class ResultsBox(Gtk.Box):
# update slider to track video time in slider
GLib.timeout_add_seconds(1, self.update_slider)
def null_out_player(self):
self.play.set_visible(True)
self.pause.set_visible(False)
self.player.set_state(Gst.State.NULL)
self.app_window.is_playing = False
@Gtk.Template.Callback()
def pause_button(self, button):
self.play.set_visible(True)
......
......@@ -153,7 +153,7 @@ class StreamWindow(Handy.ApplicationWindow):
def play_pause_toggle(self, focus_child):
if self.is_playing:
self.pause_all()
focus_child.get_child().pause_button(None)
else:
focus_child.get_child().play_button(None)
......@@ -182,7 +182,7 @@ class StreamWindow(Handy.ApplicationWindow):
for scroller in scrollers:
flowboxes = scroller.results_list.get_children()
for flowbox in flowboxes:
flowbox.get_child().pause_button(None)
flowbox.get_child().null_out_player()
def hide_error_box(self):
self.error_box.set_visible(False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment