Skip to content

Commit

Permalink
Simple adjustment of get nextAutoLevel to account for playback rate.
Browse files Browse the repository at this point in the history
  • Loading branch information
JHartman5 committed May 27, 2016
1 parent c5751f2 commit 272c7f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controller/abr-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ class AbrController extends EventHandler {
}

get nextAutoLevel() {
var lastbw = this.lastbw, hls = this.hls,adjustedbw, i, maxAutoLevel;
let hls = this.hls,
v = hls.media,
playbackRate = ((v && v.playbackRate !== 0) ? Math.abs(v.playbackRate) : 1.0),
lastbw = this.lastbw / playbackRate;
var adjustedbw, i, maxAutoLevel;
if (this._autoLevelCapping === -1 && hls.levels && hls.levels.length) {
maxAutoLevel = hls.levels.length - 1;
} else {
Expand Down

0 comments on commit 272c7f6

Please sign in to comment.