cordova-music-controls-plugin icon indicating copy to clipboard operation
cordova-music-controls-plugin copied to clipboard

Plugin didn't work on iOS 11.4

Open abnersoares opened this issue 6 years ago • 5 comments

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.

screen shot 2018-10-20 at 1 54 53 pm

abnersoares avatar Oct 20 '18 04:10 abnersoares

same problem, iOS 12

paulovargatt avatar Oct 29 '18 14:10 paulovargatt

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.

ghenry22 avatar Dec 01 '18 03:12 ghenry22

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,

dupphil avatar Dec 03 '18 12:12 dupphil

I have tried it with static values and cover from a remote HTTP:// but still no luck

rijink7 avatar Dec 06 '18 05:12 rijink7

Is there anybody at all who has this running on iOS 12?

tbergeron avatar Apr 02 '19 01:04 tbergeron