Integrate AirPlay and Chromecast

Ahoy!
i’ve an ionic v3 app for playing downloaded music (mp3) via @ionic-native/media.

How can i integrate AirPlay and Chromecast for routing the audio to remote speakers?

Regards
nowrap

1 Like

For iOS i integrated this cordova plugin:

Works nicely under iOS 11 and 12 so far.

Integration is really easy and works out-of-the-box with cordova-media:

declare var cordova: any;

initAirPlay(): void {
let me = this;
me.airplay = cordova.plugins.airplay;
me.airplay.airplayInit();
}

openAirPlay(): void {
let me = this;
me.airplay.airplayButtonPress();
}

Hope this helps anyone :wink:

P.S.: For Chromecast under Android i am still searching and trying