Open Bug 1608434 Opened 4 years ago Updated 2 years ago

Facebook - PIP - Play/Pause is not working when launching the PiP on a muted video from the timeline/feed

Categories

(Toolkit :: Picture-in-Picture, defect, P3)

Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr68 --- unaffected
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 - wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix

People

(Reporter: bmaris, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [fidefe-quality-foundation], [fidefe-MR1-2022])

Attachments

(1 file)

Affected versions

  • Firefox 73.0b3
  • Firefox 72.0.1
  • Latest Nightly 74.0a1

Affected platforms

  • macOS 10.15.3
  • Windows 10 64bit

Unaffected platforms

  • Ubuntu 16.04

Steps to reproduce

  1. Launch Firefox.
  2. Go to https://www.facebook.com/ and sign in.
  3. Scroll down to a video or open Videos on Watch and play a video.
  4. A small blue square toggle PiP (Picture-in-Picture) button is shown on the right side of the video. Click on the toggle.
  5. Hover the mouse over the PiP window and check the controls (Pause, Play and Close).

Expected result

  • Controls are working as expected.
  • Video is Paused/Played accordingly

Actual result

  • Pause/Play is not working accordingly in Facebook feed mode. If a user is in PIP mode and click for the first time Play/Pause button, video will not play.

Regression range

  • as soon as possible I will search for a regression range if applicable

Additional notes

  • reproducible only in feed mode/page
Has Regression Range: --- → no

After using mozregression tool I've determined that this is indeed a regression and I got the following pushlog after bisecting:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=76e8b769a7c00797dcaeef19cbaaa564f1f373b6&tochange=1c30a781b423462afdef09e088e5e601437b5bdc

Based on the pushlog looks like the culprit would be bug 1510569 but not entirely sure if this is right. Needinfo the assignee from bug 1510569 to take a look.

Has Regression Range: no → yes
Has STR: --- → yes
Flags: needinfo?(brennie)

Hm... that changeset range shows a backout for bug 1510569, and then that patch definitely landed. I'd be pretty surprised if that caused the issue, but stranger things have happened.

Hey Bogdan, are you aware of any public Facebook pages with videos that I can use to reproduce this? I don't have a Facebook account to test with.

Flags: needinfo?(bogdan.maris)

mconley: I can reproduce this for you if that helps.

Bogdan, I would be very surprised if the backout of that patch caused this.

Flags: needinfo?(brennie)

So I don't think this is a regression - I think we always behaved this way.

From some debugging, it looks like Facebook has an event handler for when the window gets blurred, at which point it pauses the video. When opening the PiP player window, we first focus the player window (pausing the video), and then we clone the frames to the new <video>. I think there's a race where the player window isn't aware that the video has been paused, and so the player window continues to show the "pause" button. Clicking on the "pause" button causes us to attempt to pause an already playing video, which results in no user-discernible action.

There are, I think, a few things to do here:

  1. When a video is being opened in Picture-in-Picture, we need the originating tab to continue to think it's focused and in the foreground (this is bug 1598654).
  2. We need to make the Picture-in-Picture player window more resilient to the case where the video is paused soon after requesting that the PiP player window be opened, so that the "pause" toggle appears instead in the player window.

(1) is being taken care of in bug 1598654. Let's take care of (2) in this bug.

Flags: needinfo?(bogdan.maris)
Priority: -- → P2

:jaws, is there someone who can work on this? This bug is tracked as regression for FF74. Thank you!

Flags: needinfo?(jaws)
See Also: → 1604043

Untracking for 74 as this is not a regression and we have shipped several releases with this bug.

Hi Mike, were you planning on working on this from comment #4?

Flags: needinfo?(jaws) → needinfo?(mconley)

Eventually, yes - but it's likely to get much attention in the short term due to higher priority commitments.

Assignee: nobody → mconley
Flags: needinfo?(mconley)
Severity: normal → S2

I'm not going to have time to work on this in the short term, I'm afraid.

Assignee: mconley → nobody

S1 or S2 bugs need an assignee - could you find someone for this bug?

Flags: needinfo?(jaws)
See Also: → 1660117

Mike would be the best person to work on this but he stated he doesn't have the time. I think we are just too resource-constrained at this point.

Flags: needinfo?(jaws)
Component: Video/Audio Controls → Picture-in-Picture
Severity: S2 → S3

I think Mike's patch in bug 1547349 might help here - I'm seeing facebook pause videos when the content area loses focus, which happens automatically when the pip player opens, and it then refuses to resume the video while the content area is not in focus, and auto-resumes it when it does regain focus. If we're requiring user interaction for the website calling pause as Mike's patch from bug 1547349 does, I think that behaviour might improve?

See Also: → 1547349
Whiteboard: [fidefe-quality-foundation]

I am seeing this as fixed, Fx95.0.2. Bogdan Marris can you confirm?

(In reply to Audrey Fischer from comment #14)

I am seeing this as fixed, Fx95.0.2. Bogdan Marris can you confirm?

Using 96.0 and Latest Nightly 98.0a1 (Windows 10 and macOS 11) this is not fixed for me, the videos from the main page (I assume this is the new "news feed").

This issue is still reproducible on MacOS 11 and Windows 10 using the latest Beta and Nightly versions.

I have investigated this report and I think I've discovered the underlying cause why this occurs: it appears that when the user clicks the PiP button while the video is muted (in the fb player), the PiP is launched and paused even if it was playing before and cannot be replayed from the PiP.

The issue still only occurs on timeline/feed mode (not on a page with one and only video player).

I have confirmed by also verifying the old Nightly v74.0a1, the last Nightly v101.0a1 and Beta v100.0b1 on Windows 10, Mac OS 11.6.5 and Ubuntu 20.04 LTS. The behavior seen in Ubuntu on the old versions (v74.0a1), asppears as it does not reproduce when in fact it is; after pausing and replaying the video in the PiP, the same bug occurs.

Considering the considerable bug edit, I would very much appreciate the confirmation of the reporter.

Flags: needinfo?(bogdan.maris)
Hardware: All → Desktop
Summary: Facebook - PIP - Play/Pause if not working first time watching a video in news Feed → Facebook - PIP - Play/Pause if not working when launching the PiP on a muted video from the timeline/feed

(In reply to Bodea Daniel [:danibodea] from comment #17)

Considering the considerable bug edit, I would very much appreciate the confirmation of the reporter.

I can confirm the above with latest builds. One thing though, sometimes pausing the video from PiP will not work from one click of the button.

Flags: needinfo?(bogdan.maris)
Summary: Facebook - PIP - Play/Pause if not working when launching the PiP on a muted video from the timeline/feed → Facebook - PIP - Play/Pause is not working when launching the PiP on a muted video from the timeline/feed
Whiteboard: [fidefe-quality-foundation] → [fidefe-quality-foundation], [fidefe-MR1-2022]
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.