Bug 495162 - Show the HTML5 video control bar during volumechanges. r?gijs
MozReview-Commit-ID: KP2Vvy7Rk40
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -561,16 +561,23 @@
this.setupStatusFader();
break;
case "volumechange":
var volume = this.video.muted ? 0 : this.video.volume;
var volumePercentage = Math.round(volume * 100);
this.updateMuteButtonState();
this.volumeControl.value = volumePercentage;
this.volumeForeground.style.paddingRight = (1 - volume) * this._volumeControlWidth + "px";
+ // Show the controls to highlight the changing volume,
+ // but only if the controls can get hidden.
+ if (this.clickToPlay.hidden) {
+ this.startFadeIn(this.controlBar);
+ clearTimeout(this._hideControlsTimeout);
+ this._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
+ }
break;
case "loadedmetadata":
this.adjustControlSize();
// If a <video> doesn't have any video data, treat it as <audio>
// and show the controls (they won't fade back out)
if (this.video instanceof HTMLVideoElement &&
(this.video.videoWidth == 0 || this.video.videoHeight == 0)) {
this.isAudioOnly = true;