Closed Bug 1757814 Opened 3 years ago Closed 3 years ago

[PiP/subs] Some Youtube videos still don't display the subtitles in Picture-in-Picture

Categories

(Toolkit :: Picture-in-Picture, enhancement)

Desktop
All
enhancement

Tracking

()

VERIFIED FIXED
100 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- verified
firefox101 --- verified

People

(Reporter: danibodea, Assigned: kpatenio)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [fidefe-MR1-2022])

Attachments

(1 file)

Note

  • When the user loads some specific Youtube video, then enables subtitles/captions and lunches PiP, he will notice that the subtitles are not displayed on the PiP window, but in the main window.

Affected versions

  • Nightly v99.0a1

Affected platforms

  • all

Steps to reproduce

  1. Launch browser.
  2. Load https://www.youtube.com/watch?v=kaUemcqIQ-k
  3. Enable subtitles.
  4. Click the PiP button in the lower right area of the video.

Expected result

  • Subtitles are displayed in PiP.

Actual result

  • Subtitles are displayed in the main window (incorrectly).

Regression range

  • Not a recent regression, it's probably not YET supported.

Additional notes

  • Most of the Youtube videos show subtitles in PiP correctly, but it appears there are exceptions.

This is due to the fact that we try to read an element of class .ytp-caption-window-bottom to read the captions. However, in this video here, that element does not exist. I think the solution is to read the container .captions-text instead.

Blocks: 1751505

@kpatenio, do you think we need to be trying both of those classes, or does .captions-text always exist (when captions are on)?

(In reply to Molly Howell (she/her) [:mhowell] from comment #2)

@kpatenio, do you think we need to be trying both of those classes, or does .captions-text always exist (when captions are on)?

.captions-text by itself will suffice , since it should exist as long as ytp-caption-window-container exists.

Whiteboard: [fidefe-MR1-2022]

After having read this ticket again, I might have misunderstood @mhowell's question and not answered very clearly To clarify, we can technically just read .captions-text by itself to read the subtitles text. Alternatively, we can continue utilizing .caption-visual-line, which represents each individual cue; in this case, rather than reading .ytp-caption-window-bottom, let's replace it with .captions-text.

Assignee: nobody → kpatenio
Status: NEW → ASSIGNED
Pushed by kpatenio@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/04fa8d0e9700 update captions container for youtube pip captions support. r=pip-reviewers,mhowell
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch

The fix was verified in Nightly v100.0a1 from 2022-03-15 on Windows 10, Mac OS 11 and Ubuntu 20/22.

Status: RESOLVED → VERIFIED

Unfortunately, it seems that the fix is only working for Nightly.
The Nightly v101.0a1 from 2022-04-04 shows the video's subtitles in the PiP, but the Beta 100.0b1 does not.
Should this fix not be riding the trains?

Thanks!

Status: VERIFIED → REOPENED
Flags: needinfo?(amininkova)
Resolution: FIXED → ---
Version: unspecified → Firefox 100

This should definitely be riding the 100 train, Katherine, would you please take a look at what might be the root cause when you have a chance?

Flags: needinfo?(amininkova) → needinfo?(kpatenio)

After further testing, it appears that the subtitles don't work AT ALL in Beta 100. The cause is unknown to me. I have logged bug 1763190 for this and will leave this one fixed until I can also verify the beta channel.

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

Cross-posting a comment I made in Bug 1763190:

It seems we restrict the creation of new video wrappers - which is needed for Netflix, Prime Video, etc. fixes - to Nightly. We need to update the imposed condition to work on beta.

Flags: needinfo?(kpatenio)
Version: Firefox 100 → unspecified

This fix has also been verified in Beta v100.0b4 on Windows 10, Mac OS 11 and Ubuntu 20.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: