Redux #115
3 changed files with 6 additions and 3 deletions
|
@ -30,7 +30,7 @@ const select = (state) => ({
|
||||||
})
|
})
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
play: () => dispatch(doLoadVideo()),
|
loadVideo: () => dispatch(doLoadVideo()),
|
||||||
watchVideo: (elem) => dispatch(doWatchVideo()),
|
watchVideo: (elem) => dispatch(doWatchVideo()),
|
||||||
closeModal: () => dispatch(doCloseModal()),
|
closeModal: () => dispatch(doCloseModal()),
|
||||||
})
|
})
|
||||||
|
|
|
@ -95,7 +95,8 @@ class Video extends React.Component {
|
||||||
<span>this is the world's worst loading screen and we shipped our software with it anyway... <br /><br />{loadStatusMessage}</span> :
|
<span>this is the world's worst loading screen and we shipped our software with it anyway... <br /><br />{loadStatusMessage}</span> :
|
||||||
<VideoPlayer downloadPath={fileInfo.download_path} /> :
|
<VideoPlayer downloadPath={fileInfo.download_path} /> :
|
||||||
<div className="video__cover" style={{backgroundImage: 'url("' + metadata.thumbnail + '")'}}>
|
<div className="video__cover" style={{backgroundImage: 'url("' + metadata.thumbnail + '")'}}>
|
||||||
<WatchLink icon="icon-play" onWatchClick={this.onWatchClick.bind(this)} startPlaying={this.startPlaying.bind(this)} {...this.props}></WatchLink>
|
<WatchLink icon="icon-play" onWatchClick={this.onWatchClick.bind(this)}
|
||||||
|
startPlaying={this.startPlaying.bind(this)} {...this.props}></WatchLink>
|
||||||
</div>
|
</div>
|
||||||
}</div>
|
}</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -84,6 +84,8 @@ export const selectFetchingFileInfos = createSelector(
|
||||||
(state) => state.fetchingFileInfos || {}
|
(state) => state.fetchingFileInfos || {}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO make this smarter so it doesn't start playing and immediately freeze
|
||||||
|
// while downloading more.
|
||||||
export const selectCurrentUriFileReadyToPlay = createSelector(
|
export const selectCurrentUriFileReadyToPlay = createSelector(
|
||||||
selectCurrentUriFileInfo,
|
selectCurrentUriFileInfo,
|
||||||
(fileInfo) => (fileInfo || {}).written_bytes > 0
|
(fileInfo) => (fileInfo || {}).written_bytes > 0
|
||||||
|
|
Loading…
Reference in a new issue