Bug 1301675 - Clarify why we don't need to do anything on DecoderCaptureTrackSource::Stop(). r?jib
MozReview-Commit-ID: H1zaO1FKWvK
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2358,19 +2358,20 @@ public:
p->Reject(new dom::MediaStreamError(aWindow,
NS_LITERAL_STRING("OverconstrainedError"),
NS_LITERAL_STRING("")));
return p.forget();
}
void Stop() override
{
- // XXX Fix in later patch.
- NS_ERROR("We're reporting remote=true to not be stoppable. "
- "Stop() should not be called.");
+ // We don't notify the source that a track was stopped since it will keep
+ // producing tracks until the element ends. The decoder also needs the
+ // tracks it created to be live at the source since the decoder's clock is
+ // based on MediaStreams during capture.
}
void NotifyDecoderPrincipalChanged() override
{
nsCOMPtr<nsIPrincipal> newPrincipal = mElement->GetCurrentPrincipal();
if (nsContentUtils::CombineResourcePrincipals(&mPrincipal, newPrincipal)) {
PrincipalChanged();
}