【发布时间】:2018-07-05 14:54:10
【问题描述】:
我正在使用 dashjs 开发 reactjs 项目,用于播放视频文件。当我在 attachView() 函数中切换视频时出现以下错误。
console click here for more details 我正在使用以下代码: 组件WillReceiveProps(nextProps) {
//console.log("nextprops", nextProps);
this.setState({ show: false });
setTimeout(function () { this.setState({ show: true }); }.bind(this), 500)
if (this.state.show && !nextProps.safari && nextProps.videoURL && nextProps.videoURL !== this.props.videoURL) {
setTimeout(function () {
this.player.reset();
this.player.attachView(this.video);
this.player.attachSource(nextProps.videoURL);
this.setState({ volume: this.player.getVolume() });
}.bind(this), 2000)
}
}
【问题讨论】:
-
如果您有办法将您在问题中看到的错误以文本形式分享给edit。