react-native-audio-streaming icon indicating copy to clipboard operation
react-native-audio-streaming copied to clipboard

Add a callback?

Open XavierColombel opened this issue 7 years ago • 3 comments

It would be interesting to add a callback in order to execute another function after the play function is executed. I think about loading name/artwork song after loading music in player. Today, I use setTimeout.

XavierColombel avatar Nov 16 '16 11:11 XavierColombel

I'm guessing setTimeout doesn't work when the app is backgrounded?

jasongrishkoff avatar Nov 16 '16 11:11 jasongrishkoff

it's 200ms after playing stream so I guess user has not the time to put app in background. Anyway, I'm looking for a better solution because setTimeout is a temporary fix.

XavierColombel avatar Nov 16 '16 11:11 XavierColombel

Any prediction when will add the callback feature?

Cuz the setTimeout can work fine to local files, but for network stream this is not precise, even when device is offline, the status return PLAYING... 😢

theinvensi avatar Jun 25 '17 20:06 theinvensi