diff --git a/ui/js/component/video/view.jsx b/ui/js/component/video/view.jsx index 10df6ea9a..f5cd375bd 100644 --- a/ui/js/component/video/view.jsx +++ b/ui/js/component/video/view.jsx @@ -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,