Skip to content

Commit

Permalink
fixed width & height of video when it is in fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnguyen11 committed Feb 12, 2017
1 parent a6191cf commit f966a15
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
48 changes: 25 additions & 23 deletions src/demo/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,29 +93,31 @@ export default class App extends Component {
<div className='app'>
<section className='section'>
<h1>ReactPlayer Demo</h1>
<ReactPlayer
ref={player => { this.player = player }}
className='react-player'
width={480}
height={270}
url={url}
playing={playing}
playbackRate={playbackRate}
volume={volume}
soundcloudConfig={soundcloudConfig}
vimeoConfig={vimeoConfig}
youtubeConfig={youtubeConfig}
fileConfig={fileConfig}
onReady={() => console.log('onReady')}
onStart={() => console.log('onStart')}
onPlay={() => this.setState({ playing: true })}
onPause={() => this.setState({ playing: false })}
onBuffer={() => console.log('onBuffer')}
onEnded={() => this.setState({ playing: false })}
onError={e => console.log('onError', e)}
onProgress={this.onProgress}
onDuration={duration => this.setState({ duration })}
/>
<div className='video-player'>
<ReactPlayer
ref={player => { this.player = player }}
className='react-player'
width={'100%'}
height={'100%'}
url={url}
playing={playing}
playbackRate={playbackRate}
volume={volume}
soundcloudConfig={soundcloudConfig}
vimeoConfig={vimeoConfig}
youtubeConfig={youtubeConfig}
fileConfig={fileConfig}
onReady={() => console.log('onReady')}
onStart={() => console.log('onStart')}
onPlay={() => this.setState({ playing: true })}
onPause={() => this.setState({ playing: false })}
onBuffer={() => console.log('onBuffer')}
onEnded={() => this.setState({ playing: false })}
onError={e => console.log('onError', e)}
onProgress={this.onProgress}
onDuration={duration => this.setState({ duration })}
/>
</div>

<table><tbody>
<tr>
Expand Down
5 changes: 5 additions & 0 deletions src/demo/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ $gutter-width: 10px;
vertical-align: top;
}

.video-player {
width: 480px;
height: 270px
}

.react-player {
margin-bottom: 10px;
background: rgba($black, .1);
Expand Down

0 comments on commit f966a15

Please sign in to comment.