def __init__(self, librarian=None): GStreamerPluginHandler.__init__(self) BasePlayer.__init__(self) self._librarian = librarian self.version_info = "GStreamer: %s" % fver(Gst.version()) self._pipeline_desc = None self._volume = 1.0 self._paused = True self._mute = False self._in_gapless_transition = False self._active_error = False self.bin = None self._seeker = None self._int_vol_element = None self._ext_vol_element = None self._ext_mute_element = None self._use_eq = False self._eq_element = None self.__info_buffer = None self._lib_id = librarian.connect("changed", self.__songs_changed) self.__atf_id = None self.__bus_id = None self._runner = MainRunner()
def _on_key_press_event(self, widget, event, player: BasePlayer): if qltk.is_accel(event, "space"): player.playpause()