Skip to content

Commit

Permalink
reset nextAutoLevel once level has been loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
kanongil committed Nov 27, 2015
1 parent 4bf4d0f commit f14e0be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controller/abr-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ class AbrController {
}

if (this._nextAutoLevel !== -1) {
return Math.min(this._nextAutoLevel,maxAutoLevel);
var nextLevel = Math.min(this._nextAutoLevel,maxAutoLevel);
if (nextLevel === this.lastfetchlevel) {
this._nextAutoLevel = -1;
} else {
return nextLevel;
}
}

// follow algorithm captured from stagefright :
Expand Down

0 comments on commit f14e0be

Please sign in to comment.