Bug 1343465 - part1 : check audio track to decide the audible state when the media element was muted. r=baku
If the media starts after muting the tab, IsOwnerAudible() would always return "eNotAudible". It causes that the "play tab" icon can't be displayed because we only show the "play tab" icon for the "eMaybeAudible" or "eAudible". We should check whether owner owns the audio track to decide the return value. MozReview-Commit-ID: DGwkArx0a4R
This commit is contained in:
@@ -998,7 +998,9 @@ private:
|
||||
{
|
||||
// Muted or the volume should not be ~0
|
||||
if (mOwner->mMuted || (std::fabs(mOwner->Volume()) <= 1e-7)) {
|
||||
return AudioChannelService::AudibleState::eNotAudible;
|
||||
return mOwner->HasAudio() ?
|
||||
AudioChannelService::AudibleState::eMaybeAudible :
|
||||
AudioChannelService::AudibleState::eNotAudible;
|
||||
}
|
||||
|
||||
// No audio track.
|
||||
|
||||
Reference in New Issue
Block a user