pwbrown/react-native-ios-network-audio

initWithURL hard fails when receiving a null or empty url.

jwise7 opened this issue · 1 comments

at least add something like: if(!([url length]>0)) return; to the first line of the function to fail fast.

Problem is that the function "hangs" when audoio.initWithUrl() gets no result.
I used the Timeout functionality to handle he exception:

    this.timer = setTimeout(() => {
        this.setState({timeout: true});
    }, 5000);

In the render() function is catch the timeout state