Error handling
zzarcon opened this issue · 0 comments
zzarcon commented
Different error might happen while trying to play the audio:
- Malformed src
- src pointing to a remote file without CORS
- autoPlay: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
We should handle those accordingly and notify consumer:
import MicDrop from 'react-micdrop'
<MicDrop
src="nope"
isPlaying={this.state.isPlaying}
onError={() => this.setState({isPlaying: false})}
/>