Open Bug 1956165 Opened 5 months ago Updated 2 months ago

In m.youtube.com, PiP (Picture in picture) exits fullscreen (displays the browser toolbar) and doesn't play video

Categories

(Firefox for Android :: Browser Engine, defect)

Firefox 138
All
Android
defect

Tracking

()

REOPENED
Webcompat Score 5
Webcompat Priority P1
Tracking Status
firefox138 + fixed
firefox139 --- verified
firefox140 --- verified
firefox141 --- verified
firefox142 --- verified

People

(Reporter: someone, Assigned: twisniewski)

References

()

Details

(Keywords: leave-open, webcompat:sitepatch-applied, Whiteboard: [fxdroid][group4])

User Story

platform:android
impact:workflow-broken
configuration:general
affects:all
branch:release
user-impact-score:1200

Attachments

(9 files, 1 obsolete file)

252.23 KB, image/jpeg
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
8.74 MB, video/mp4
Details
2.59 MB, video/mp4
Details
48 bytes, text/x-phabricator-request
Details | Review
5.26 MB, video/mp4
Details
48 bytes, text/x-phabricator-request
Details | Review
2.42 MB, image/png
Details

User Agent: Mozilla/5.0 (Android 10; Mobile; rv:138.0) Gecko/138.0 Firefox/138.0

Steps to reproduce:

Opened up a video on YouTube as usual. Full screened the video. Swiped for my phone's Buttons to appear and tapped on the square to show my other apps currently opened. And exit the full screen mode. Usually I have the video playing in the floating screen.

Actual results:

The pop out window did open. But it was entirely filled with UI elements. The video was not playing at all because there was no sound. Tapping on the pop out twice to check the video status in the browser showed no progress.

Expected results:

The picture in picture window should have opened with the video inside it playing and no UI elements blocking it either.

Hey,
Thanks for reporting this bug! Can you provide us with your device and its android version? Can you also tell us if the extensions you have enabled (if any) and if you have desktop mode enabled (per Bug 1940052)

Flags: needinfo?(evelyn.pfeiffer2003)
See Also: → 1940052
Component: General → Media

People are creating Reddit threads and filing Webcompat issues about this:

https://old.reddit.com/r/firefox/comments/1jjccwg/pictureinpicture_for_browser_youtube_nerfed/
https://github.com/webcompat/web-bugs/issues?q=m.youtube.com

I don't personally watch videos on my phone. Please reach out to those Reddit users if you need more info.

I can reproduce the bug on Fenix Nightly (138.0a1), Samsung S24, Android 14.

STR

  • open an Youtube video (this one for example)
  • enter fullscreen
  • tap the Home button / use the gesture to go back to Home screen

Actual result

  • Toolbar is showing on the PiP container

Expected result

  • No toolbar is shown on the PiP container, and the video occupies all the container space.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(evelyn.pfeiffer2003)
Whiteboard: [fxdroid][group4]

Hey Web Compat team, I'm wondering if this is something Youtube has changed recently on their end in the past couple days. We tried mozregression on previous releases 134 to nightly, and PIP is no longer working, whereas it was before.

Tagging Emilio and John Lin to see if they can help investigate as well.

Component: Media → Site Reports
Flags: needinfo?(jolin)
Flags: needinfo?(emilio)
Product: Firefox for Android → Web Compatibility
Severity: -- → S1
Priority: -- → P1

It'd be useful to see why are we showing the toolbar. It seems YouTube may be exiting fullscreen mode on orientation change or so? I just tested and other video sites like Vimeo or so seem to be working, so it does seem likely to be a youtube change.

We have a mailing list with YouTube folks that we can use to ask about this kind of stuff, though it'd be good to do some investigation first on what is triggering the fullscreen exit, just in case it's due to something we're doing.

Cathy, is that something you could help with? Otherwise I can try, but I'm a bit swamped atm.

Flags: needinfo?(emilio) → needinfo?(calu)
Whiteboard: [fxdroid][group4] → [fxdroid][group4][webcompat:sightline]

I can reproduce on v135.0.1 on my Pixel6. I see the scrunched up toolbar in the PiP view and attempts to resume playback do not work.

Severity: S1 → S2
User Story: (updated)
Webcompat Priority: --- → ?
Webcompat Score: --- → 9
Priority: P1 → --
Summary: picture in picture doesn't play video and only displays UI elements → Picture in picture doesn't play video and only displays UI elements

For the record, we took a look and this seems intentional on YT's end.

Tweaking the title to make it more findable (and reflecting that this only affects YouTube).

