cordova-music-controls-plugin
cordova-music-controls-plugin copied to clipboard
Plugin didn't work on iOS 11.4
This is my code at the function onDeviceReady:
MusicControls.create({
track : 'Test', // optional, default : ''
artist : 'Test', // optional, default : ''
cover : 'img/logo-playing.png', // optional, default : nothing
isPlaying : false, // optional, default : true
dismissable : false, // optional, default : false
// hide previous/next/close buttons:
hasPrev : false, // show previous button, optional, default: true
hasNext : false, // show next button, optional, default: true
hasClose : true, // show close button, optional, default: false
// iOS only, optional
album : 'Test', // optional, default: ''
duration : 20, // optional, default: 0
elapsed : 1, // optional, default: 0
hasSkipForward : false, //optional, default: false. true value overrides hasNext.
hasSkipBackward : false, //optional, default: false. true value overrides hasPrev.
skipForwardInterval : 0, //optional. default: 0.
skipBackwardInterval : 0, //optional. default: 0.
hasScrubbing : true, //optional. default to false. Enable scrubbing from control center progress bar
// Android only, optional
// text displayed in the status bar when the notification (and the ticker) are updated
ticker : 'Test',
//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'
}, onSuccess, onError);
On ANDROID works find, but on iOS didn't work. Someone has the solution?
Thank you folks.
same problem, iOS 12
This is working fine for my apps in both iOS 11 and 12. The most common cause for nothing appearing is if one of the values is null or path to the coverart is not accessible to the plugin. Give it a try just with some static values and using coverart from a remote HTTP:// server that is known to be accessible from the device.
Also make sure to test on a real device, the emulator is really flakey and inconsistent in it's behaviour with lockscreen and control center.
This is working fine for my apps in both iOS 11 and 12. The most common cause for nothing appearing is if one of the values is null or path to the coverart is not accessible to the plugin. Give it a try just with some static values and using coverart from a remote HTTP:// server that is known to be accessible from the device.
Also make sure to test on a real device, the emulator is really flakey and inconsistent in it's behaviour with lockscreen and control center.
Hi @ghenry22
Can you share your code because I have the same issue on 2 differents apps. (one old and one new). It worked on the new but since iOS12, it does not work. Thanks,
I have tried it with static values and cover from a remote HTTP:// but still no luck
Is there anybody at all who has this running on iOS 12?