Here are the instructions:
- Create a blank Ionic app (for example, MediaPlayer) and cd to that folder, as shown here:
$ ionic start MediaPlayer blank $ cd MediaPlayer
- Install the Music Control plugin and it's Ionic Native wrapper using the following command:
$ ionic cordova plugin add cordova-plugin-music-controls$ npm install --save @ionic-native/music-controls
- Open ./src/pages/home/home.html and replace with the following code:
<ion-header> <ion-navbar> <ion-title> Music Player </ion-title> </ion-navbar></ion-header><ion-content padding> <ion-item> <ion-thumbnail item-left> <img src="{{track.art}}"> </ion-thumbnail> <div item-content style="width:100%"> <p><strong>{{track.title}}</strong> ⚬ <em>{{track.artist}}</em></p> ...