mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-28 14:04:45 +08:00
feat(music-controls): add support for next/prev track and skip forward/backward in control center (#1927)
This commit is contained in:
parent
e2419a26b2
commit
fff99694ba
@ -10,6 +10,10 @@ export interface MusicControlsOptions {
|
|||||||
dismissable: boolean;
|
dismissable: boolean;
|
||||||
hasPrev: boolean;
|
hasPrev: boolean;
|
||||||
hasNext: boolean;
|
hasNext: boolean;
|
||||||
|
hasSkipForward: boolean;
|
||||||
|
hasSkipBackward: boolean;
|
||||||
|
skipForwardInterval: number;
|
||||||
|
skipBackwardInterval: number;
|
||||||
hasClose: boolean;
|
hasClose: boolean;
|
||||||
album: string;
|
album: string;
|
||||||
duration: number;
|
duration: number;
|
||||||
@ -50,6 +54,10 @@ export interface MusicControlsOptions {
|
|||||||
* album : 'Absolution' // optional, default: ''
|
* album : 'Absolution' // optional, default: ''
|
||||||
* duration : 60, // optional, default: 0
|
* duration : 60, // optional, default: 0
|
||||||
* elapsed : 10, // 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
|
* // Android only, optional
|
||||||
* // text displayed in the status bar when the notification (and the ticker) are updated
|
* // text displayed in the status bar when the notification (and the ticker) are updated
|
||||||
@ -89,6 +97,12 @@ export interface MusicControlsOptions {
|
|||||||
* });
|
* });
|
||||||
* // Do something
|
* // Do something
|
||||||
* break;
|
* break;
|
||||||
|
* case 'music-controls-skip-forward':
|
||||||
|
* // Do something
|
||||||
|
* break;
|
||||||
|
* case 'music-controls-skip-backward':
|
||||||
|
* // Do something
|
||||||
|
* break;
|
||||||
*
|
*
|
||||||
* // Headset events (Android only)
|
* // Headset events (Android only)
|
||||||
* // All media button events are listed below
|
* // All media button events are listed below
|
||||||
@ -164,7 +178,7 @@ export class MusicControls extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update elapsed time, optionally toggle play/pause:
|
* Update elapsed time, optionally toggle play/pause:
|
||||||
* @param args {Object}
|
* @param args {Object}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user