Bug 1127416 - add observer service notification for EME video, r=cpearce

This commit is contained in:
Gijs Kruitbosch
2015-02-01 15:20:57 +00:00
parent 0a55f11631
commit f128d000ee
3 changed files with 89 additions and 0 deletions

View File

@@ -3016,6 +3016,12 @@ void HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo,
mTags = aTags.forget();
mLoadedDataFired = false;
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_METADATA);
if (mIsEncrypted) {
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
obs->NotifyObservers(static_cast<nsIContent*>(this), "media-eme-metadataloaded", nullptr);
}
DispatchAsyncEvent(NS_LITERAL_STRING("durationchange"));
if (IsVideo() && mHasVideo) {
mMediaSize = aInfo->mVideo.mDisplay;