As far as I can tell I am loading the correct resource. However when I try to play the sound using React Native Sound I am still getting the following error:
Argument 1 (RCTResponseSenderBlock) of RNSound.play must not be null
How to fix this error?
I've checked the variables holding the sound object and it looks like it is loaded:
LOG this.outgoingCall {"_duration": 18.1811875, "_filename": "http://localhost:8081/assets/assets/sounds/dialing.mp3?platform=ios&hash=717d95726264d7105360ce45119c9e0e", "_key": 35, "_loaded": true, "_numberOfChannels": 2, "_numberOfLoops": 0, "_pan": 0, "_pitch": 1, "_playing": false, "_speed": 1, "_volume": 1, "onPlaySubscription": {"remove": [Function remove]}, "registerOnPlay": [Function anonymous]}
LOG this.incomingCall {"_duration": 5.224458333333334, "_filename": "http://localhost:8081/assets/assets/sounds/calling.mp3?platform=ios&hash=0707a09b5a0268a9cb3e6f9b8d5b32ec", "_key": 36, "_loaded": true, "_numberOfChannels": 2, "_numberOfLoops": 0, "_pan": 0, "_pitch": 1, "_playing": false, "_speed": 1, "_volume": 1, "onPlaySubscription": {"remove": [Function remove]}, "registerOnPlay": [Function anonymous]}
LOG this.endCall {"_duration": 1.306, "_filename": "http://localhost:8081/assets/assets/sounds/end_call.mp3?platform=ios&hash=90aad40264cc274ce67046ab241054c0", "_key": 37, "_loaded": true, "_numberOfChannels": 2, "_numberOfLoops": 0, "_pan": 0, "_pitch": 1, "_playing": false, "_speed": 1, "_volume": 1, "onPlaySubscription": {"remove": [Function remove]}, "registerOnPlay": [Function anonymous]}
If you just continue until the end you will see the error when clicking the call button...
The sample code of ConnectyCube works perfectly but it uses old react navigation. Below is the link for ConnectyCube sample code:
https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChatConf
I basically just used the latest react navigation but the rest of the code is the same as the sample code of connectycube however it doesn't work the same....I am getting the React Native Sound Error...