Bug 1402377 - Stop the corresponding track instead of the whole stream when an external device is plugged out. r?jib, pehrsons
MozReview-Commit-ID: 7gbB5sgn6xI
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -4046,24 +4046,24 @@ GetUserMediaWindowListener::StopRawID(co
{
MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread");
for (auto& source : mActiveListeners) {
if (source->GetAudioDevice()) {
nsString id;
source->GetAudioDevice()->GetRawId(id);
if (removedDeviceID.Equals(id)) {
- source->Stop();
+ source->StopTrack(kAudioTrack);
}
}
if (source->GetVideoDevice()) {
nsString id;
source->GetVideoDevice()->GetRawId(id);
if (removedDeviceID.Equals(id)) {
- source->Stop();
+ source->StopTrack(kVideoTrack);
}
}
}
}
void
GetUserMediaWindowListener::NotifySourceTrackStopped()
{