Closed Bug 1659060 Opened 4 years ago Closed 4 years ago

PIP video doesnt request screensaver if its tab is in the background

Categories

(Core :: Audio/Video, defect, P3)

79 Branch
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: paymanz, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

This seems to be a duplicate of Bug 517870

Component: Untriaged → Video/Audio Controls
Product: Firefox → Toolkit

I believe the behaviour is governed by the WakeLock system. On Windows, this was added in bug 968603. I'm going to move this bug to Core :: Audio/Video.

Component: Video/Audio Controls → Audio/Video
Product: Toolkit → Core

Recently we just fixed a Windows wakelock issue in bug1657043, could you please try if you can still reproduce your issue on latest Nightly?
Thank you.

Severity: -- → S3
Flags: needinfo?(paymanz)

(In reply to Alastor Wu [:alwu][PTO until 9/15] from comment #3)

Recently we just fixed a Windows wakelock issue in bug1657043, could you please try if you can still reproduce your issue on latest Nightly?
Thank you.

thanks, i think that problem has solved however, in picture in picture mode the problem still exist.

Flags: needinfo?(paymanz)

What do you mean the problem in the picture in picture mode? If the video is being used in the picture in picture mode, then it would always display on the top and be visible to users, so we would keep its video wakelock.

Flags: needinfo?(paymanz)

(In reply to Alastor Wu [:alwu] from comment #5)

What do you mean the problem in the picture in picture mode? If the video is being used in the picture in picture mode, then it would always display on the top and be visible to users, so we would keep its video wakelock.

no it goes to screen saver while im playing youtube in picture in picture mode.

Flags: needinfo?(paymanz)

After doing some investigation, PowerManagerService would determine wakelock state by document's visibility [1], and doesn't consider if video is being used in PIP mode or not, so we would release the wakelock when the tab which pip video belongs to goes to background.

[1]
https://searchfox.org/mozilla-central/rev/5efefd3ef214ed6d3234ba245c1da3004ead94e0/dom/power/WakeLock.cpp#210-215

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: playing youtube video doesnt disable screensaver. → PIP video doesnt request screensaver if its tab is in the background
Blocks: wakelock
Assignee: nobody → alwu

(In reply to Alastor Wu [:alwu] from comment #7)

After doing some investigation, PowerManagerService would determine wakelock state by document's visibility [1], and doesn't consider if video is being used in PIP mode or not, so we would release the wakelock when the tab which pip video belongs to goes to background.

[1]
https://searchfox.org/mozilla-central/rev/5efefd3ef214ed6d3234ba245c1da3004ead94e0/dom/power/WakeLock.cpp#210-215

obviously the purpose of PIP mode is to go to other tab or minimize the firefox.

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb5987dc48fb
part1 : treat lock visible if corresponding document has in use picture-in-picture element. r=bryce,smaug
https://hg.mozilla.org/integration/autoland/rev/1a0a6973160c
part2 : add test to ensure always requesting wakelock for PIP video. r=bryce
https://hg.mozilla.org/integration/autoland/rev/2ad5f0635e64
part3 : update mac wakelock log. r=bryce
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: