Chromium Code Reviews| Index: Source/core/html/track/TextTrack.cpp |
| diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp |
| index 3916eb7159ac8f3b29f831a64debde7c48ff5597..e87191fa7bcf03bd720931d2c6c26353efbc52dd 100644 |
| --- a/Source/core/html/track/TextTrack.cpp |
| +++ b/Source/core/html/track/TextTrack.cpp |
| @@ -458,6 +458,14 @@ int TextTrack::trackIndexRelativeToRenderedTracks() |
| return m_renderedTrackIndex; |
| } |
| +bool TextTrack::isRenderable() |
| +{ |
| + // A track can be displayed when it's of kind captions or subtitles and hasn't failed to load |
|
philipj_slow
2015/05/05 14:36:57
I guess this means that if the readinessState is N
fs
2015/05/05 15:32:44
Yes. Optionally I suppose one could "gray it out"
srivats
2016/02/23 01:39:27
Should we just exclude the NotLoaded tracks from b
philipj_slow
2016/03/01 11:21:04
I think what you have now in the other CL seems to
|
| + if ((kind() == captionsKeyword() || kind() == subtitlesKeyword()) && readinessState() != FailedToLoad) |
| + return true; |
| + return false; |
| +} |
| + |
| const AtomicString& TextTrack::interfaceName() const |
| { |
| return EventTargetNames::TextTrack; |