When getting the duration on iOS, if the player is not on the map, it will not reject the promise correctly and leak it.
Also, all usage of NSError() in reject ton iOS crashes the app. I tested the below (on simulator iOS 17), and it does not work. Using nil instead correctly rejects the promise and does not crash the app.
When getting the duration on iOS, if the player is not on the map, it will not reject the promise correctly and leak it.
Also, all usage of
NSError()
in reject ton iOS crashes the app. I tested the below (on simulator iOS 17), and it does not work. Usingnil
instead correctly rejects the promise and does not crash the app.Please take a look at the fixes in the following PR: https://github.com/SimformSolutionsPvtLtd/react-native-audio-waveform/pull/117