Open Bug 1617125 Opened 5 years ago Updated 3 years ago

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

Categories

(Toolkit :: Picture-in-Picture, 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)

Attached image Screen Shot 2020-02-21 at 11.20.27.png (deleted) —

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.

Component: Video/Audio Controls → Picture-in-Picture

Bug 1757927 addresses comment 4. but not the STR outlined in the description. The new behaviour now is that the pip window closes, rather than staying open and loading the video. (Tested on MacOS Big Sur)

If a new video element is being created, Bug 1611643 might equally be relevant, since we try to check for and load new video elements into the pip window. That bug however hasn't been worked on for a while though due to issues with tests.

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

Attachment

General

Created:
Updated:
Size: