Hi.
I’m currently working on a recently updated Ionic app.
It’s currently in IONIC 6 version.
I have to add some custom controls on earbuds input.
According to the documentation (https://ionicframework.com/docs/v5/native/music-controls) it is possible with music control (https://github.com/ghenry22/cordova-plugin-music-controls2).
I’ve tried on Android and it work perfectly !
But I can’t manage to trigger any earbud event on IOS.
I saw that the ionic documentation for music control is for Ionic v5.
I asked on the Ionic Discord if it is still available for Ionic v6 they said it should be but I should ask here.
I wondered that the problem could be linked to my app, so I just created a blank app but still no event triggered on iOS.
home.page.ts
`
import { Component } from '@angular/core';
import { MusicControls } from '@awesome-cordova-plugins/music-controls/ngx';
Hi. I’m currently working on a recently updated Ionic app. It’s currently in IONIC 6 version. I have to add some custom controls on earbuds input. According to the documentation (https://ionicframework.com/docs/v5/native/music-controls) it is possible with music control (https://github.com/ghenry22/cordova-plugin-music-controls2). I’ve tried on Android and it work perfectly ! But I can’t manage to trigger any earbud event on IOS. I saw that the ionic documentation for music control is for Ionic v5. I asked on the Ionic Discord if it is still available for Ionic v6 they said it should be but I should ask here. I wondered that the problem could be linked to my app, so I just created a blank app but still no event triggered on iOS.
home.page.ts ` import { Component } from '@angular/core'; import { MusicControls } from '@awesome-cordova-plugins/music-controls/ngx';
@Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage {
constructor(private musicControls: MusicControls) {}
ngOnInit() {
}
ngOnDestroy() { this.musicControls.destroy(); } } `