зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3620404c8725 (bug 1129882)
This commit is contained in:
Родитель
d84cdb4785
Коммит
7cdb62ba5f
|
@ -2025,8 +2025,7 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
|
|||
mAutoplaying(true),
|
||||
mAutoplayEnabled(true),
|
||||
mPaused(true),
|
||||
mMuted(AudioChannelService::IsAudioChannelMutedByDefault()
|
||||
? MUTED_BY_AUDIO_CHANNEL : 0),
|
||||
mMuted(0),
|
||||
mStatsShowing(false),
|
||||
mAllowCasting(false),
|
||||
mIsCasting(false),
|
||||
|
@ -4448,11 +4447,10 @@ nsresult HTMLMediaElement::UpdateChannelMuteState(float aVolume, bool aMuted)
|
|||
SetVolumeInternal();
|
||||
}
|
||||
|
||||
if (aMuted != ComputedMuted()) {
|
||||
// We have to mute this channel.
|
||||
if (aMuted && !ComputedMuted()) {
|
||||
SetMutedInternal(mMuted | MUTED_BY_AUDIO_CHANNEL);
|
||||
if (UseAudioChannelAPI() && !mHaveDispatchedInterruptBeginEvent) {
|
||||
if (UseAudioChannelAPI()) {
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("mozinterruptbegin"));
|
||||
mHaveDispatchedInterruptBeginEvent = true;
|
||||
}
|
||||
|
@ -4463,7 +4461,6 @@ nsresult HTMLMediaElement::UpdateChannelMuteState(float aVolume, bool aMuted)
|
|||
DispatchAsyncEvent(NS_LITERAL_STRING("mozinterruptend"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
SuspendOrResumeElement(ComputedMuted(), false);
|
||||
|
|
|
@ -322,7 +322,7 @@ AudioDestinationNode::AudioDestinationNode(AudioContext* aContext,
|
|||
, mFramesToProduce(aLength)
|
||||
, mAudioChannel(AudioChannel::Normal)
|
||||
, mIsOffline(aIsOffline)
|
||||
, mAudioChannelAgentMuted(AudioChannelService::IsAudioChannelMutedByDefault())
|
||||
, mAudioChannelAgentPlaying(false)
|
||||
, mExtraCurrentTime(0)
|
||||
, mExtraCurrentTimeSinceLastStartedBlocking(0)
|
||||
, mExtraCurrentTimeUpdatedSinceLastStableState(false)
|
||||
|
@ -492,8 +492,8 @@ AudioDestinationNode::SetCanPlay(float aVolume, bool aMuted)
|
|||
NS_IMETHODIMP
|
||||
AudioDestinationNode::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
{
|
||||
if (aMuted != mAudioChannelAgentMuted) {
|
||||
mAudioChannelAgentMuted = aMuted;
|
||||
if (aMuted != mAudioChannelAgentPlaying) {
|
||||
mAudioChannelAgentPlaying = aMuted;
|
||||
|
||||
if (UseAudioChannelAPI() &&
|
||||
(mHaveDispatchedInterruptBeginEvent || aMuted)) {
|
||||
|
|
|
@ -105,7 +105,7 @@ private:
|
|||
// Audio Channel Type.
|
||||
AudioChannel mAudioChannel;
|
||||
bool mIsOffline;
|
||||
bool mAudioChannelAgentMuted;
|
||||
bool mAudioChannelAgentPlaying;
|
||||
|
||||
TimeStamp mStartedBlockingDueToBeingOnlyNode;
|
||||
double mExtraCurrentTime;
|
||||
|
|
Загрузка…
Ссылка в новой задаче