Closed KovendiMozes closed 1 week ago
You can PR it, i merge and deploy direct:)
I got stuck at the point where I don't have permission to push the branch I created.
If you'd rather do it yourself, here are the changes I need.
In my opinion: Meanwhile, I noticed that a few more places are missing this 'call' function, which would be good for added security.
iOS Reject:
if the condition "if" is not met https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L138 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L142 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L145
before return https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L187 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L197 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L207 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L216 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L237 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L262 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L273 https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/ios/Plugin/Plugin.swift#L283
Android Resolve: https://github.com/Cap-go/native-audio/blob/ec55599d65a29585d9b03ed5a829d0b9918926d9/android/src/main/java/ee/forgr/audio/NativeAudio.java#L396
Yes to push it was required to fork first, github is a bit dumb for that. We will look at it thanks
@KovendiMozes I did some fix: 1.if the condition "if" is not met:
I did also simplify the code to remove a lot of intrication of if, and put the error in IF instead of good cases.
https://github.com/Cap-go/native-audio/blob/e9b24a43cb9b66eded64c0550643930866e80c1d/ios/Plugin/Plugin.swift#L229
The linked code is missing the resolve() call and because of this I cannot wait for the promise to resolve in this function.
Could someone possibly fix this? Thank you in advance.