react-mp3-recorder
react-mp3-recorder copied to clipboard
doesn't work in the android browser
it works on desktop browser
I have the same issue, any solution?
This is due to the component's button only handling the events onMouseDown
and onMouseUp
which are click events that I guess don't work on mobile. This is new to me but I'd suggest forking and making onTouchStart
and onTouchEnd
events that do the same thing as the mouse clicks. To do this change the button div in lines 56-60 to be
<div
className={styles.button}
onTouchStart={this._onMouseDown}
onTouchEnd={this._onMouseUp}
onMouseDown={this._onMouseDown}
onMouseUp={this._onMouseUp}
>
<img src={micIcon} width={24} height={24} />
</div>
Not sure this will work but it's what I'm going to try. I'll update when I get it working.