Bug 1384247 - Check if an HTMLMediaElement can be capture before doing it. r=dminor
MozReview-Commit-ID: EWpf2qA2Yce
This commit is contained in:
@@ -3535,6 +3535,11 @@ HTMLMediaElement::CaptureAudio(ErrorResult& aRv,
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aGraph);
|
||||
|
||||
if (!CanBeCaptured(true)) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<DOMMediaStream> stream =
|
||||
CaptureStreamInternal(false, true, aGraph);
|
||||
if (!stream) {
|
||||
|
||||
Reference in New Issue
Block a user