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

Issue 1118613002: Hook up Android closed captions 'enabled' setting to Blink (Closed)

Created:
5 years, 7 months ago by srivats
Modified:
5 years, 5 months ago
Reviewers:
tkent, philipj_slow, fs
CC:
blink-reviews, sof, arv+blink, blink-reviews-dom_chromium.org, vivekg, gasubic, eae+blinkwatch, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, nessy, vivekg_samsung, Inactive, blink-reviews-html_chromium.org, vcarbune.chromium, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Hook up Android closed captions 'enabled' setting to Blink Plumb down captions state setting from platform to media element in Blink. Register the media element to listen for changes to the platform setting and act on it immediately. Influence automatic track selection to prefer captions over subtitles when the platform setting indicates a preference for captions. Chromium-side CL: https://codereview.chromium.org/1110103004/ BUG=457850, 388588 TEST=media* Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198661

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed comments from tkent #

Total comments: 1

Patch Set 3 : Have the flag influence automatic track selection #

Total comments: 7

Patch Set 4 : Updated automatic track selection logic #

Total comments: 5

Patch Set 5 : Addressed comment from fs #

Total comments: 16

Patch Set 6 : Addressed comments from fs #

Total comments: 34

Patch Set 7 : Addressed nits and some comments #

Patch Set 8 : Prioritize language over kind in auto track selection #

Total comments: 6

Patch Set 9 : Rebase and addressed lgtm nits #

Total comments: 12

Patch Set 10 : Addressed Philip's comments #

Total comments: 1

