Bug 518008 - Make clicking the video content area play/pause the video. r=dolske

This commit is contained in:
Jared Wein 2011-06-25 11:47:39 +02:00
parent bdc450648b
commit 205bc10c08

View File

@ -295,6 +295,7 @@
progressBar : null,
bufferBar : null,
statusOverlay : null,
controlsSpacer : null,
randomID : 0,
videoEvents : ["play", "pause", "ended", "volumechange", "loadeddata",
@ -909,6 +910,7 @@
this.durationLabel = document.getAnonymousElementByAttribute(binding, "class", "durationLabel");
this.positionLabel = document.getAnonymousElementByAttribute(binding, "class", "positionLabel");
this.statusOverlay = document.getAnonymousElementByAttribute(binding, "class", "statusOverlay");
this.controlsSpacer = document.getAnonymousElementByAttribute(binding, "class", "controlsSpacer")
this.setupInitialState();
@ -934,6 +936,7 @@
var self = this;
this.muteButton.addEventListener("command", function() { self.toggleMute(); }, false);
this.playButton.addEventListener("command", function() { self.togglePause(); }, false);
this.controlsSpacer.addEventListener("click", function() { self.togglePause(); }, false);
if (!this.isAudioOnly) {
this.muteButton.addEventListener("mouseover", function(e) { self.onVolumeMouseInOut(e); }, false);
this.muteButton.addEventListener("mouseout", function(e) { self.onVolumeMouseInOut(e); }, false);