Issue #333 media switch fix #348

Merged
akinwale merged 2 commits from issue333 into master 2017-07-12 23:19:00 +02:00

View file

@ -14,6 +14,21 @@ class Video extends React.PureComponent {
};
}
componentWillReceiveProps(nextProps) {
// reset playing state upon change path action
if (!this.isMediaSame(nextProps) && this.state.isPlaying) {
this.state.isPlaying = false;
}
}
isMediaSame(nextProps) {
return (
this.props.fileInfo &&
nextProps.fileInfo &&
this.props.fileInfo.outpoint === nextProps.fileInfo.outpoint
);
}
startPlaying() {
this.setState({
isPlaying: true,