Bug 1287021: [MSE] Set delaying-the-load-event-flag to false when attaching media source. r=jwwang
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 15 Jul 2016 14:22:47 +1000
changeset 330167 1b3826196e7efc0c7442a02207ef833003de2dfe
parent 330166 5e2477a249db1cf1c5f1f5a1409ce72cc01257d2
child 330168 aa16312b9dcf3a2658826145fcfc03cff411df17
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1287021
milestone50.0a1
Bug 1287021: [MSE] Set delaying-the-load-event-flag to false when attaching media source. r=jwwang MozReview-Commit-ID: IsF1BPHrjce
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1533,16 +1533,17 @@ nsresult HTMLMediaElement::LoadResource(
     RefPtr<MediaSourceDecoder> decoder = new MediaSourceDecoder(this);
     if (!mMediaSource->Attach(decoder)) {
       // TODO: Handle failure: run "If the media data cannot be fetched at
       // all, due to network errors, causing the user agent to give up
       // trying to fetch the resource" section of resource fetch algorithm.
       decoder->Shutdown();
       return NS_ERROR_FAILURE;
     }
+    ChangeDelayLoadStatus(false);
     RefPtr<MediaResource> resource =
       MediaSourceDecoder::CreateResource(mMediaSource->GetPrincipal());
     return FinishDecoderSetup(decoder, resource, nullptr);
   }
 
   RefPtr<ChannelLoader> loader = new ChannelLoader;
   nsresult rv = loader->Load(this);
   if (NS_SUCCEEDED(rv)) {