RESOLVED FIXED 79791
Setting mode for track element not working
https://bugs.webkit.org/show_bug.cgi?id=79791
Summary Setting mode for track element not working
Sam Dutton
Reported 2012-02-28 07:28:25 PST
Created attachment 129249 [details] Screenshot showing default rendering of track subtitles, though mode set to TextTrack.HIDDEN Simple example: http://html5-demos.appspot.com/static/video/track Expected behaviour: default subtitles should not be rendered: var track = video.textTracks[0]; track.mode = TextTrack.HIDDEN; What actually happens: subtitles rendered over video. Likewise, in track.js on http://www.samdutton.com/track I attempt to set the mode of the metadata track to 1 (TextTrack.HIDDEN). This is the track used for the text in the right hand box. Also doesn't work from Chrome Dev Tools. Try the following from the Dev Tools console: document.querySelector("video").textTracks[1].mode = TextTrack.HIDDEN According to the spec, it should be possible to change the text track mode: http://dev.w3.org/html5/spec/video.html#texttrack. (BTW: I'm pretty sure setting mode worked OK in Chrome ??18.) See also http://code.google.com/p/chromium/issues/detail?id=113413
Attachments
Screenshot showing default rendering of track subtitles, though mode set to TextTrack.HIDDEN (131.22 KB, image/png)
2012-02-28 07:28 PST, Sam Dutton
no flags
fixes problem, needs tests (1.57 KB, patch)
2012-04-02 17:03 PDT, Anna Cavender
no flags
including tests (5.71 KB, patch)
2012-04-03 13:11 PDT, Anna Cavender
no flags
Patch for landing (5.63 KB, patch)
2012-04-03 15:03 PDT, Anna Cavender
no flags
Patch for landing (5.63 KB, patch)
2012-04-03 16:27 PDT, Anna Cavender
no flags
Anna Cavender
Comment 1 2012-04-02 16:49:23 PDT
I believe the problem is that when the mode is set, m_showingByDefault remains true, when really it should be set to false. Patch coming shortly.
Anna Cavender
Comment 2 2012-04-02 17:03:05 PDT
Created attachment 135231 [details] fixes problem, needs tests
Eric Carlson
Comment 3 2012-04-03 09:48:58 PDT
This change looks OK, but we should have the test in the same patch.
Anna Cavender
Comment 4 2012-04-03 13:11:21 PDT
Created attachment 135405 [details] including tests
Eric Carlson
Comment 5 2012-04-03 14:49:06 PDT
Comment on attachment 135405 [details] including tests View in context: https://bugs.webkit.org/attachment.cgi?id=135405&action=review > LayoutTests/media/track/track-mode.html:16 > + Nit: this blank line is unnecessary.
Anna Cavender
Comment 6 2012-04-03 15:03:51 PDT
Created attachment 135436 [details] Patch for landing
WebKit Review Bot
Comment 7 2012-04-03 15:53:52 PDT
Comment on attachment 135436 [details] Patch for landing Rejecting attachment 135436 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/12317525
Anna Cavender
Comment 8 2012-04-03 16:27:31 PDT
Created attachment 135450 [details] Patch for landing
WebKit Review Bot
Comment 9 2012-04-03 17:04:40 PDT
Comment on attachment 135450 [details] Patch for landing Clearing flags on attachment: 135450 Committed r113110: <http://trac.webkit.org/changeset/113110>
WebKit Review Bot
Comment 10 2012-04-03 17:04:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.