diff --git a/src/renderer/component/video/index.js b/src/renderer/component/video/index.js index 1b79f8275..b709dd691 100644 --- a/src/renderer/component/video/index.js +++ b/src/renderer/component/video/index.js @@ -14,7 +14,7 @@ import { } from "redux/selectors/file_info"; import { makeSelectCostInfoForUri } from "redux/selectors/cost_info"; import { selectShowNsfw } from "redux/selectors/settings"; -import { selectVideoPause } from "redux/selectors/video"; +// import { selectVideoPause } from "redux/selectors/video"; import Video from "./view"; import { selectPlayingUri } from "redux/selectors/content"; @@ -28,7 +28,7 @@ const select = (state, props) => ({ playingUri: selectPlayingUri(state), contentType: makeSelectContentTypeForUri(props.uri)(state), volume: selectVolume(state), - videoPause: selectVideoPause(state), + // videoPause: selectVideoPause(state), }); const perform = dispatch => ({ diff --git a/src/renderer/component/video/internal/player.jsx b/src/renderer/component/video/internal/player.jsx index 5c885bc80..d18733aec 100644 --- a/src/renderer/component/video/internal/player.jsx +++ b/src/renderer/component/video/internal/player.jsx @@ -124,9 +124,10 @@ class VideoPlayer extends React.PureComponent { } } - pauseVideo() { - console.log("pauseVideo called"); - this.refs.media.children[0].pause(); + componentWillReceiveProps() { + console.log("!!VIDEO PLAYA RECIEVE PROPS:", this.props); + // console.log("pauseVideo called"); + // this.refs.media.children[0].pause(); } componentDidUpdate() { @@ -176,19 +177,28 @@ class VideoPlayer extends React.PureComponent { return (
- {["audio", "application"].indexOf(mediaType) !== -1 && - (!this.playableType() || hasMetadata) && - !unplayable && } - {this.playableType() && - !hasMetadata && - !unplayable && } - {unplayable && ( - - )} -
+

videoPause: {videoPause}

+
+ {["audio", "application"].indexOf(mediaType) !== -1 && + (!this.playableType() || hasMetadata) && + !unplayable && ( + + )} + {this.playableType() && + !hasMetadata && + !unplayable && } + {unplayable && ( + + )} +
+
); } } -export default VideoPlayer; +const select = (state, props) => ({ + videoPause: selectVideoPause(state), +}); + +export default connect(select, {})(VideoPlayer); diff --git a/src/renderer/component/video/view.jsx b/src/renderer/component/video/view.jsx index 515a6c8e3..72e0e164d 100644 --- a/src/renderer/component/video/view.jsx +++ b/src/renderer/component/video/view.jsx @@ -57,10 +57,10 @@ class Video extends React.PureComponent { changeVolume, volume, uri, - videoPause, + // videoPause, } = this.props; - console.log("VIDEO VIEW videoPause:", videoPause); + // console.log("VIDEO VIEW videoPause:", videoPause); const isPlaying = playingUri === uri; const isReadyToPlay = fileInfo && fileInfo.written_bytes > 0; @@ -114,7 +114,6 @@ class Video extends React.PureComponent { downloadCompleted={fileInfo.completed} changeVolume={changeVolume} volume={volume} - videoPause={videoPause} /> ))} {!isPlaying && (