Closed Bug 1758578 Opened 4 months ago Closed 3 months ago

Firefox Doesn't Render HTML5 Video Captions (VTT)

Categories

(Core :: Audio/Video: Playback, defect, P4)

Firefox 97
defect

Tracking

()

RESOLVED DUPLICATE of bug 1733232

People

(Reporter: agajan.jumakuliyev, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36

Steps to reproduce:

First of all I just wanted to point out that this issue also reproducible with open source players, such as HLSjs. In order to simplify and isolate the issue, I also reproduced it with a simple HTML5 video.

Here is a test page I put together for convenience:
https://vidtech.cbsinteractive.com/cvp/sandbox/agajan/firefox/

Steps to reproduce are outlined below:

  1. Open a new Firefox browser window:
  • Play video, enable captions: ✅ closed captions are visible.
  • Refresh page, play video, enable captions: ✅ closed captions are visible.
  1. After interacting with Local Storage (eg. Delete all):
  • Play video, enable captions: ❌ closed captions are not visible.
  • Refresh page, play video, enable captions: ❌ closed captions are not visible.
  1. Close and re-open Firefox browser:
  • Play video, enable captions: ✅ closed captions are visible.
  • Refresh page, play video, enable captions: ✅ closed captions are visible.

In case if it helps, here is also a video recording of the issue:
https://user-images.githubusercontent.com/6349671/157053507-a96025b2-94d1-4cbf-8e31-060ab2390941.mp4

UserAgent:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0"

Actual results:

Firefox does not display Closed Captions, even if the textTrack mode of the video element is set to "showing" and VTT cues are present

Expected results:

Firefox should display closed captions

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Interestingly, I could only reproduce it once on my Windows 10. But most of time I couldn't reproduce this on Fx98 on my Windows 10 and MacOS 12.2. Set it to P5 because it's a really minor issue.

Blocks: webvtt
Severity: -- → S4
Priority: -- → P4

For us it is reproducible much more frequently than just once. Not having captions violates FCC rules and this is blocking a release of a major media company's application. I would appreciate if you reconsider its priority status. Its a major issue for us

But in what situation you would need to clean the local storage? This seems an uncommon operation TBH. Also, most major media sites use their own player to control the subtitle, eg. Youtube, which won't be affected by this issue.

@alastor - thanks for your reply. My name is Annika and I work in the video product team of Paramount, who is working together with Agajan on this issue. We currently have 7 sites live using this player, with the 8th in the pipeline for launch shortly.

Our legal team has already picked up on this issue and is looking for a fix asap as this exposes the company to possible fines for violation with the FCC requirements. We already tried resolving this issue on our end, but concluded that we need your support. It would be great if you can give us an ETA for this fix.

@alastor Cleaning local storage is not mandatory to reproduce this. It just makes it more apparent and easier to reproduce. You will reproduce it also in Firefox private mode. Our player doesn't render captions. We rely on a browser to do it natively.

If the issue can be reproduced without cleaning the local storage, could you help me capture debug log by using MOZ_LOG=WebVTT:5 and turn on the pref media.webvtt.debug.logging?

Thank you.

Sorry I was occupied with other tasks past few days. Ok, I am working on it. I will get logs to you as soon as possible.
I went through your doc about how to collect logs. The only thing I am not sure about is media.webvtt.debug.logging. I am not sure how and where to enable that pref.

Oh, you would need to go to about:config and type media.webvtt.debug.logging, then turn it on!

Please check the attached screen recording and logs below.

Screen recording:
https://drive.google.com/file/d/1M1V4VzPazK1mviRXuheifWY0ZnWOUgSq/view?usp=sharing

Observations:

  1. closed captions are visible, working as expected - also after refreshing the page.
  2. after interacting with localStorage (any interaction: in the latest screen recording - at 00:50 - I'm running a simple
    localStorage.setItem('test', 'foo') in console) and then refreshing the page, the captions are not visible anymore.

Firefox logs:
https://drive.google.com/uc?id=11wOF15zzCMEPzStOedYjcXO6ywrjXHow&export=download

Thanks

The reason of setting this bug as P4/S4 is because cleaning the local storage is not a common situation, and in the comment10 it's still required to modify modifying the local storage in order to let the issue happen.

I checked the log WebVTT:5, the cues were all parsed and selected correctly. So the problem might be on the side of displaying. But weird thing is that, I didn't see the display log from media.webvtt.debug.logging. Could you help me try that again, only use media.webvtt.debug.logging but without using any other MOZ_LOG, and see if any log displays? They should look like this, [vtt] ......

In addition, I wonder if this issue can only be reproduced on MacOS? Could you reproduce this on other platforms? Could you reproduce this issue on a private browsing window? or on a fresh Firefox profile?

It would also be worth to check this console to see if there is any suspicious error message showing when the issue happens.

Thank you.

Flags: needinfo?(fausto.quaggia)

First of all I just wanted to point out that this issue also reproducible with open source players, such as HLSjs

When you said using other open source players, do those player render subtitle by themselves? If so, then this issue might not be related with webvtt, higher chance to relate with the local storage instead.

Flags: needinfo?(agajan.jumakuliyev)

Hi Alastor Wu,
thanks for your reply.

I tried again with just media.webvtt.debug.logging enabled and without any other MOZ_LOG specified. I was not able to see the logs in console, though. The page we are testing is: https://vidtech.cbsinteractive.com/cvp/sandbox/agajan/firefox/

The described issue happens more frequently (but not exclusively) when interacting with the localStorage, but I was able to observe it also in different conditions: without interacting with localStorage, just randomly refreshing the page and re-playing the video, sometimes captions are not visible.

The issue has been observed on different operative systems, not only MacOS, but it happens only using Firefox browser (since v 92).

Thank you

Flags: needinfo?(fausto.quaggia)

Oh if that happens since Fx92, it would probably be bug 1733232. Would you mind to help me use mozregression to see if you could find the culprit?
Thank you.

Flags: needinfo?(fausto.quaggia)

(In reply to Fausto Quaggia from comment #14)

I tried again with just media.webvtt.debug.logging enabled and without any other MOZ_LOG specified. I was not able to see the logs in console, though. The page we are testing is: https://vidtech.cbsinteractive.com/cvp/sandbox/agajan/firefox/

Ok, When I was debugging bug1760713, I also couldn't see any log, I guess they both hit the same issue described in bug 1733232.

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1733232
You need to log in before you can comment on or make changes to this bug.