Ionic Media Plugin is taking too much long time to load the audio from URL.It is taking approx 30 to 40 seconds initially.
Please tell me is there is any way to stream the music properly so that it starts playing after 5 to 10 seconds of delay in start.
This is my code which I am using:-
import {Media , MediaObject } from '@ionic-native/media';
@Component({
selector: 'page-audio',
templateUrl: 'audiolist.html'
})
export class AudioPage {
radio: MediaObject ;
constructor(public navCtrl: NavController,private media: Media) {
this.tracks = [
{title: 'Something About You',path:'http://www.noiseaddicts.com/samples_1w72b820/2558.mp3',playing: false, progress: 0},
{title: 'Run',playing: false, path:'http://www.noiseaddicts.com/samples_1w72b820/2537.mp3',progress: 0},
{title: 'Breate', playing: false, path:'assets/sounds/audiothree.mp3',progress: 0},
];
}
async playTrack(track){
this.radio = new MediaPlugin(track.path);
this.radio.play();
}
}