Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 5558692f2650d0baa1f5ee8941d302f798161f0d..5f93cdf67a0f97c31d932cd46edeb5d4c963d4fd 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -2480,6 +2480,17 @@ void HTMLMediaElement::honorUserPreferencesForAutomaticTextTrackSelection() |
| if (m_closedCaptionsVisible) |
| configuration.forceEnableSubtitleOrCaptionTrack = true; |
| +#if OS(ANDROID) |
| + // Determine captions and subtitles visibility based on OS captions state only if the platform |
| + // is Android because the setting is currently only available on Android. |
| + Settings* settings = document().settings(); |
| + if (settings) { |
| + if (!settings->textTracksEnabled()) |
| + return; |
| + configuration.forceEnableSubtitleOrCaptionTrack = true; |
|
fs
2015/05/05 15:09:15
This flags forces _a_ track (any track) to be enab
philipj_slow
2015/05/06 09:54:27
This bit seems a bit odd to me as well. How about
srivats
2015/06/09 00:45:51
Done.
|
| + } |
| +#endif |
| + |
| AutomaticTrackSelection trackSelection(configuration); |
| trackSelection.perform(*m_textTracks); |