Bug 834146 - [Audio] When initilizing AudioChannelAgent, we should set visibility correctly in that time. r=kinetik, a=tef+

This commit is contained in:
Marco Chen 2013-01-25 11:00:43 +08:00
parent 3bfadd7497
commit 577d544684

View File

@ -3612,6 +3612,13 @@ void nsHTMLMediaElement::UpdateAudioChannelPlayingState()
return;
}
mAudioChannelAgent->Init(mAudioChannelType, this);
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(OwnerDoc());
if (domDoc) {
bool hidden = false;
domDoc->GetHidden(&hidden);
mAudioChannelAgent->SetVisibilityState(!hidden);
}
}
if (mPlayingThroughTheAudioChannel) {