Closed mariusbolik closed 2 years ago
@mariusbolik Hello, add duration property which is required now and it will be fixed :)
Like this:
import { CapacitorMusicControls } from 'capacitor-music-controls-plugin-new';
...
CapacitorMusicControls.create({
track: 'Lorem Ipsum',
ticker: 'Lorem Ipsum',
artist: 'Lorem Ipsum',
album: 'Lorem Ipsum',
cover: 'https://dummyimage.com/300/09f/fff.png',
hasPrev: false,
hasNext: false,
hasSkipForward: true,
hasSkipBackward: true,
skipForwardInterval : 15,
skipBackwardInterval : 15,
hasScrubbing: true,
isPlaying : true,
dismissable : false,
duration : 0,
}).then(() => {
console.log('Media Session initialized');
}).catch(e => {
console.log(e);
});
Worked! Thank you!
Hello, thank you for this plugin. Sadly, the controls aren't showing on my Android (8.1.0) Device. This is how I use the plugin:
AndroidManifest.xml
MainActivity.java