Skip to content

Commit

Permalink
rename video component to fileViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
btzr-io authored and Sean Yesmunt committed Jul 10, 2018
1 parent 180cb7b commit 0f09210
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { makeSelectClientSetting, selectShowNsfw } from 'redux/selectors/settings';
import { selectMediaPaused, makeSelectMediaPositionForUri } from 'redux/selectors/media';
import { selectPlayingUri } from 'redux/selectors/content';
import Video from './view';
import FileViewer from './view';

const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
Expand Down Expand Up @@ -45,4 +45,7 @@ const perform = dispatch => ({
savePosition: (claimId, position) => dispatch(savePosition(claimId, position)),
});

export default connect(select, perform)(Video);
export default connect(
select,
perform
)(FileViewer);
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from 'react';
import classnames from 'classnames';
import type { Claim } from 'types/claim';
import LoadingScreen from 'component/common/loading-screen';
import VideoPlayer from './internal/player';
import VideoPlayButton from './internal/play-button';
import Player from './internal/player';
import PlayButton from './internal/play-button';

const SPACE_BAR_KEYCODE = 32;

Expand Down Expand Up @@ -42,7 +42,7 @@ type Props = {
mediaType: string,
};

class Video extends React.PureComponent<Props> {
class FileViewer extends React.PureComponent<Props> {
constructor() {
super();

Expand Down Expand Up @@ -156,7 +156,7 @@ class Video extends React.PureComponent<Props> {
<LoadingScreen status={loadStatusMessage} />
</div>
) : (
<VideoPlayer
<Player
filename={fileInfo.file_name}
poster={poster}
downloadPath={fileInfo.download_path}
Expand All @@ -183,7 +183,7 @@ class Video extends React.PureComponent<Props> {
className={layoverClass}
style={layoverStyle}
>
<VideoPlayButton
<PlayButton
play={e => {
e.stopPropagation();
this.playContent();
Expand All @@ -200,4 +200,4 @@ class Video extends React.PureComponent<Props> {
}
}

export default Video;
export default FileViewer;
6 changes: 4 additions & 2 deletions src/renderer/page/file/view.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
import { buildURI, normalizeURI, MODALS } from 'lbry-redux';
import Video from 'component/video';
import FileViewer from 'component/fileViewer';
import Thumbnail from 'component/common/thumbnail';
import FilePrice from 'component/filePrice';
import FileDetails from 'component/fileDetails';
Expand Down Expand Up @@ -167,7 +167,9 @@ class FilePage extends React.Component<Props> {
</section>
) : (
<section className="card">
{showFile && <Video className="content__embedded" uri={uri} mediaType={mediaType} />}
{showFile && (
<FileViewer className="content__embedded" uri={uri} mediaType={mediaType} />
)}
{!showFile &&
(thumbnail ? (
<Thumbnail shouldObscure={shouldObscureThumbnail} src={thumbnail} />
Expand Down

0 comments on commit 0f09210

Please sign in to comment.