зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1296531 - Don't wait for TracksAvailableCallback if tracks are already available. r=jesup
MozReview-Commit-ID: JQMyhhxaLLq --HG-- extra : rebase_source : 1c23b170cc9fcf4dce1f7de8c2d4503e37a59ba8
This commit is contained in:
Родитель
a2ba5f2311
Коммит
97db817de8
|
@ -479,10 +479,13 @@ public:
|
|||
if (domStream) {
|
||||
// The callback reports back when tracks are available and can be
|
||||
// attached to MediaEncoder. This allows `recorder.start()` before any tracks are available.
|
||||
// We have supported this historically and have mochitests assuming this.
|
||||
// We have supported this historically and have mochitests assuming this behavior.
|
||||
TracksAvailableCallback* tracksAvailableCallback = new TracksAvailableCallback(this);
|
||||
domStream->OnTracksAvailable(tracksAvailableCallback);
|
||||
} else if (mRecorder->mAudioNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mRecorder->mAudioNode) {
|
||||
// Check that we may access the audio node's content.
|
||||
if (!AudioNodePrincipalSubsumes()) {
|
||||
LOG(LogLevel::Warning, ("Session.Start AudioNode principal check failed"));
|
||||
|
@ -494,9 +497,10 @@ public:
|
|||
|
||||
// Web Audio node has only audio.
|
||||
InitEncoder(ContainerWriter::CREATE_AUDIO_TRACK, trackRate);
|
||||
} else {
|
||||
MOZ_ASSERT(false, "Unknown source");
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(false, "Unknown source");
|
||||
}
|
||||
|
||||
void Stop()
|
||||
|
|
Загрузка…
Ссылка в новой задаче