Videos playing properly immediately after purchase
This commit is contained in:
parent
0d658b2767
commit
13008f5f31
3 changed files with 6 additions and 3 deletions
|
@ -30,7 +30,7 @@ const select = (state) => ({
|
|||
})
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
play: () => dispatch(doLoadVideo()),
|
||||
loadVideo: () => dispatch(doLoadVideo()),
|
||||
watchVideo: (elem) => dispatch(doWatchVideo()),
|
||||
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> :
|
||||
<VideoPlayer downloadPath={fileInfo.download_path} /> :
|
||||
<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>
|
||||
);
|
||||
|
|
|
@ -84,6 +84,8 @@ export const selectFetchingFileInfos = createSelector(
|
|||
(state) => state.fetchingFileInfos || {}
|
||||
)
|
||||
|
||||
// TODO make this smarter so it doesn't start playing and immediately freeze
|
||||
// while downloading more.
|
||||
export const selectCurrentUriFileReadyToPlay = createSelector(
|
||||
selectCurrentUriFileInfo,
|
||||
(fileInfo) => (fileInfo || {}).written_bytes > 0
|
||||
|
|
Loading…
Reference in a new issue