mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1157654
- 1. Do not call MediaRecorder.stop immediately after MediaRecorder.start, because we want to receive an onerror callback. 2. Make the NofityError async. r=roc
--HG-- extra : rebase_source : 551ba51fec092c78b19c1ad9cae59b042d729775
This commit is contained in:
parent
428c3995dd
commit
a7eca983ce
@ -624,7 +624,10 @@ private:
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (NS_FAILED(rv)) {
|
||||
mRecorder->NotifyError(rv);
|
||||
nsCOMPtr<nsIRunnable> runnable =
|
||||
NS_NewRunnableMethodWithArg<nsresult>(mRecorder,
|
||||
&MediaRecorder::NotifyError, rv);
|
||||
NS_DispatchToMainThread(runnable);
|
||||
}
|
||||
|
||||
CleanupStreams();
|
||||
|
@ -58,7 +58,6 @@ SpecialPowers.pushPrefEnv({"set": [["media.ogg.enabled", false]]},
|
||||
is(mediaRecorder.stream, stream,
|
||||
'Media recorder stream = element stream at the start of recording');
|
||||
mediaRecorder.requestData();
|
||||
mediaRecorder.stop();
|
||||
}, 100);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user