Closed Bug 980343 Opened 10 years ago Closed 6 years ago

[webvtt] Subtitle is not displayed in snapshots

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: adalucinet, Unassigned)

Details

Reproducible on:
Firefox 28 beta 8 (BuildID: 20140303165517): 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
the latest Aurora (BuildID: 20140306004001): 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
the latest Nightly (BuildID: 20140306030201): 
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Firefox/30.0

STR:
1. Launch Firefox.
2. Navigate to http://people.mozilla.org/~rgiles/2013/demo.html and click play.
3. Pause the video while the subtitle is displayed. 
4. Right click on the video and take a snapshot.

Expected results: The subtitle is visible in the snapshot.

Actual results: The subtitle is not visible in the snapshot.

Notes:
1. Reproducible also on Mac OS X 10.8.5 and Ubuntu 13.10 64 bit.
2. Regarding the expected result, I'm not sure if the intention is to display subtitles in snapshots or not.
3. Not a regression - not reproducible with Nightly from 2013-10-29 when the <track> element was first displayed.
4. The subtitle is visible when using print screen or "screenshot" in Developer Toolbar.
It looks like we save the snapshot by drawing the video element into a canvas context. We probably don't render the subtitles, controls or poster image into the canvas, and that's why they don't show up. They show up in OS-level screenshots because it pulls the data from the final composited frame, not directly from the source video.

 http://dxr.mozilla.org/mozilla-central/source/browser/base/content/nsContextMenu.js#1023

I don't know if they should be present or not, but it seems reasonable that one would want subtitles and poster images, but perhaps not controls, from a drawImage() call.

Can you check what other browsers do?
FWIW I asked on #content and sicking said the current behavior is fine.

Reading the spec, I think we can rule out poster; drawImage is supposed to fail when the video element's readyState is HAVE_NOTHING or HAVE_METADATA.

  http://www.whatwg.org/specs/web-apps/current-work/#image-sources-for-2d-rendering-contexts

Controls and subtitle overlays are less obvious. It says, " the frame at the current playback position when the method with the argument is invoked must be used as the source" which is ambiguous. Once we know what other browsers do, I can ask on the whatwg list what people think and hopefully get the spec clarified. Or you can, if you'd rather.
(In reply to Ralph Giles (:rillian) from comment #1)
> Can you check what other browsers do?
Thanks for your prompt reply.
Chrome, Opera and IE don't have the option "Save Snapshot As.." in the contextual menu.
Good to know. The bigger issue is whether the captions are available when capturing a snapshot from script. Can you make a test page which calls drawImage() with a video element and check whether the output includes displayed captions on other browsers?
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity.
Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.