space
This commit is contained in:
parent
17a74231aa
commit
030aaeb910
1 changed files with 41 additions and 41 deletions
12
js/player.js
12
js/player.js
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue