indiecastfm / react-native-audio-streamer

A react-native audio streaming module which works on both iOS & Android
MIT License
132 stars 50 forks source link

Network issues #2

Open jasongrishkoff opened 7 years ago

jasongrishkoff commented 7 years ago

I've noticed that if my network goes wonky or I lose signal, the songs get all messed up. They often stop halfway through. I've tried the following:

1) Create a NetworkHelper to detect connectivity 2) When the onLoadError fires, I use the NetworkHelper to determine if the phone is online. 3) If it isn't online, I put the thread to sleep for 5 seconds and then try player.setPlayWhenReady(true)

This doesn't really seem to be that effective. Wondering what your thoughts are around this?

Also noticed that you guys are working in a much newer branch -- any plans to merge that into master?

victor36max commented 7 years ago

Sorry for late response. I would like to invite @rikochet to reply Android questions

victor36max commented 7 years ago

And yes we are working on the media-caching branch that can do audio caching.

e.g. caching the latest 50 songs streamed so users don't need to download again.

We are using this branch on our app indiecast.fm right now. We will merge it soon.

jhilden commented 7 years ago

@victor36max thank you for a very nice library. I was wondering what the current state of media-chaching (and the other caching branches) is? Are they ready to be used, are you still planning to merge them?