react-sound icon indicating copy to clipboard operation
react-sound copied to clipboard

onPause does not work on iOS when running in background

Open paulistoan opened this issue 2 years ago • 1 comments

Please see a sample app attached. Basically when playing on iOS, the onPause handler does not seem to get called when running in the background. By running in the background, I mean starting to play, then locking the screen and using the lock screen pause button to pause playback. Interestingly, with the HTML audio element it seems to work. I also included this in the sample app for comparison.

In order to reproduce, please start up the node server in a separate process so that it can receive background events and print them to stdout. Also, please include a real mp3 in the src and url properties in src/App.js.

demo.tar.gz

paulistoan avatar Jan 13 '24 18:01 paulistoan

Also found this past bug report, which is now resolved, might be of interest: https://bugs.webkit.org/show_bug.cgi?id=173332

paulistoan avatar Jan 14 '24 04:01 paulistoan