Open
Description
Event Click
just cannot trigger on mobile safari , and it may be changed to touch Event
and i did some change.
const videoProps = {
ref: v => this.video = v,
src: typeof this.props.src === 'string' ? this.props.src : null,
preload: this.props.preload,
poster: this.props.poster,
muted: this.props.muted,
loop: this.props.loop,
+ onTouchStart:this.props.onClick,
onTimeUpdate: this._handleTimeUpdate,
onEnded: this._handleVideoEnd,
...Object.assign(this.props.extraVideoElementProps, { playsInline: this.props.playsInline })
};
return (
<div
ref={r => this.container = r}
className={`BackgroundVideo ${this.props.className}`}
style={Object.assign({ ...absolute100, visibility }, this.props.style)}
- onClick={this.props.onClick}
+ // onClick={this.props.onClick}
onKeyPress={this.props.onKeyPress}
tabIndex={this.props.tabIndex}
>
Metadata
Metadata
Assignees
Labels
No labels