gshotwell / shambhala_app_issues

A public repository for discussion about Shambhala App issues and new features
1 stars 0 forks source link

Player not advancing to next block in background mode #22

Closed gshotwell closed 7 years ago

gshotwell commented 7 years ago

When you lock the device it will play the end of the current gong or contemplation, but not advance to the next block

gshotwell commented 7 years ago

Ah, it looks like this is an Apple TOS issue. I don't know how to fix this. https://github.com/ocetnik/react-native-background-timer/issues/9

https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

gshotwell commented 7 years ago

I think this might be doable if I keep a silent sound running throughout the whole timer, so two tracks playing, one of which is a silent sound which repeats and has a volume of zero, the other is the actual session track.

gshotwell commented 7 years ago

Works! It seems like if I do a console log when the video loads it plays properly. I have no idea why this works but I'll take it.

gshotwell commented 7 years ago

Doesn't work! Looks like I need to refactor to have everything on RN Sound as they are enabling loading sounds from the network

gshotwell commented 7 years ago

https://github.com/zmxv/react-native-sound/issues/134

gshotwell commented 7 years ago

Boy this is a tough issue. The big issue is that we need to preload each block file, but at the same time we need to make sure that we don't have a hundred sounds loaded up. So we need some process to load sounds a fe blocks ahead of time, so that there aren't any gaps when they play.

Here is my current plan:

Test cases: