Skip to content

Commit

Permalink
Pass through auto or falsey width and height to FilePlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Webmaster1116 committed Jul 13, 2017
1 parent 3c1f4f4 commit 202179f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ export default class FilePlayer extends Base {
this.player = player
}
render () {
const { url, loop, controls, fileConfig } = this.props
const { url, loop, controls, fileConfig, width, height } = this.props
const useAudio = AUDIO_EXTENSIONS.test(url) || fileConfig.forceAudio
const useHLS = this.shouldUseHLS(url)
const useDASH = this.shouldUseDASH(url)
const Element = useAudio ? 'audio' : 'video'
const src = url instanceof Array || useHLS || useDASH ? undefined : url
const style = {
width: '100%',
height: '100%',
width: !width || width === 'auto' ? width : '100%',
height: !height || height === 'auto' ? height : '100%',
display: url ? 'block' : 'none'
}
return (
Expand Down

0 comments on commit 202179f

Please sign in to comment.