Open Bug 1617125 Opened 1 year ago Updated 27 days ago

Youtube - PIP frame remains on page if accessing a video from website sub-page

Categories

(Toolkit :: Video/Audio Controls, defect, P3)

defect

Tracking

()

Tracking Status
firefox74 --- wontfix
firefox75 --- wontfix
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- wontfix

People

(Reporter: cfogel, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file)

Affected versions

  • 74.0b6, 75.0a1 (2020-02-20);

Affected platforms

  • macOS 10.11, Windows 10, Ubuntu 18.04;

Steps to reproduce

  1. Launch Firefox, enable PIP
  2. Access this page
  3. Play the first intro-video enable PIP for it
  4. Scroll down the page;
  5. Click on any video from the list;

Expected result

  • the video is played back in the PIP frame;

Actual result

  • the video is played back in the page, the PIP frame is empty and remains on page;

Regression range

  • will provide one asap;

Additional notes

  • attached screenshot with the issue.
Has Regression Range: --- → no
Has STR: --- → yes

For this particular scenario; In checking with older builds:

  • (builds form 2018) the fact that the video is no longer playable appears to not be a regression. The frame remained displayed but the controls on the PIP window are not actionable;
  • frame remains white but controls are still displayed: pushlog URL
  • frame is grey: pushlog URL

Order is per dates - last one being the current issue.

Looking at the pushlog for the last bullet point, the fact that frame is grey appears to be the effect of 1568373 - Use black background for Picture-in-Picture window;
So the issue still should be in the pushlog for the white frame

The reason we're not able to continue playing the video in the PiP player is because the original <video> element isn't being re-used. YouTube is serving up a new <video> element after the page navigation. What is interesting, however, is that YouTube doesn't appear to be detaching the original <video> from the DOM, so we keep its player up, despite it no longer showing any useful content.

The fact that the <video> is showing grey suggests that the underlying source has been cut from it - perhaps we can detect this and close the PiP player in that case.

In general though, this is one example of the problem where a site seems to transition a <video> to a new stream, but is in actuality creating a new <video>, which our current implementation fails to follow.

One idea I've had for this is to notice when the PiP player has been (or should have been) closed, and use a timer to check if a new video begins playing in the viewport for the same domain within a certain number of seconds. If so, automatically PiP that video element.

Blocks: videopip
Priority: -- → P3

Just noting that other browsers exhibit similar behaviour.

A similar path reproduces the same issue:

  1. Open a Youtube video.
  2. Click the PiP icon.
  3. Click the Youtube logo to go to the main page.
    Expected: The page is refreshed and the PiP is closed.
    Actual: The page is refreshed and the PiP remains opened and blank.

P.S. I haven't logged another bug since it appears to be caused by the same underlying issue
NI me if further testing is needed or a new bug should be logged.

You need to log in before you can comment on or make changes to this bug.