зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384247 - Check if an HTMLMediaElement can be capture before doing it. r=dminor
MozReview-Commit-ID: EWpf2qA2Yce --HG-- extra : rebase_source : 295f5e27e4fc983cbef1e40d65775abbb99012a6
This commit is contained in:
Родитель
14e01f9799
Коммит
c08b4966b1
|
@ -3535,6 +3535,11 @@ HTMLMediaElement::CaptureAudio(ErrorResult& aRv,
|
||||||
{
|
{
|
||||||
MOZ_RELEASE_ASSERT(aGraph);
|
MOZ_RELEASE_ASSERT(aGraph);
|
||||||
|
|
||||||
|
if (!CanBeCaptured(false)) {
|
||||||
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
RefPtr<DOMMediaStream> stream =
|
RefPtr<DOMMediaStream> stream =
|
||||||
CaptureStreamInternal(false, true, aGraph);
|
CaptureStreamInternal(false, true, aGraph);
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
try { o1 = document.createElement('audio') } catch(e) { }
|
||||||
|
try { o2 = document.implementation.createDocument('', '', null).adoptNode(o1); } catch(e) { };
|
||||||
|
try { o3 = new AudioContext('alarm') } catch(e) { }
|
||||||
|
try { o3.createMediaElementSource(o1) } catch(e) { }
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
|
@ -84,6 +84,7 @@ load 1185192.html
|
||||||
load 1304948.html
|
load 1304948.html
|
||||||
load 1319486.html
|
load 1319486.html
|
||||||
load 1291702.html
|
load 1291702.html
|
||||||
|
load 1384248.html
|
||||||
load disconnect-wrong-destination.html
|
load disconnect-wrong-destination.html
|
||||||
load analyser-channels-1.html
|
load analyser-channels-1.html
|
||||||
load audiocontext-double-suspend.html
|
load audiocontext-double-suspend.html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче