-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video overlay #825
Closed
Closed
Video overlay #825
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
65b077c
Base commit
hackrush01 d12bc9d
Video displays on all pages except different show page
hackrush01 d329e39
Overlays the video properly
hackrush01 ffaeae6
Working Video Overlay
hackrush01 5e8c0c5
Clean-up
hackrush01 5d7a69c
Made new component for overlay and other clean-up
hackrush01 b75f41e
Attempt at resumable playback
hackrush01 d8b9fb7
Resumable playback working
hackrush01 1da82cc
Finalized changes and renamed certain CSS elements
hackrush01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
src/renderer/js/component/video/internal/loading-screen.jsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { connect } from "react-redux"; | ||
import { | ||
makeSelectFileInfoForUri, | ||
makeSelectDownloadingForUri, | ||
makeSelectLoadingForUri, | ||
} from "redux/selectors/file_info"; | ||
import { selectCurrentPage } from "redux/selectors/navigation"; | ||
import { selectPlayingUri } from "redux/selectors/content"; | ||
import VideoOverlay from "./view"; | ||
|
||
const select = (state, props) => ({ | ||
playingUri: selectPlayingUri(state), | ||
currentPage: selectCurrentPage(state), | ||
isDownloading: uri => makeSelectDownloadingForUri(uri)(state), | ||
isLoading: uri => makeSelectLoadingForUri(uri)(state), | ||
fileInfo: uri => makeSelectFileInfoForUri(uri)(state), | ||
}); | ||
|
||
export default connect(select, null)(VideoOverlay); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import Media from "component/media"; | ||
|
||
class VideoOverlay extends React.PureComponent { | ||
render() { | ||
const { playingUri, currentPage } = this.props; | ||
|
||
const isDownloading = this.props.isDownloading(playingUri); | ||
const isLoading = this.props.isLoading(playingUri); | ||
const fileInfo = this.props.fileInfo(playingUri); | ||
const haveFileInfo = fileInfo && fileInfo.written_bytes > 0; | ||
|
||
const isReadyToPlay = (haveFileInfo || isDownloading) && !isLoading; | ||
|
||
if (isReadyToPlay && playingUri !== null && currentPage !== "show") { | ||
return <Media overlay={true} uri={playingUri} />; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
|
||
export default VideoOverlay; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the
<Spinner />
componentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed one thing. We already have a
common.js
file here(file 1), but the<Spinner />
component comes from here(folder 1), a new common folder with just that component.Are we breaking down file 1 to individual components and putting them in folder 1? Or should I include
<Spinner />
component in file 1. The latter option is better IMO as then we don't have to include different files for each "common" component, unless former is better for some use cases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackrush01 @seanyesmunt @liamcardenas I think
common.js
should die and these should all just be individual components.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree