Bug 1244768 part 3 - modify the resource selection algorithm; r=jwwang

4.8.12.5
https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-algorithm
https://html.spec.whatwg.org/multipage/embedded-content.html#dedicated-media-source-failure-steps

MozReview-Commit-ID: DKFQC4v92Vi

--HG--
extra : rebase_source : ad5d4e782ce0af9879242d1c2830cf7c4461faac
extra : intermediate-source : e823b33657216c0ae0bf082c2d0820e9b6258eec
extra : source : 649a119bf21c1cd89d0d147604892147ab6692fc
This commit is contained in:
Kaku Kuo 2016-08-18 20:04:27 +08:00
parent 210ff4354f
commit bfa7d7c710
2 changed files with 2 additions and 0 deletions

View File

@ -1695,6 +1695,7 @@ void HTMLMediaElement::NoSupportedMediaSourceError(const nsACString& aErrorDetai
mErrorSink->SetError(MEDIA_ERR_SRC_NOT_SUPPORTED, aErrorDetails);
ChangeDelayLoadStatus(false);
UpdateAudioChannelPlayingState();
RejectPromises(TakePendingPlayPromises(), NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR);
}
typedef void (HTMLMediaElement::*SyncSectionFn)();

View File

@ -956,6 +956,7 @@ protected:
void AbortExistingLoads();
/**
* This is the dedicated media source failure steps.
* Called when all potential resources are exhausted. Changes network
* state to NETWORK_NO_SOURCE, and sends error event with code
* MEDIA_ERR_SRC_NOT_SUPPORTED.