From fff99694ba59130f5e585f06fecc2881c39c9518 Mon Sep 17 00:00:00 2001 From: Buddy Reno Date: Wed, 27 Sep 2017 16:47:05 -0500 Subject: [PATCH] feat(music-controls): add support for next/prev track and skip forward/backward in control center (#1927) --- .../plugins/music-controls/index.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/music-controls/index.ts b/src/@ionic-native/plugins/music-controls/index.ts index 54336db95..033de510e 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -10,6 +10,10 @@ export interface MusicControlsOptions { dismissable: boolean; hasPrev: boolean; hasNext: boolean; + hasSkipForward: boolean; + hasSkipBackward: boolean; + skipForwardInterval: number; + skipBackwardInterval: number; hasClose: boolean; album: string; duration: number; @@ -50,6 +54,10 @@ export interface MusicControlsOptions { * album : 'Absolution' // optional, default: '' * duration : 60, // optional, default: 0 * elapsed : 10, // optional, default: 0 + * hasSkipForward : true, // show skip forward button, optional, default: false + * hasSkipBackward : true, // show skip backward button, optional, default: false + * skipForwardInterval: 15, // display number for skip forward, optional, default: 0 + * skipBackwardInterval: 15, // display number for skip backward, optional, default: 0 * * // Android only, optional * // text displayed in the status bar when the notification (and the ticker) are updated @@ -89,6 +97,12 @@ export interface MusicControlsOptions { * }); * // Do something * break; + * case 'music-controls-skip-forward': + * // Do something + * break; + * case 'music-controls-skip-backward': + * // Do something + * break; * * // Headset events (Android only) * // All media button events are listed below @@ -164,7 +178,7 @@ export class MusicControls extends IonicNativePlugin { /** * Update elapsed time, optionally toggle play/pause: - * @param args {Object} + * @param args {Object} */ @Cordova({ platforms: ['iOS']