mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
Fix remaining bugs and issues with PiP
This commit is contained in:
parent
14b7011d74
commit
27af37ea7b
3 changed files with 24 additions and 5 deletions
|
|
@ -2404,6 +2404,12 @@ void HTMLMediaElement::SetVolumeInternal()
|
|||
float effectiveVolume = ComputedVolume();
|
||||
|
||||
if (mDecoder) {
|
||||
// PiP applies content mute at its playback element, after the capture
|
||||
// queue. Keep those samples available for immediate unmute, while still
|
||||
// honoring audio-channel, playback-rate and disabled-track muting.
|
||||
if (mPictureInPicture && !(mMuted & ~MUTED_BY_CONTENT)) {
|
||||
effectiveVolume = float(mVolume * mAudioChannelVolume);
|
||||
}
|
||||
mDecoder->SetVolume(effectiveVolume);
|
||||
} else if (MediaStream* stream = GetSrcMediaStream()) {
|
||||
if (mSrcStreamIsPlaying) {
|
||||
|
|
@ -5188,6 +5194,7 @@ void HTMLMediaElement::SetMozPictureInPicture(bool aEnabled)
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mPictureInPicture = aEnabled;
|
||||
if (mDecoder && !mShuttingDown) {
|
||||
SetVolumeInternal();
|
||||
mDecoder->NotifyOwnerActivityChanged(!IsHidden());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue