Redux #115

Merged
6ea86b96 merged 57 commits from redux into redux 2017-05-05 22:55:12 +02:00
3 changed files with 6 additions and 3 deletions
Showing only changes of commit 13008f5f31 - Show all commits

View file

@ -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()),
}) })

View file

@ -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>
); );

View file

@ -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