From 8ece08379c8b8e951caf77eda4aa2f9265214182 Mon Sep 17 00:00:00 2001 From: Prabesh Niraula Date: Thu, 1 Mar 2018 12:03:14 -0500 Subject: [PATCH 1/4] Added new optional parameters for Icons in Interface --- .../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 383b45d8..1a5f0679 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -20,6 +20,12 @@ export interface MusicControlsOptions { duration?: number; elapsed?: number; ticker?: string; + playIcon?:string; + pauseIcon?:string; + prevIcon?:string; + nextIcon?:string; + closeIcon?:string; + notificationIcon?:string; } /** @@ -63,7 +69,15 @@ export interface MusicControlsOptions { * * // Android only, optional * // text displayed in the status bar when the notification (and the ticker) are updated, optional - * ticker : 'Now playing "Time is Running Out"' + * ticker : 'Now playing "Time is Running Out"', + * //All icons default to their built-in android equivalents + * //The supplied drawable name, e.g. 'media_play', is the name of a drawable found under android/res/drawable* folders + * playIcon: 'media_play', + * pauseIcon: 'media_pause', + * prevIcon: 'media_prev', + * nextIcon: 'media_next', + * closeIcon: 'media_close', + * notificationIcon: 'notification' * }); * * this.musicControls.subscribe().subscribe(action => { From 5fe579b2f3ba9a6c20d5fef0d17346800791800a Mon Sep 17 00:00:00 2001 From: pniraula Date: Mon, 5 Mar 2018 11:38:14 -0500 Subject: [PATCH 2/4] Fixed whitespaces --- src/@ionic-native/plugins/music-controls/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/@ionic-native/plugins/music-controls/index.ts b/src/@ionic-native/plugins/music-controls/index.ts index 1a5f0679..9c67cf96 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -20,12 +20,12 @@ export interface MusicControlsOptions { duration?: number; elapsed?: number; ticker?: string; - playIcon?:string; - pauseIcon?:string; - prevIcon?:string; - nextIcon?:string; - closeIcon?:string; - notificationIcon?:string; + playIcon?: string; + pauseIcon?: string; + prevIcon?: string; + nextIcon?: string; + closeIcon?: string; + notificationIcon?: string; } /** From 7e0300a75ffeb0a1a6ab5af9a87f8c42678429d1 Mon Sep 17 00:00:00 2001 From: Prabesh Niraula Date: Mon, 12 Mar 2018 14:20:40 -0400 Subject: [PATCH 3/4] Added space after // --- src/@ionic-native/plugins/music-controls/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/music-controls/index.ts b/src/@ionic-native/plugins/music-controls/index.ts index 9c67cf96..df627061 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -70,8 +70,8 @@ export interface MusicControlsOptions { * // Android only, optional * // text displayed in the status bar when the notification (and the ticker) are updated, optional * ticker : 'Now playing "Time is Running Out"', - * //All icons default to their built-in android equivalents - * //The supplied drawable name, e.g. 'media_play', is the name of a drawable found under android/res/drawable* folders + * // All icons default to their built-in android equivalents + * // The supplied drawable name, e.g. 'media_play', is the name of a drawable found under android/res/drawable* folders * playIcon: 'media_play', * pauseIcon: 'media_pause', * prevIcon: 'media_prev', From a6b9a9237a198081250e06c105fadc4376efa9b2 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 01:15:01 +0100 Subject: [PATCH 4/4] fix lint --- .../plugins/music-controls/index.ts | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/@ionic-native/plugins/music-controls/index.ts b/src/@ionic-native/plugins/music-controls/index.ts index df627061..0304de87 100644 --- a/src/@ionic-native/plugins/music-controls/index.ts +++ b/src/@ionic-native/plugins/music-controls/index.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; export interface MusicControlsOptions { @@ -154,21 +154,24 @@ export interface MusicControlsOptions { }) @Injectable() export class MusicControls extends IonicNativePlugin { - /** * Create the media controls * @param options {MusicControlsOptions} * @returns {Promise} */ @Cordova() - create(options: MusicControlsOptions): Promise { return; } + create(options: MusicControlsOptions): Promise { + return; + } /** * Destroy the media controller * @returns {Promise} */ @Cordova() - destroy(): Promise { return; } + destroy(): Promise { + return; + } /** * Subscribe to the events of the media controller @@ -177,34 +180,36 @@ export class MusicControls extends IonicNativePlugin { @Cordova({ observable: true }) - subscribe(): Observable { return; } + subscribe(): Observable { + return; + } /** * Start listening for events, this enables the Observable from the subscribe method */ @Cordova({ sync: true }) - listen(): void { } + listen(): void {} /** * Toggle play/pause: * @param isPlaying {boolean} */ @Cordova() - updateIsPlaying(isPlaying: boolean): void { } + updateIsPlaying(isPlaying: boolean): void {} /** - * Update elapsed time, optionally toggle play/pause: - * @param args {Object} - */ + * Update elapsed time, optionally toggle play/pause: + * @param args {Object} + */ @Cordova({ platforms: ['iOS'] }) - updateElapsed(args: { elapsed: string; isPlaying: boolean; }): void { } + updateElapsed(args: { elapsed: string; isPlaying: boolean }): void {} /** * Toggle dismissable: * @param dismissable {boolean} */ @Cordova() - updateDismissable(dismissable: boolean): void { } + updateDismissable(dismissable: boolean): void {} }