mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 13:40:17 -10:00
Bug 732052 - Update video controls for touch events. r=dolske
This commit is contained in:
1 parent
db7198b835
commit
139312352e
1 file changed
+12
-2
@@ -133,6 +133,7 @@
|
||||
if (this.type == "scrubber") {
|
||||
// Update the time shown in the thumb.
|
||||
this.thumb.setTime(newValue);
|
||||
this.Utils.positionLabel.setAttribute("value", this.thumb.timeLabel.value);
|
||||
// Update the value bar to match the thumb position.
|
||||
var percent = newValue / this.max;
|
||||
this.valueBar.value = Math.round(percent * 10000); // has max=10000
|
||||
@@ -1551,11 +1552,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
delayHideControls : function(aTimeout) {
|
||||
clearTimer: function() {
|
||||
if (this.controlsTimer) {
|
||||
clearTimeout(this.controlsTimer);
|
||||
this.controlsTimer = null;
|
||||
}
|
||||
},
|
||||
|
||||
delayHideControls : function(aTimeout) {
|
||||
this.clearTimer();
|
||||
let self = this;
|
||||
this.controlsTimer = setTimeout(function() {
|
||||
self.hideControls();
|
||||
@@ -1598,7 +1603,12 @@
|
||||
else
|
||||
self.showControls();
|
||||
}, false);
|
||||
this.Utils.scrubber.addEventListener("click", function() { self.delayHideControls(self.controlsTimeout); }, false);
|
||||
this.Utils.scrubber.addEventListener("touchstart", function() {
|
||||
self.clearTimer();
|
||||
}, false);
|
||||
this.Utils.scrubber.addEventListener("touchend", function() {
|
||||
self.delayHideControls(self.controlsTimeout);
|
||||
}, false);
|
||||
this.Utils.muteButton.addEventListener("click", function() { self.delayHideControls(self.controlsTimeout); }, false);
|
||||
|
||||
if (!video.autoplay && this.Utils.dynamicControls)
|
||||
|
||||
Reference in new issue
Block a user