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 currentMs = this.get();
|
||||||
var newMs = currentMs + ms;
|
var newMs = currentMs + ms;
|
||||||
this.set(newMs);
|
this.set(newMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player.prototype.seekBack = function(ms) {
|
Player.prototype.seekBack = function(ms) {
|
||||||
var currentMs = this.get();
|
var currentMs = this.get();
|
||||||
var newMs = currentMs - ms;
|
var newMs = currentMs - ms;
|
||||||
this.set(newMs);
|
this.set(newMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function VideoPlayer() {
|
function VideoPlayer() {
|
||||||
|
@ -42,14 +42,14 @@ VideoPlayer.prototype.volUp = function() {
|
||||||
if (vol <= 0.9) { var newVol = vol + 0.1 } else { return false; }
|
if (vol <= 0.9) { var newVol = vol + 0.1 } else { return false; }
|
||||||
this.player.volume = newVol;
|
this.player.volume = newVol;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoPlayer.prototype.volDown = function() {
|
VideoPlayer.prototype.volDown = function() {
|
||||||
var vol = this.player.volume;
|
var vol = this.player.volume;
|
||||||
if (vol >= 0.1) { var newVol = vol - 0.1 } else { return false; }
|
if (vol >= 0.1) { var newVol = vol - 0.1 } else { return false; }
|
||||||
this.player.volume = newVol;
|
this.player.volume = newVol;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoPlayer.prototype.set = function(pos) {
|
VideoPlayer.prototype.set = function(pos) {
|
||||||
this.player.currentTime = pos;
|
this.player.currentTime = pos;
|
||||||
|
@ -59,7 +59,7 @@ VideoPlayer.prototype.set = function(pos) {
|
||||||
VideoPlayer.prototype.get = function() {
|
VideoPlayer.prototype.get = function() {
|
||||||
try {
|
try {
|
||||||
return this.player.currentTime;
|
return this.player.currentTime;
|
||||||
} catch(err) { }
|
} catch(err) { }
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ VideoPlayer.prototype.togglePause = function() {
|
||||||
} else {
|
} else {
|
||||||
Video.play();
|
Video.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoPlayer.prototype.listener = function() {
|
VideoPlayer.prototype.listener = function() {
|
||||||
$('#timeCode').html(Ox.formatDuration(Video.get(), 3));
|
$('#timeCode').html(Ox.formatDuration(Video.get(), 3));
|
||||||
|
|
Loading…
Add table
Reference in a new issue