Not working on mobile
See original GitHub issueThe component works perfectly on desktop browsers but when i run my website on an Iphone with the last version of safari, or with an android running chrome the sounds are not being played, I am using React V16, and the version of this library is the: 0.6.4
this is the component i have for playing audio:
class Speaker extends Component{ render(){ var play = null; if(this.props.play) play = (<ReactAudioPlayer src={this.props.src} autoPlay style={{display:"none"}} onEnded={this.props.onEnded} />) return( <span> {play} </span> ) } }
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
Are you aware of the autoplay restrictions on mobile? For example on mobile Chrome: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
If you set
controls
, does it work when you hit the play button?Hi @justinmc, for some reason I was using this plugin about 5 months ago for my project to play recorded audio messages in mp3 format. Everything worked fine before, but when I came back to update my app, the audio just stopped playing on mobile. It works just fine on desktop chrome