Bug 868866 - Only stop delaying the load event when media fetch has stalled is MSE case. r=cpearce, a=lmandel
authorJW Wang <jwwang@mozilla.com>
Sun, 01 Feb 2015 18:21:00 +0100
changeset 249672 874b03be37f26a0b89a621b3df746a32df0f5eff
parent 249671 af0810842345bacd6e3f5d84a5008f403438e6b3
child 249673 1e9694bbffaa4179d7163c3f42ff6b430760e0e7
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs868866
milestone37.0a2
Bug 868866 - Only stop delaying the load event when media fetch has stalled is MSE case. r=cpearce, a=lmandel
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -3199,17 +3199,20 @@ void HTMLMediaElement::CheckProgress(boo
       if (!mLoadedDataFired) {
         ChangeDelayLoadStatus(true);
       }
     }
   }
 
   if (now - mDataTime >= TimeDuration::FromMilliseconds(STALL_MS)) {
     DispatchAsyncEvent(NS_LITERAL_STRING("stalled"));
-    ChangeDelayLoadStatus(false);
+
+    if (IsMediaSourceURI(mLoadingSrc)) {
+      ChangeDelayLoadStatus(false);
+    }
 
     NS_ASSERTION(mProgressTimer, "detected stalled without timer");
     // Stop timer events, which prevents repeated stalled events until there
     // is more progress.
     StopProgress();
   }
 
   AddRemoveSelfReference();