Skip to content

Commit

Permalink
Prevent IndexSizeError in FilePlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Jan 4, 2016
1 parent 647fa9e commit ba31958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class FilePlayer extends Base {
return this.player.currentTime / this.player.duration
}
getFractionLoaded () {
if (!this.isReady) return null
if (!this.isReady || this.player.buffered.length === 0) return null
return this.player.buffered.end(0) / this.player.duration
}
render () {
Expand Down

0 comments on commit ba31958

Please sign in to comment.