Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on iOS; #161

Open
paulovargatt opened this issue Nov 22, 2019 · 9 comments
Open

Does not work on iOS; #161

paulovargatt opened this issue Nov 22, 2019 · 9 comments

Comments

@paulovargatt
Copy link

I have problems trying to implement this plugin on IOS, all attempts I made were unsuccessful, on android works!

I tried to start this plugin without media, with video, with audio, both situations realize that it is the webview that creates the controls and not the plugin, the next and back controls are always disabled! I can't manipulate these controls created by webview? Or is there a way to replace these controls with this plugin?
Image of Yaktocat

@Carlosps
Copy link

Have you figured out any solution?

@paulovargatt
Copy link
Author

paulovargatt commented Jan 20, 2020

the plugin works. but when we play something via html "video" or "audio" the webview replaces the notification control, my solution was to reproduce natively through cordova media plugin , for example.

@Ekaanth
Copy link

Ekaanth commented Feb 3, 2020

HI,

It works perfectly fine for android but im not able to reproduce the same in IOS13. im getting an error as:

2020-02-03 12:26:40.340707+0100 MyApp[97946:801552] *** Assertion failure in -[MPRemoteCommand addTarget:action:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/MediaPlayer_Sim/MobileMusicPlayer-4017.200.33/SDK/MPRemoteCommand.m:134
2020-02-03 12:26:40.448833+0100 MyApp[97946:801552] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported action method signature. Must return MPRemoteCommandHandlerStatus or take a completion handler as the second argument.'

Any idea why im getting this error?

Thanks in advance :)

@marcorubagotti
Copy link

HI,

It works perfectly fine for android but im not able to reproduce the same in IOS13. im getting an error as:

2020-02-03 12:26:40.340707+0100 MyApp[97946:801552] *** Assertion failure in -[MPRemoteCommand addTarget:action:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/MediaPlayer_Sim/MobileMusicPlayer-4017.200.33/SDK/MPRemoteCommand.m:134
2020-02-03 12:26:40.448833+0100 MyApp[97946:801552] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported action method signature. Must return MPRemoteCommandHandlerStatus or take a completion handler as the second argument.'

Any idea why im getting this error?

Thanks in advance :)

same problem i think, the control not working on ios. there is a possibility of a new working release?

@Ekaanth
Copy link

Ekaanth commented Feb 7, 2020

Hi @marcorubagotti

I was able to solve the issue and I have my own code in my rep, which is a fork of main repo and it works perfectly fine for both android 10 and ios 13. I would suggest you try that plugin.

cordova plugin add https://github.com/Ekaanth/cordova-music-controls-plugin

You can also check my repo :)

Thanks

@cq-osaf-ali
Copy link

cq-osaf-ali commented Jul 29, 2020

can you tell how can i install your version in my project as i did the music-controls using npm and having same error as yours but i can't install with npm . i'm new to this and need some help. should i simply copy paste the files in already installed plugin?

@Ekaanth
Copy link

Ekaanth commented Jul 30, 2020

can you tell how can i install your version in my project as i did the music-controls using npm and having same error as yours but i can't install with npm . i'm new to this and need some help. should i simply copy paste the files in already installed plugin?

As I have said you can use 'cordova pugin add https://github.com/Ekaanth/cordova-music-controls-plugin' this command to add my plugin and if you check in your package.json you should have my repo URL.

@cq-osaf-ali
Copy link

ahh thanks

@ShaunBrassell
Copy link

Mine was not showing at all on IOS, only on Android. I was using cordova-media-plugin to play. My fix was to edit the media plugin and add withOptions: 0 to the audio session, then it appeared! ...

AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayback withOptions:0 error:nil];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants