Skip to content

Commit

Permalink
Render video element when poster is set
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Apr 4, 2018
1 parent 5e464c6 commit 7c16ed4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export class FilePlayer extends Component {
this.props.onSeek(e.target.currentTime)
}
shouldUseAudio (props) {
if (this.props.config.file.attributes.poster) {
return false // Use <video> so that poster is shown
}
return AUDIO_EXTENSIONS.test(props.url) || props.config.file.forceAudio
}
shouldUseHLS (url) {
Expand Down

0 comments on commit 7c16ed4

Please sign in to comment.