arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

Lost connection during playing songs #194

Closed roaugusto closed 1 year ago

roaugusto commented 6 years ago

Hey, maybe I have missed something, but It has a way to return the playing of the song after lost connection?

Do I need to coding something to catch this problem?

Thanks in advance!

arielfaur commented 6 years ago

@roaugusto There's no solution for this scenario so far. Depending on the media provider, playback should start when buffering is complete. If you use web audio provider then you could change the default preload strategy to auto so that the entire song is loaded before playback starts.

https://www.w3schools.com/tags/att_audio_preload.asp

this.myTracks = [{
      src: 'https://archive.org/download/JM2013-10-05.flac16/V0/jm2013-10-05-t12-MP3-V0.mp3',
      artist: 'John Mayer',
      title: 'Why Georgia',
      art: 'img/johnmayer.jpg',
      preload: 'auto' // tell the plugin to preload audio
    },
    ...