Patch Set 11 : Addressed lgtm comment and rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -31 lines) Patch
A LayoutTests/media/track/track-kind-user-preference.html View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A LayoutTests/media/track/track-kind-user-preference-expected.txt View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
M LayoutTests/media/track/track-language-preference.html View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/frame/Settings.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/Settings.in View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/frame/SettingsDelegate.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -7 lines 0 comments Download
M Source/core/html/track/AutomaticTrackSelection.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -1 line 0 comments Download
M Source/core/html/track/AutomaticTrackSelection.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +24 lines, -15 lines 0 comments Download
A Source/core/html/track/TextTrackKindUserPreference.h View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/html/track/TextTrackList.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/track/TextTrackList.cpp View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/page/Page.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/testing/InternalSettings.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/testing/InternalSettings.cpp View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M Source/core/testing/InternalSettings.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebSettingsImpl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -7 lines 0 comments Download
M Source/web/WebSettingsImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M public/web/WebSettings.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (5 generated)
srivats
Hi tkent, This is the Blink-side implementation for hooking up the Android platform closed captions ...
5 years, 7 months ago (2015-04-29 23:31:48 UTC) #2
tkent
+fs and philipj
5 years, 7 months ago (2015-04-29 23:51:31 UTC) #4
tkent
https://codereview.chromium.org/1118613002/diff/1/Source/core/dom/Document.h File Source/core/dom/Document.h (right): https://codereview.chromium.org/1118613002/diff/1/Source/core/dom/Document.h#newcode1420 Source/core/dom/Document.h:1420: Vector<HTMLMediaElement*> m_textTracksVisibilityChangedElements; Setting change won't happen so frequently, and ...
5 years, 7 months ago (2015-04-29 23:58:44 UTC) #5
srivats
https://codereview.chromium.org/1118613002/diff/1/Source/core/dom/Document.h File Source/core/dom/Document.h (right): https://codereview.chromium.org/1118613002/diff/1/Source/core/dom/Document.h#newcode1420 Source/core/dom/Document.h:1420: Vector<HTMLMediaElement*> m_textTracksVisibilityChangedElements; On 2015/04/29 23:58:44, Slow until end of ...
5 years, 7 months ago (2015-05-01 23:03:31 UTC) #7
fs
Please expand on the intended semantics of this flag/setting - it seems to be too ...
5 years, 7 months ago (2015-05-04 14:58:26 UTC) #8
srivats
On 2015/05/04 14:58:26, fs wrote: > Please expand on the intended semantics of this flag/setting ...
5 years, 7 months ago (2015-05-05 01:38:50 UTC) #9
fs
On 2015/05/05 01:38:50, srivats wrote: > On 2015/05/04 14:58:26, fs wrote: > > Please expand ...
5 years, 7 months ago (2015-05-05 11:12:46 UTC) #10
fs
https://codereview.chromium.org/1118613002/diff/60001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1118613002/diff/60001/Source/core/html/HTMLMediaElement.cpp#newcode2490 Source/core/html/HTMLMediaElement.cpp:2490: configuration.forceEnableSubtitleOrCaptionTrack = true; This flags forces _a_ track (any ...
5 years, 7 months ago (2015-05-05 15:09:16 UTC) #11
srivats
On 2015/05/05 15:09:16, fs wrote: > https://codereview.chromium.org/1118613002/diff/60001/Source/core/html/HTMLMediaElement.cpp > File Source/core/html/HTMLMediaElement.cpp (right): > > https://codereview.chromium.org/1118613002/diff/60001/Source/core/html/HTMLMediaElement.cpp#newcode2490 > ...
5 years, 7 months ago (2015-05-06 00:19:29 UTC) #12
fs
On 2015/05/06 00:19:29, srivats wrote: > On 2015/05/05 15:09:16, fs wrote: > > > https://codereview.chromium.org/1118613002/diff/60001/Source/core/html/HTMLMediaElement.cpp ...
5 years, 7 months ago (2015-05-06 09:11:14 UTC) #13
philipj_slow
https://codereview.chromium.org/1118613002/diff/60001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1118613002/diff/60001/Source/core/dom/Document.cpp#newcode678 Source/core/dom/Document.cpp:678: for (HTMLMediaElement* mediaElement = Traversal<HTMLMediaElement>::firstWithin(*this); mediaElement; There's alrady a ...
5 years, 7 months ago (2015-05-06 09:54:27 UTC) #14
srivats
https://codereview.chromium.org/1118613002/diff/60001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1118613002/diff/60001/Source/core/dom/Document.cpp#newcode678 Source/core/dom/Document.cpp:678: for (HTMLMediaElement* mediaElement = Traversal<HTMLMediaElement>::firstWithin(*this); mediaElement; On 2015/05/06 09:54:27, ...
5 years, 6 months ago (2015-06-09 00:45:51 UTC) #15
fs
https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (right): https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp#newcode77 Source/core/html/track/AutomaticTrackSelection.cpp:77: int highestCaptionTrackScore = 0; I'd think it would be ...
5 years, 6 months ago (2015-06-09 16:03:57 UTC) #16
srivats
https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (right): https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp#newcode77 Source/core/html/track/AutomaticTrackSelection.cpp:77: int highestCaptionTrackScore = 0; On 2015/06/09 16:03:57, fs wrote: ...
5 years, 6 months ago (2015-06-10 19:55:16 UTC) #17
fs
https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (right): https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp#newcode77 Source/core/html/track/AutomaticTrackSelection.cpp:77: int highestCaptionTrackScore = 0; On 2015/06/10 19:55:15, srivats wrote: ...
5 years, 6 months ago (2015-06-11 10:46:05 UTC) #18
srivats
On 2015/06/11 10:46:05, fs wrote: > https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp > File Source/core/html/track/AutomaticTrackSelection.cpp (right): > > https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp#newcode77 > ...
5 years, 6 months ago (2015-06-22 22:48:24 UTC) #19
srivats
5 years, 6 months ago (2015-06-22 22:48:38 UTC) #20
fs
On 2015/06/22 22:48:24, srivats wrote: > On 2015/06/11 10:46:05, fs wrote: > > > https://codereview.chromium.org/1118613002/diff/80001/Source/core/html/track/AutomaticTrackSelection.cpp ...
5 years, 6 months ago (2015-06-23 09:23:58 UTC) #21
srivats
https://codereview.chromium.org/1118613002/diff/100001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1118613002/diff/100001/Source/core/html/HTMLMediaElement.cpp#newcode3302 Source/core/html/HTMLMediaElement.cpp:3302: for (unsigned i = 0; i < m_textTracks->length(); ++i) ...
5 years, 6 months ago (2015-06-24 01:40:20 UTC) #22
fs
LGTM w/ nits philipj? https://codereview.chromium.org/1118613002/diff/120001/Source/core/dom/Document.h File Source/core/dom/Document.h (right): https://codereview.chromium.org/1118613002/diff/120001/Source/core/dom/Document.h#newcode56 Source/core/dom/Document.h:56: #include "core/html/track/TextTrackKindUserPreference.h" Don't appear to ...
5 years, 6 months ago (2015-06-24 08:59:08 UTC) #23
philipj_slow
https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html File LayoutTests/media/track/track-kind-user-preference.html (right): https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html#newcode63 LayoutTests/media/track/track-kind-user-preference.html:63: track.setAttribute('onload', 'trackLoaded()'); Hmm, why is this track being loaded ...
5 years, 5 months ago (2015-06-24 09:54:20 UTC) #24
fs
https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (left): https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp#oldcode153 Source/core/html/track/AutomaticTrackSelection.cpp:153: TrackGroup captionAndSubtitleTracks(TrackGroup::CaptionsAndSubtitles); On 2015/06/24 09:54:20, philipj wrote: > I ...
5 years, 5 months ago (2015-06-24 10:23:26 UTC) #25
philipj_slow
https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (left): https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp#oldcode153 Source/core/html/track/AutomaticTrackSelection.cpp:153: TrackGroup captionAndSubtitleTracks(TrackGroup::CaptionsAndSubtitles); On 2015/06/24 10:23:26, fs wrote: > On ...
5 years, 5 months ago (2015-06-24 10:26:16 UTC) #26
srivats
On 2015/06/24 10:26:16, philipj wrote: > https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp > File Source/core/html/track/AutomaticTrackSelection.cpp (left): > > https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp#oldcode153 > ...
5 years, 5 months ago (2015-07-02 00:25:33 UTC) #27
srivats
https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html File LayoutTests/media/track/track-kind-user-preference.html (right): https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html#newcode63 LayoutTests/media/track/track-kind-user-preference.html:63: track.setAttribute('onload', 'trackLoaded()'); On 2015/06/24 09:54:19, philipj wrote: > Hmm, ...
5 years, 5 months ago (2015-07-02 01:41:22 UTC) #28
fs
On 2015/07/02 00:25:33, srivats wrote: > On 2015/06/24 10:26:16, philipj wrote: > > > https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/track/AutomaticTrackSelection.cpp ...
5 years, 5 months ago (2015-07-02 08:20:56 UTC) #29
philipj_slow
I agree, simply prioritizing language over kind seems like a good start, one that we ...
5 years, 5 months ago (2015-07-02 08:54:43 UTC) #30
srivats
On 2015/07/02 08:54:43, philipj wrote: > I agree, simply prioritizing language over kind seems like ...
5 years, 5 months ago (2015-07-07 01:04:17 UTC) #31
srivats
5 years, 5 months ago (2015-07-07 01:04:34 UTC) #32
fs
LGTM w/ nits https://codereview.chromium.org/1118613002/diff/160001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (left): https://codereview.chromium.org/1118613002/diff/160001/Source/core/html/track/AutomaticTrackSelection.cpp#oldcode123 Source/core/html/track/AutomaticTrackSelection.cpp:123: if (textTrack != trackToEnable) Nit: Restore ...
5 years, 5 months ago (2015-07-07 08:22:05 UTC) #33
srivats
https://codereview.chromium.org/1118613002/diff/160001/Source/core/html/track/AutomaticTrackSelection.cpp File Source/core/html/track/AutomaticTrackSelection.cpp (left): https://codereview.chromium.org/1118613002/diff/160001/Source/core/html/track/AutomaticTrackSelection.cpp#oldcode123 Source/core/html/track/AutomaticTrackSelection.cpp:123: if (textTrack != trackToEnable) On 2015/07/07 08:22:05, fs wrote: ...
5 years, 5 months ago (2015-07-07 18:44:49 UTC) #34
philipj_slow
https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html File LayoutTests/media/track/track-kind-user-preference.html (right): https://codereview.chromium.org/1118613002/diff/120001/LayoutTests/media/track/track-kind-user-preference.html#newcode63 LayoutTests/media/track/track-kind-user-preference.html:63: track.setAttribute('onload', 'trackLoaded()'); On 2015/07/02 01:41:19, srivats wrote: > On ...
5 years, 5 months ago (2015-07-09 15:20:49 UTC) #35
philipj_slow
OK, I'm on board with this now I think, just some nits. https://codereview.chromium.org/1118613002/diff/180001/Source/core/html/track/AutomaticTrackSelection.h File Source/core/html/track/AutomaticTrackSelection.h ...
5 years, 5 months ago (2015-07-09 15:34:09 UTC) #36
srivats
https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/HTMLMediaElement.cpp#newcode3292 Source/core/html/HTMLMediaElement.cpp:3292: void HTMLMediaElement::automaticTrackSelectionForUpdatedUserPreference() On 2015/07/09 15:20:49, philipj wrote: > On ...
5 years, 5 months ago (2015-07-09 21:25:37 UTC) #37
philipj_slow
https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1118613002/diff/120001/Source/core/html/HTMLMediaElement.cpp#newcode3292 Source/core/html/HTMLMediaElement.cpp:3292: void HTMLMediaElement::automaticTrackSelectionForUpdatedUserPreference() On 2015/07/09 21:25:37, srivats wrote: > On ...
5 years, 5 months ago (2015-07-09 22:36:26 UTC) #38
philipj_slow
This now LGTM % documentation out of sync https://codereview.chromium.org/1118613002/diff/200001/public/web/WebSettings.h File public/web/WebSettings.h (right): https://codereview.chromium.org/1118613002/diff/200001/public/web/WebSettings.h#newcode104 public/web/WebSettings.h:104: // ...
5 years, 5 months ago (2015-07-09 22:39:35 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1118613002/220001
5 years, 5 months ago (2015-07-10 03:50:04 UTC) #42
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 05:18:12 UTC) #43
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198661

Powered by Google App Engine
This is Rietveld 408576698