Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from SemmLille/ptitloup/hotfix-player-resolution
Browse files Browse the repository at this point in the history
improve bandwith detection adding 1 seconds for first progress and add pause if player is paused when changing resolution
  • Loading branch information
Ptitloup committed May 4, 2015
2 parents a6f2558 + 706f477 commit 58c8b16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pod_project/core/static/JS/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ function progress() {
if (seconds != previoustime && howMuchIsDownloaded < 1) {
intcheck++;
var lapstime = seconds - previoustime;
if(previoustime==0) lapstime = 1;
var downloaded = filesize * howMuchIsDownloaded;
var laspdl = downloaded - previousuploaded;
mediumspeed = mediumspeed + Math.round((laspdl / lapstime) / 1000);
Expand Down
2 changes: 2 additions & 0 deletions pod_project/core/static/JS/video-quality-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@
player.addClass('vjs-has-started');
if (!is_paused) {
player.play();
} else {
player.pause();
}
});
// Save the newly selected resolution in our player options property
Expand Down

0 comments on commit 58c8b16

Please sign in to comment.