diff options
-rw-r--r-- | src/mpris2-controller.vala | 6 | ||||
-rw-r--r-- | src/mpris2-interfaces.vala | 1 | ||||
-rw-r--r-- | src/transport-menu-item.vala | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index e5bc1f6..dae8dfb 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -186,6 +186,12 @@ public class Mpris2Controller : GLib.Object else if(command == TransportMenuitem.action.NEXT){ this.player.Next.begin(); } + else if(command == TransportMenuitem.action.REWIND){ + this.player.Seek.begin(-1); + } + else if(command == TransportMenuitem.action.FORWIND){ + this.player.Seek.begin(1); + } } public bool connected() diff --git a/src/mpris2-interfaces.vala b/src/mpris2-interfaces.vala index 5506a47..5dab1d2 100644 --- a/src/mpris2-interfaces.vala +++ b/src/mpris2-interfaces.vala @@ -42,6 +42,7 @@ public interface MprisPlayer : Object { public abstract async void PlayPause() throws IOError; public abstract async void Next() throws IOError; public abstract async void Previous() throws IOError; + public abstract async void Seek(int64 offset) throws IOError; // signals public signal void Seeked(int64 new_position); } diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala index b0009d9..d5ae283 100644 --- a/src/transport-menu-item.vala +++ b/src/transport-menu-item.vala @@ -26,7 +26,9 @@ public class TransportMenuitem : PlayerItem public enum action{ PREVIOUS, PLAY_PAUSE, - NEXT + NEXT, + REWIND, + FORWIND } public enum state{ |