Summary: Picture in picture doesn't play video and only displays UI elements → In m.youtube.com, PiP (Picture in picture) exits fullscreen (displays the browser toolbar) and doesn't play video
Flags: needinfo?(jolin)
Flags: needinfo?(calu)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

For the record, we took a look and this seems intentional on YT's end.

Although this may be intentional in YouTube's end, it would be great if the Firefox product we are using was capable of rendering the content as expected by the user.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

For the record, we took a look and this seems intentional on YT's end.

And this behavior also no longer works in Chrome for Android. In Chrome the user can select "desktop mode" to roughly approximate this behavior, but it's not the same thing.

After discussions with the Android engineers and Emilio and Paul, I believe the webcompat priority for this is below P2 at this point. It will be a higher product priority to figure out how address this (and we're supporting that work), but we're not addressing it due to webcompat breakage.

having the same issue :[

Per previous comments, this isn't a webcompat issue. Moving to Android

Webcompat Priority: ? → -
Webcompat Score: 9 → ---
Component: Site Reports → Browser Engine
Product: Web Compatibility → Firefox for Android
Whiteboard: [fxdroid][group4][webcompat:sightline] → [fxdroid][group4]
Whiteboard: [fxdroid][group4] → [fxdroid][group4][webcompat:sightline]
Webcompat Score: --- → 9

Adding PiP support similar to desktop would help generalize the solution.

User Story: (updated)
See Also: → 1625012
Webcompat Score: 9 → ---
Whiteboard: [fxdroid][group4][webcompat:sightline] → [fxdroid][group4]
Whiteboard: [fxdroid][group4] → [fxdroid][group4][webcompat:sightline]
Whiteboard: [fxdroid][group4][webcompat:sightline] → [fxdroid][group4]

Also see bug 1948844

The bug is marked as tracked for firefox138 (beta). However, the bug still isn't assigned.

:boek, could you please find an assignee for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)

No assignee for this bug for now.

Flags: needinfo?(jboek)
Severity: S2 → S3

I would like to also report having this same issue.

Samsung Galaxy A52s 5G
One UI 6.1
Android version 14
A528BZTSAGYA2

Phone and Firefox are both up to date.

Depends on: 1958322

Reproducible also on a Vivo v23 (Android 14) on Firefox for Android Beta 137.0, Beta 138.0b4, Nightly 139.0a1.

(In reply to Jonathan Almeida [:jonalmeida] from comment #14)

Adding PiP support similar to desktop would help generalize the solution.

This times a million! A general solution is such a good idea.

Up that alley, I'm not sure if this is the right time/place to even suggest this, but if you do happen to go down that route: If PiP floated above any open tab, as well as above android itself; That would be the most amazing multi-tasking feature ever.

PiP is that much more valuable on Mobile because of Mobile's more limited screen size. Today when we use PIP, the user can't actually browse other tabs without first closing PiP.

This is a reminder regarding comment #16!

The bug is marked as tracked for firefox138 (beta). We have limited time to fix this, the soft freeze is in 14 days. However, the bug still isn't assigned.

Keywords: leave-open
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c96460c76314 Add a Fenix-only JS webcompat intervention for m.youtube.com to fix picture-in-picture; r=padenot,denschub,webcompat-reviewers,webidl,smaug
Duplicate of this bug: 1960264
Duplicate of this bug: 1959881
Blocks: 1960601
Duplicate of this bug: 1828611

The severity field for this bug is set to S3. However, the following bug duplicate has higher severity:

:twisniewski, could you consider increasing the severity of this bug to S2?

For more information, please visit BugBot documentation.

Flags: needinfo?(twisniewski)
Severity: S3 → S2
Flags: needinfo?(twisniewski)

Note: This patch rolls up D244794, D244834, D244943, D245108, and D245557 for release uplift.

Note: This patch rolls up D244794, D244834, D244943, D245108, and D245557 for beta uplift.

Duplicate of this bug: 1961456
Attachment #9479412 - Attachment description: WIP: Bug 1956165 - Add a Fenix-only JS webcompat intervention for m.youtube.com to fix picture-in-picture; r?padenot,denschub → Bug 1956165 - Add a Fenix-only JS webcompat intervention for m.youtube.com to fix picture-in-picture;
Attachment #9479412 - Flags: approval-mozilla-release?

release Uplift Approval Request

  • User impact if declined: Picture-in-picture will not work on YouTube on Android.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Visit youtube.com. Begin playing any video. Click the YouTube fullscreen icon on the video to enter full screen mode. Press the home button on your phone/tablet to put Firefox in the background. Verify that the picture-in-picture window appears and continues to play the video. Verify that play/pause buttons on the PiP window appear to work. Verify that after ending PiP mode, the video continues to play/pause properly using the YouTube page's controls.
  • Risk associated with taking this patch: moderate
  • Explanation of risk level: The Gecko and GeckoView changes are quite self-contained, do not expose much new functionality, and are only really used by the related webcompat addon changes. The webcompat addon changes are likewise self-contained and only affect YouTube, and only while in picture-in-picture mode.
  • String changes made/needed: none
  • Is Android affected?: yes
Flags: qe-verify+
Attachment #9479413 - Attachment is obsolete: true
Regressions: 1961963
Blocks: 1962007

We'll verify the fix here after 1961963 will be also fixed.

bug 1961963 is now fixed. do you think you can take a look?

Flags: needinfo?(ljanos)

I'll be off the next two work days, Mira will take over the verification. Thank you!

Flags: needinfo?(ljanos) → needinfo?(mlobontiuroman)

release Uplift Approval Request

  • User impact if declined: Picture-in-picture will not work on YouTube on Android.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Visit youtube.com. Begin playing any video. Click the YouTube fullscreen icon on the video to enter full screen mode. Press the home button on your phone/tablet to put Firefox in the background. Verify that the picture-in-picture window appears and continues to play the video. Verify that play/pause buttons on the PiP window appear to work. Verify that after ending PiP mode, the video continues to play/pause properly using the YouTube page's controls. Also make sure it is possible to enter and exit fullscreen mode using YouTube's fullscreen icon.
  • Risk associated with taking this patch: moderate
  • Explanation of risk level: The Gecko and GeckoView changes are quite self-contained, do not expose much new functionality, and are only really used by the related webcompat addon changes. The webcompat addon changes are likewise self-contained and only affect YouTube, and only while in picture-in-picture mode.
  • String changes made/needed: none
  • Is Android affected?: yes

moving back to affected since it was reported this was not working by QA

Attached video PiP on OnePlus - Trim.mp4 β€”

Hi all! I've tested on the latest Firefox for Android Nightly 139.0a1 (build 2016087098 from 2025-04-24T23:42:19) and the PiP is not working as expected.
I have 2 different actual results:

  • on an OnePlus 5 (Android 10), the same toolbar is displayed, as before the fix, the video stops
  • on a Google Pixel 6 (Android 16), and on a Samsung Galaxy A14 (Android 14), the video pauses when entering PiP mode and cannot be played again until exiting Pip mode.
Flags: needinfo?(mlobontiuroman)

Verified as fixed on the latest Firefox for Android Nightly 139.0a1 from 4/25 (build 2016087218).
Tested with:

  • OnePlus 5 (Android 10),
  • Google Pixel 6 (Android 16), and
  • Samsung Galaxy Tab S9 Ultra (Android 14), and
  • Xiaomi Mi8 Lite (Android 10).

The PiP works as expected, the next video continues without pausing, pausing/resuming work.
Entering and exiting fullscreen works.

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Flags: qe-verify+
See Also: → 1962737

Actually, let's keep this open to make sure we track that we have a site patch shipped here (so we can remove the patch once we no longer need it, assuming that ever happens).

Status: RESOLVED → REOPENED
User Story: (updated)
Webcompat Priority: - → P1
Webcompat Score: --- → 9
Resolution: FIXED → ---
Whiteboard: [fxdroid][group4] → [fxdroid][group4][webcompat:sightline]
Webcompat Score: 9 → 5
Attachment #9479412 - Flags: approval-mozilla-release? → approval-mozilla-release+
Whiteboard: [fxdroid][group4][webcompat:sightline] → [fxdroid][group4]

We've tested on several devices, on all the Firefox for Android versions (138.0.2, Beta 139.0b4, Nightly 140.0a1), and these are the behaviors encountered:

  • on some devices when in PiP mode, and when tapping on "pause" then "play", the video is not restarting, no matter how many times the "play" option is tapped;
  • on other devices when in PiP mode, the toolbar is displayed, the video does not play at all (the initial issue).

The affected devices are:

  • Oppo Find X3 Lite (Android 11),
  • Samsung Galaxy A14 (Android 14),
  • Oppo Find X3 Neo (Android 11), and
  • Xiaomi 12T (Android 12) - only when updating the app, not on a fresh profile.

NOT reproducible on:

  • Google Pixel 6 (Android 16),
  • OnePlus 5 (Android 10),
  • Lenovo Tab X606X (Android 10).

Is this due to the post-migration delays?

Flags: needinfo?(twisniewski)
No longer duplicate of this bug: 1828611
See Also: → 1964984

An app store finally let me update the browser to the 138.0.2 version where this bug is supposed to be fixed, but it looks like it isn't (on Android 14, device : Samsung A33).
I also wanted to share the original fix I've been using before this update : I use an unpopular extension to edit my user-agent to something original (currently "Mozilla/5.0 (iPhone) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Lulu5239sPhoneThatWantsFreePopupMode"), and I open Firefox (set as default browser) from another app that I use in pop-up view (a feature of my phone) (so I can still use Firefox at the same time).

Using the steps above causes various issues (Youtube sometimes saying that I use an unsupported browser, videos being cropped when using full-screen mode, strange sizing when making the pop-up too large). Both using the Firefox app and watching videos at the same time really can be useful, maybe people can consider this a suggestion.

With this update, only editing the user-agent was needed to view videos using the normal pop-up mode (from the Firefox app not opened by another app) without the video pausing.

New update, which fixed the pip issue was installed, now the pip mode is showing properly, but whenever I press the home button in a fullscreen video, to enter pip, the video pauses and does not play even if play button is pressed.

Increasing the size of the pip screen sometimes allows the video to be played.

See Also: → 1828611

I'm going to try an updated approach here which should match YouTube's logic for detecting picture-in-picture mode. With luck that ought to improve the situation here across more phones.

I was also told that Focus and Reference Browser should support this, so I'll extend the intervention to all Android browser, not just Fenix.

Flags: needinfo?(twisniewski)
Keywords: leave-open
Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fb1baeb4c503 https://hg.mozilla.org/integration/autoland/rev/311f26077a9e alter the logic in our Android YouTube picture-in-picture intervention to better match YouTube's related code, to hopefully fix the issue on more phones; r=denschub,webcompat-reviewers

Good news, the patch I landed a few days ago does seem to be helping. I was just offered a Firefox nightly update on a Samsung phone, and confirm that I can enter and exit PiP mode fine there now (though the pause button on the PiP window is a little finicky, but at least it's progress). Mira, could we check on some of your other devices to see if the situation has improved on your end as well? (to confirm you're running with the update, check that about:support reports that the Web Compatibility Interventions add-on is at version 141.1.0, not 141.0.0 or earlier).

Flags: needinfo?(mlobontiuroman)
Duplicate of this bug: 1828611
Attached video Vivo-device-pip.mp4 β€”

Verified on the latest Firefox for Android Nightly 141.0a1 from 6/8 with the following devices:

  • Oppo Find X3 Lite (Android 11),
  • Samsung Galaxy A14 (Android 14),
  • Google Pixel 6 (Android 16),
  • Samsung Galaxy S24 (Android 15),
  • Oppo Find N2 Flip (Android 15),
  • Xiaomi Mi8 Lite (Android 10) - there is no pause/play option (there is a separate Bug 1912252 for this) - but videos can be played in PiP mode.

There is one device on which the issue still occurs: Vivo V23 (Android 14) - please see the attached short video.
Thomas, should I file a new ticket for this device?

Flags: needinfo?(mlobontiuroman) → needinfo?(twisniewski)

Thomas, should I file a new ticket for this device?

Sure, if it will help your own tracking. Though I'm leaving this bug open for now, to track that we have an intervention shipped, so we can also just use this bug to track which phones are still affected.

Flags: needinfo?(twisniewski)

PIP is still not working on my Samsung galaxy S10E.

For those following along, bear in mind that my most recent fix is still not in the regular release of Firefox, so unless you're running the nightly builds (or soon, the early betas for version 141), you will not those improvements yet. I'll try to find out if I can fast-track/uplift the changes, but it might still take some time.

Attachment #9496486 - Flags: approval-mozilla-release?

firefox-release Uplift Approval Request

  • User impact if declined: More Android users will have a broken picture-in-picture experience on YouTube.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: Specific phones are required for testing. Please see bug 1956165 for STR, and comment 52 for the list of phones.
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Only affects our webcompat addon, and YouTube, and is not a drastic change over what we are already shipping.
  • String changes made/needed: none
  • Is Android affected?: yes
Attachment #9496486 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attached image Pip_140.0.3.png β€”

Verified as fixed on the latest versions of Firefox for Android Nightly 142.0a1 from 06/30, Beta 141.0b4 and Dot Release 140.0.3 build 1 with the following devices:

  • LG G7 fit (Android 9)
  • Google Pixel 8 Pro (Android 15)
  • Google Pixel 7 (Android 16)
  • Oppo Find X3 New (Android 11)
  • Samsung S24 Ultra (Android 15)
  • Samsung S23 (Android 15)

The pip feature still does not work as expected on Vivo devices, tested with Vivo Y22s (Android 13).

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

Attachment

General

Creator:
Created:
Updated:
Size: