From da52aad1f7b2a710f210e80e5ee44def1e56dfd0 Mon Sep 17 00:00:00 2001 From: Chun-Min Chang Date: Mon, 15 May 2017 13:21:28 +0800 Subject: [PATCH] Bug 1331763 - part1: Support EME content for AudioContext::CreateMediaElementSource; r=cpearce MozReview-Commit-ID: 1OMySAPCH4i --HG-- extra : rebase_source : abd014ffc19976abbfdb523b6a172e42a3a80521 --- dom/html/HTMLMediaElement.cpp | 2 +- dom/media/webaudio/MediaElementAudioSourceNode.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index e5e96bebcab2..6e115acefd71 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -3361,7 +3361,7 @@ HTMLMediaElement::CaptureStreamInternal(bool aFinishWhenEnded, if (!window) { return nullptr; } - if (ContainsRestrictedContent()) { + if (!aCaptureAudio && ContainsRestrictedContent()) { return nullptr; } diff --git a/dom/media/webaudio/MediaElementAudioSourceNode.cpp b/dom/media/webaudio/MediaElementAudioSourceNode.cpp index 4ba3cb0e6495..5e50543033a7 100644 --- a/dom/media/webaudio/MediaElementAudioSourceNode.cpp +++ b/dom/media/webaudio/MediaElementAudioSourceNode.cpp @@ -25,11 +25,6 @@ MediaElementAudioSourceNode::Create(AudioContext& aAudioContext, return nullptr; } - if (aOptions.mMediaElement->ContainsRestrictedContent()) { - aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); - return nullptr; - } - if (aAudioContext.CheckClosed(aRv)) { return nullptr; }