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

--HG--
extra : rebase_source : 9dc0b1cc8d1dd55c4fb71f444c165498f0e7f7ad
This commit is contained in:
Munro Mengjue Chiang 2017-09-27 10:16:46 +08:00
Родитель 77a1296e26
Коммит e39858f1cd
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -4067,14 +4067,14 @@ GetUserMediaWindowListener::StopRawID(const nsString& removedDeviceID)
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);
}
}
}