mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(music-controls): various fixes (#2094)
Add hasScrubbing variable to options - used to enable or disable scrubbing from the iOS control center or lockscreen progress bar Make optional items actually optional...
This commit is contained in:
parent
5159367db8
commit
afca8761d7
@ -3,22 +3,23 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface MusicControlsOptions {
|
||||
track: string;
|
||||
artist: string;
|
||||
cover: string;
|
||||
isPlaying: boolean;
|
||||
dismissable: boolean;
|
||||
hasPrev: boolean;
|
||||
hasNext: boolean;
|
||||
hasSkipForward: boolean;
|
||||
hasSkipBackward: boolean;
|
||||
skipForwardInterval: number;
|
||||
skipBackwardInterval: number;
|
||||
hasClose: boolean;
|
||||
album: string;
|
||||
duration: number;
|
||||
elapsed: number;
|
||||
ticker: string;
|
||||
track?: string;
|
||||
artist?: string;
|
||||
cover?: string;
|
||||
isPlaying?: boolean;
|
||||
dismissable?: boolean;
|
||||
hasPrev?: boolean;
|
||||
hasNext?: boolean;
|
||||
hasSkipForward?: boolean;
|
||||
hasSkipBackward?: boolean;
|
||||
skipForwardInterval?: number;
|
||||
skipBackwardInterval?: number;
|
||||
hasScrubbing?: boolean;
|
||||
hasClose?: boolean;
|
||||
album?: string;
|
||||
duration?: number;
|
||||
elapsed?: number;
|
||||
ticker?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,9 +59,10 @@ export interface MusicControlsOptions {
|
||||
* 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
|
||||
* hasScrubbing: false, // enable scrubbing from control center and lockscreen progress bar, 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, optional
|
||||
* ticker : 'Now playing "Time is Running Out"'
|
||||
* });
|
||||
*
|
||||
@ -91,7 +93,7 @@ export interface MusicControlsOptions {
|
||||
* break;
|
||||
* case 'music-controls-seek-to':
|
||||
* const seekToInSeconds = JSON.parse(action).position;
|
||||
* MusicControls.updateElapsed({
|
||||
* this.musicControls.updateElapsed({
|
||||
* elapsed: seekToInSeconds,
|
||||
* isPlaying: true
|
||||
* });
|
||||
|
Loading…
Reference in New Issue
Block a user