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

Unified Diff: third_party/WebKit/Source/core/html/track/TextTrack.cpp

Issue 1079323002: Support text track selection in video controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from fs Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/track/TextTrack.cpp
diff --git a/third_party/WebKit/Source/core/html/track/TextTrack.cpp b/third_party/WebKit/Source/core/html/track/TextTrack.cpp
index 1cd60174bdb63963e3b387e178c1848c9b1bfd7f..70871fd393ab546b63a40ba6bd3fee269ce8dc2b 100644
--- a/third_party/WebKit/Source/core/html/track/TextTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/TextTrack.cpp
@@ -425,6 +425,18 @@ bool TextTrack::isRendered()
return true;
}
+bool TextTrack::canBeRendered()
+{
+ // A track can be displayed when it's of kind captions or subtitles and hasn't failed to load.
+ if (kind() != captionsKeyword() && kind() != subtitlesKeyword())
+ return false;
+
+ if (readinessState() == FailedToLoad)
philipj_slow 2016/03/01 08:51:40 This has been renamed to getReadinessState() in ht
srivats 2016/03/30 00:46:43 Done.
+ return false;
+
+ return true;
+}
+
TextTrackCueList* TextTrack::ensureTextTrackCueList()
{
if (!m_cues)

Powered by Google App Engine
This is Rietveld 408576698