Closed Bug 1364185 Opened 7 years ago Closed 7 years ago

Captions do not disappear when setting TextTrack.mode to 'hidden'

Categories

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

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: andredesroches2010, Assigned: bechen)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 Steps to reproduce: 1) Open a page with a video tag with captions, e.g: https://thepaciellogroup.github.io/AT-browser-tests/test-files/video.html 2) Enable captions using the native controls 3) Inspect the video element 4) Set $0.textTracks[0].mode = 'hidden' in the console. Actual results: Captions remain visible. They will disappear when hovering over the video causes the UI to re-draw when the controls become visible. Expected results: Captions should be hidden immediately upon setting mode to hidden. This is especially problematic when the native controls are disabled, in that case it only seems to re-draw and hide the captions when the video is seeked or when the cue changes. Note that setting mode to 'disabled' doesn't have the same issue.
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
It works as expected (as you described in your expected results) for me in Nightly (55.0a1 (2017-05-10) (64 bits)). The caption immediately disappears when I enter $0.textTracks[0].mode = 'hidden' in the console while the video is playing. No need to hover over the video, I did not move the cursor.
WFM with FF53 on Win 7.
Sorry to clarify this happens for me on 53.0.2 (64-bit) on Mac (MacOS Sierra 10.12.4)
(In reply to Andre Desroches from comment #3) > Sorry to clarify this happens for me on 53.0.2 (64-bit) on Mac (MacOS Sierra > 10.12.4) Can you check with a fresh profile : https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles If it works on a fresh profile, then it's probably one of your addons that is the issue. If it does not work, can you test on the latest Nightly (https://www.mozilla.org/fr/firefox/channel/desktop/#nightly). If it works on the latest nightly, then the bug will be closed as "WORKSFORME".
Flags: needinfo?(andredesroches2010)
I tried with a new profile and in the latest nightly 55.0a1 (2017-05-12) (64-bit) on MacOS and the issue still occurs. It's easier to repro if you pause the video before setting the mode to hidden.
Flags: needinfo?(andredesroches2010)
I checked, if the video is paused, then of course the caption does not disappear when you change the value to hidden. If it had not changed after restart or immediately when the video is playing, I would have understood the bug. But in this particular case, I don't see the problem. The caption disappear when the video plays, as expected. Can you explain the usecase of wanting the caption to disappear from a frame in a paused video? As long as they disappear when you restart the video (which they do)?
Flags: needinfo?(andredesroches2010)
From the W3C Video Element spec (https://www.w3.org/TR/2011/WD-html5-20110113/video.html): Hidden Indicates that the text track is active, but that the user agent is not actively displaying the cues. So the captions are expected to not be visible when hidden, regardless of whether the video is playing/paused/restarted. This is how other browsers implemented the spec so developers/users would expect Firefox to behave similarly, rather than have developers implement workarounds.
Flags: needinfo?(andredesroches2010)
OK, I confirm the bug. In that Firefox's behavior is what you describe when the video is paused As to whether it is the expected behavior or not, I don't know.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Benjamin, Can you help check it?
Flags: needinfo?(bechen)
Priority: -- → P1
Assignee: nobody → bechen
Flags: needinfo?(bechen)
Comment on attachment 8867614 [details] Bug 1364185 - Call DispatchUpdateCueDisplay() in TextTrackManager::NotifyCueUpdated. https://reviewboard.mozilla.org/r/139184/#review142470 ::: dom/html/TextTrackManager.cpp:830 (Diff revision 1) > TextTrackManager::NotifyCueUpdated(TextTrackCue *aCue) > { > // TODO: Add/Reorder the cue to mNewCues if we have some optimization? > WEBVTT_LOG("NotifyCueUpdated"); > DispatchTimeMarchesOn(); > + // For the case "Texttrack.mode = hidden", the TimeMarchesOn nits : We should modify this comment, it's not just about "hidden", because the display would also not be updated immediately when we change mode from "hidden" to "showing".
Attachment #8867614 - Flags: review?(alwu) → review+
Keywords: checkin-needed
hg error in cmd: hg push -r tip ssh://hg.mozilla.org/integration/autoland: pushing to ssh://hg.mozilla.org/integration/autoland searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: remote: remote: ************************** ERROR **************************** remote: Rev 527517360a48 needs "Bug N" or "No bug" in the commit message. remote: bechen <bechen@mozilla.com> remote: Bug1364185 - Call DispatchUpdateCueDisplay() in TextTrackManager::NotifyCueUpdated. r=alwu remote: remote: If the video is paused, then set the "TextTrack.mode=hidden/showing", in this case, TimeMarchesOn will return at step 7, remote: so the hidden cue still remain on the screen. So call DispatchUpdateCueDisplay explicitly to update the screen. remote: remote: MozReview-Commit-ID: IuazaeSXX31 remote: ************************************************************* remote: remote: remote: transaction abort! remote: rollback completed remote: pretxnchangegroup.c_commitmessage hook failed abort: push failed on remote
Keywords: checkin-needed
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2dc093cc8d32 Call DispatchUpdateCueDisplay() in TextTrackManager::NotifyCueUpdated. r=alwu
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: