Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Issue 2539023002: Media Controls: Use events to update controls for closed captions. (Closed)

Created:
4 years ago by mlamouri (slow - plz ping)
Modified:
4 years ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, Srirama, vcarbune.chromium
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Media Controls: Use events to update controls for closed captions. This is using addtrack, removetrack and change events on the TextTrackList exposed on the media element to be notified and update the closed captions button. Because the events are asynchronous, some tests have to be modified to be asynchronous. They have been moved to media/controls/ too. There is one hook that was added in order to notify the controls that an HTMLTrackElement failed to load. There is no clear way to figure that out otherwise. An HTML issue has been opened: https://github.com/whatwg/html/issues/2121 BUG=662761 Committed: https://crrev.com/a069837e9fe584243f357ca535ca0bebd0b7de85 Cr-Commit-Position: refs/heads/master@{#436321}

Patch Set 1 #

Patch Set 2 : ready for review #

Total comments: 8

Patch Set 3 : fix test #

Patch Set 4 : zqzhang review comments #

Patch Set 5 : zqzhang review comments #

Total comments: 18

Patch Set 6 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+296 lines, -267 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-updates-appropriately.html View 1 2 2 chunks +25 lines, -20 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html View 1 2 3 4 5 1 chunk +72 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/controls/closed-captions-on-off.html View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/controls/closed-captions-single-track.html View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/controls/closed-captions-switch-track.html View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/track/text-track-selection-menu-multiple-tracks.html View 1 1 chunk +0 lines, -37 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/video-controls-caption-single-track.html View 1 1 chunk +0 lines, -46 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/video-controls-captions.html View 1 1 chunk +0 lines, -69 lines 0 comments Download
D third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html View 1 1 chunk +0 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 11 chunks +20 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControls.h View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControls.cpp View 1 2 3 3 chunks +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp View 1 2 3 3 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (14 generated)
mlamouri (slow - plz ping)
zqzhang@ for local review. foolip@ mostly FYI regarding the spec issue.
4 years ago (2016-11-30 18:30:27 UTC) #5
Zhiqiang Zhang (Slow)
lgtm w/ nits https://codereview.chromium.org/2539023002/diff/20001/third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html File third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html (right): https://codereview.chromium.org/2539023002/diff/20001/third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html#newcode39 third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html:39: addUnloadableHTMLTrackElement(); nit: This test seems too ...
4 years ago (2016-12-01 12:20:46 UTC) #12
mlamouri (slow - plz ping)
zqzhang comments applied. foolip@, PTAL https://codereview.chromium.org/2539023002/diff/20001/third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html File third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html (right): https://codereview.chromium.org/2539023002/diff/20001/third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html#newcode39 third_party/WebKit/LayoutTests/media/controls/closed-captions-dynamic-update.html:39: addUnloadableHTMLTrackElement(); On 2016/12/01 at ...
4 years ago (2016-12-01 22:22:54 UTC) #13
foolip
lgtm % nits https://codereview.chromium.org/2539023002/diff/80001/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-updates-appropriately.html File third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-updates-appropriately.html (right): https://codereview.chromium.org/2539023002/diff/80001/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-updates-appropriately.html#newcode53 third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-updates-appropriately.html:53: setTimeout(t.step_func_done(_ => { TIL that setTimeout.length==1, ...
4 years ago (2016-12-02 11:29:17 UTC) #14
mlamouri (slow - plz ping)
Comments applied. FWIW, these tests were moved so not sure if they needed so much ...
4 years ago (2016-12-05 15:17:56 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2539023002/100001
4 years ago (2016-12-05 15:18:32 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-05 16:44:23 UTC) #20
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/a069837e9fe584243f357ca535ca0bebd0b7de85 Cr-Commit-Position: refs/heads/master@{#436321}
4 years ago (2016-12-05 16:46:05 UTC) #22
foolip
4 years ago (2016-12-06 15:39:54 UTC) #23
Message was sent while issue was closed.
On 2016/12/05 15:17:56, mlamouri wrote:
> Comments applied. FWIW, these tests were moved so not sure if they needed so
> much reviewing :)

Oops :( Probably because of the file names, I just assumed obsolete tests were
deleted and new ones were written.

Powered by Google App Engine
This is Rietveld 408576698