diff --git a/source/Ox.UI/js/Video/Ox.SmallVideoTimeline.js b/source/Ox.UI/js/Video/Ox.SmallVideoTimeline.js index 63ce2ce4..9377a3c1 100644 --- a/source/Ox.UI/js/Video/Ox.SmallVideoTimeline.js +++ b/source/Ox.UI/js/Video/Ox.SmallVideoTimeline.js @@ -221,9 +221,6 @@ Ox.SmallVideoTimeline = function(options, self) { } function setPositionMarker() { - Ox.print(self.interfaceLeft + Math.round( - self.options.position * self.imageWidth / self.options.duration - )); self.$positionMarker.css({ left: self.interfaceLeft + Math.round( self.options.position * self.imageWidth / self.options.duration diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index e65e07e2..b4a60bc8 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -140,9 +140,15 @@ Ox.VideoPlayer = function(options, self) { if (self.options.enableKeyboard) { that.bindEvent({ + key_0: function() { + toggleMuted(true); + }, key_1: function() { toggleScale(true); }, + key_equal: function() { + changeVolumeBy(0.1); + }, key_f: function() { // need timeout so the "f" doesn't appear in the input field setTimeout(function() { @@ -159,8 +165,8 @@ Ox.VideoPlayer = function(options, self) { key_left: function() { setPosition(self.options.position - self.secondsPerFrame, true); }, - key_m: function() { - toggleMuted(true); + key_minus: function() { + changeVolumeBy(-0.1); }, key_p: function() { playInToOut(); @@ -830,7 +836,9 @@ Ox.VideoPlayer = function(options, self) { float: 'left' }) .bindEvent({ - change: setVolume + change: function(data) { + setVolume(data.value); + } }) .appendTo(self.$volume); @@ -1461,8 +1469,16 @@ Ox.VideoPlayer = function(options, self) { } } - function setVolume(data) { - self.options.volume = data.value; + function changeVolumeBy(num) { + self.options.volume = Ox.limit(self.options.volume + num, 0, 1); + setVolume(self.options.volume); + self.$volumeInput && self.$volumeInput.options({ + value: self.options.volume + }); + } + + function setVolume(volume) { + self.options.volume = volume; if (!!self.options.volume == self.options.muted) { self.options.muted = !self.options.muted; self.video.muted = self.options.muted;