Hi all,
i need to stream an mp3 from a server,but i’d like that the music starts immediatly.What are the best plugins to do this?
No plugin needed…
Just use typescript. you can additionally use setTimeout to control when your music will start playing.
In your constructor:
constructor(platform: Platform) {
this.platform = platform; this.platform.ready().then(() => {
setTimeout(() => {
this.playMusic();
}, 500);
}
no bro.i mean it’s better to use html5 audio or native cordova media?
native media player is more stable than html5 audio in general… people say it works on more devices than html5 audio.
ok thank u very much! i tryed to use media plugin but it doesn’t seem to work.it works with local audio file only? I Used it in this way.
this.media.create(encodedUri("myurl"));
but i think it is the wrong way.Suggestions?
Thx in advice again.
media plugin works with local files only… yes.