diff --git a/src/player.js b/src/player.js index effeb300..1dcd05cf 100644 --- a/src/player.js +++ b/src/player.js @@ -386,6 +386,8 @@ class ClapperPlayer extends GstClapper.Clapper case 'toggle_play': case 'play': case 'pause': + this[action](); + break; case 'set_playlist': case 'append_playlist': case 'set_subtitles': diff --git a/src/widgetRemote.js b/src/widgetRemote.js index a479a7c0..17f3454f 100644 --- a/src/widgetRemote.js +++ b/src/widgetRemote.js @@ -27,7 +27,7 @@ class ClapperWidgetRemote extends Gtk.Grid this.togglePlayButton.remove_css_class('flat'); this.togglePlayButton.child.add_css_class('playbackicon'); this.togglePlayButton.connect( - 'clicked', this.sendWs.bind(this, 'toggle_play') + 'clicked', () => this.sendWs('toggle_play') ); this.attach(this.togglePlayButton, 0, 0, 1, 1);