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:
Benjamin Chen 2015-04-30 17:13:41 +08:00
parent 428c3995dd
commit a7eca983ce
2 changed files with 4 additions and 2 deletions

View File

@ -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();

View File

@ -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);
}
);