This commit is contained in:
j 2016-02-29 17:44:01 +05:30
parent 17a74231aa
commit 030aaeb910

View file

@ -16,13 +16,13 @@ Player.prototype.seekFwd = function(ms) {
var currentMs = this.get();
var newMs = currentMs + ms;
this.set(newMs);
}
}
Player.prototype.seekBack = function(ms) {
var currentMs = this.get();
var newMs = currentMs - ms;
this.set(newMs);
}
}
function VideoPlayer() {
@ -42,14 +42,14 @@ VideoPlayer.prototype.volUp = function() {
if (vol <= 0.9) { var newVol = vol + 0.1 } else { return false; }
this.player.volume = newVol;
return true;
}
}
VideoPlayer.prototype.volDown = function() {
var vol = this.player.volume;
if (vol >= 0.1) { var newVol = vol - 0.1 } else { return false; }
this.player.volume = newVol;
return true;
}
}
VideoPlayer.prototype.set = function(pos) {
this.player.currentTime = pos;
@ -59,7 +59,7 @@ VideoPlayer.prototype.set = function(pos) {
VideoPlayer.prototype.get = function() {
try {
return this.player.currentTime;
} catch(err) { }
} catch(err) { }
return -1;
}
@ -79,7 +79,7 @@ VideoPlayer.prototype.togglePause = function() {
} else {
Video.play();
}
}
}
VideoPlayer.prototype.listener = function() {
$('#timeCode').html(Ox.formatDuration(Video.get(), 3));