我正在使用ReactJS并在我的网页上加载HTML 5视频。
我在IE 10中一直收到以下错误,并在加载页面时降低:
Unhandled promise rejection InvalidStateError
"Unhandled promise rejection"
显然IE 10在这里抛出错误:
componentDidMount() {
document.getElementById('video').currentTime = this.props.currentVideoFramePosition;
}
componentDidMount() {
document.getElementById('video').currentTime = this.props.currentVideoFramePosition;
}
render(){
const videoUrl = this.props.videoUrl;
return(
<div>
<div className="framegrab-videocontainer">
<img src="/assets/images/arrow_left_grab.svg" className="arrow-left" onClick={() => this.onArrowNavClick(-1)}></img>
<video id="video" src={videoUrl} className="framegrab-video" controls crossOrigin="anonymous" onPause={e => this.draw()} onSeeked={e => this.draw()} />
<img src="/assets/images/arrow_right_grab.svg" className="arrow-right" onClick={() => this.onArrowNavClick(1)}></img>
</div>
</div>
);
}