diff --git a/src/renderer/component/fileViewer/internal/player.jsx b/src/renderer/component/fileViewer/internal/player.jsx index 8d3bf07b9..d76d0bcaf 100644 --- a/src/renderer/component/fileViewer/internal/player.jsx +++ b/src/renderer/component/fileViewer/internal/player.jsx @@ -46,6 +46,7 @@ class MediaPlayer extends React.PureComponent { const loadedMetadata = () => { this.setState({ hasMetadata: true, startedPlaying: true }); + if (startedPlayingCb) { startedPlayingCb(); } diff --git a/src/renderer/component/fileViewer/view.jsx b/src/renderer/component/fileViewer/view.jsx index 57cab3463..aed32f07c 100644 --- a/src/renderer/component/fileViewer/view.jsx +++ b/src/renderer/component/fileViewer/view.jsx @@ -146,7 +146,12 @@ class FileViewer extends React.PureComponent { } playContent() { - const { play, uri } = this.props; + const { play, uri, fileInfo, isDownloading, isLoading } = this.props; + + if (fileInfo || isDownloading || isLoading) { + // User may have pressed download before clicking play + this.startedPlayingCb = null; + } if (this.startedPlayingCb) { this.startTime = Date.now();