зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1192170 - Remove media capture indicator when all tracks have ended. r=jib
--HG-- extra : commitid : 7nO1zyYTfLV extra : rebase_source : 4761874ce4d5bb2d5675d3fa8e235cb491348919
This commit is contained in:
Родитель
a2776c2e6f
Коммит
143e9256c4
|
@ -314,8 +314,10 @@ public:
|
|||
mVideoDevice->GetSource()->Stop(source, kVideoTrack);
|
||||
mVideoDevice->GetSource()->Deallocate();
|
||||
}
|
||||
// Do this after stopping all tracks with EndTrack()
|
||||
if (mBool) {
|
||||
// We consider ourselves finished if all tracks have been stopped, as
|
||||
// there is no way to restart them from the JS APIs.
|
||||
if (mBool || ((!mAudioDevice || mAudioDevice->GetSource()->IsAvailable()) &&
|
||||
(!mVideoDevice || mVideoDevice->GetSource()->IsAvailable()))) {
|
||||
source->Finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -180,6 +180,7 @@ public:
|
|||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||
return mVideoDevice && !mStopped &&
|
||||
!mVideoDevice->GetSource()->IsAvailable() &&
|
||||
mVideoDevice->GetMediaSource() == dom::MediaSourceEnum::Camera &&
|
||||
(!mVideoDevice->GetSource()->IsFake() ||
|
||||
Preferences::GetBool("media.navigator.permission.fake"));
|
||||
|
@ -188,6 +189,7 @@ public:
|
|||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||
return mAudioDevice && !mStopped &&
|
||||
!mAudioDevice->GetSource()->IsAvailable() &&
|
||||
(!mAudioDevice->GetSource()->IsFake() ||
|
||||
Preferences::GetBool("media.navigator.permission.fake"));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче