Bug 1350852 P2 - use mozvideoonlyseekcompleted to cancel throbber while resuming video decoder; r?jwwang,jaws
MozReview-Commit-ID: CV3LsfA6s1O
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -217,17 +217,17 @@
textTracksCount: 0,
randomID: 0,
videoEvents: ["play", "pause", "ended", "volumechange", "loadeddata",
"loadstart", "timeupdate", "progress",
"playing", "waiting", "canplay", "canplaythrough",
"seeking", "seeked", "emptied", "loadedmetadata",
"error", "suspend", "stalled",
- "mozexitvideosuspend"],
+ "mozexitvideosuspend", "mozvideoonlyseekcompleted"],
showHours: false,
firstFrameShown: false,
timeUpdateCount: 0,
maxCurrentTimeSeen: 0,
isPausedByDragging: false,
_isAudioOnly: false,
@@ -669,17 +669,16 @@
break;
case "waiting":
this.statusIcon.setAttribute("type", "throbber");
this.setupStatusFader();
break;
case "seeked":
case "playing":
case "canplay":
- this._cancelShowThrobberWhileResumingVideoDecoder();
case "canplaythrough":
this.setupStatusFader();
break;
case "error":
// We'll show the error status icon when we receive an error event
// under either of the following conditions:
// 1. The video has its error attribute set; this means we're loading
// from our src attribute, and the load failed, or we we're loading
@@ -699,16 +698,20 @@
this.startFadeOut(this.controlBar);
}
this.controlsSpacer.removeAttribute("hideCursor");
}
break;
case "mozexitvideosuspend":
this._delayShowThrobberWhileResumingVideoDecoder();
break;
+ case "mozvideoonlyseekcompleted":
+ this._cancelShowThrobberWhileResumingVideoDecoder();
+ this.setupStatusFader();
+ break;
default:
this.log("!!! event " + aEvent.type + " not handled!");
}
},
terminateEventListeners() {
if (this.videoEvents) {
for (let event of this.videoEvents) {