Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index 58f83cf70ca2b10351234242c41770ca26edb674..86e6e4f04f287ad1467c17977fff5f5d5f645339 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -2396,14 +2396,12 @@ void HTMLMediaElement::togglePlayState() |
AudioTrackList& HTMLMediaElement::audioTracks() |
{ |
- DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
return *m_audioTracks; |
} |
void HTMLMediaElement::audioTrackChanged(WebMediaPlayer::TrackId trackId, bool enabled) |
{ |
BLINK_MEDIA_LOG << "audioTrackChanged(" << (void*)this << ") trackId= " << String(trackId) << " enabled=" << boolString(enabled); |
- DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
audioTracks().scheduleChangeEvent(); |
@@ -2431,9 +2429,6 @@ WebMediaPlayer::TrackId HTMLMediaElement::addAudioTrack(const WebString& id, Web |
BLINK_MEDIA_LOG << "addAudioTrack(" << (void*)this << ", '" << (String)id << "', ' " << (AtomicString)kindString |
<< "', '" << (String)label << "', '" << (String)language << "', " << boolString(enabled) << ")"; |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return blink::WebMediaPlayer::TrackId(); |
- |
AudioTrack* audioTrack = AudioTrack::create(id, kindString, label, language, enabled); |
audioTracks().add(audioTrack); |
@@ -2444,22 +2439,17 @@ void HTMLMediaElement::removeAudioTrack(WebMediaPlayer::TrackId trackId) |
{ |
BLINK_MEDIA_LOG << "removeAudioTrack(" << (void*)this << ")"; |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return; |
- |
audioTracks().remove(trackId); |
} |
VideoTrackList& HTMLMediaElement::videoTracks() |
{ |
- DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
return *m_videoTracks; |
} |
void HTMLMediaElement::selectedVideoTrackChanged(WebMediaPlayer::TrackId* selectedTrackId) |
{ |
BLINK_MEDIA_LOG << "selectedVideoTrackChanged(" << (void*)this << ") selectedTrackId=" << (selectedTrackId ? String(*selectedTrackId) : "none"); |
- DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
if (selectedTrackId) |
videoTracks().trackSelected(*selectedTrackId); |
@@ -2475,9 +2465,6 @@ WebMediaPlayer::TrackId HTMLMediaElement::addVideoTrack(const WebString& id, Web |
BLINK_MEDIA_LOG << "addVideoTrack(" << (void*)this << ", '" << (String)id << "', '" << (AtomicString)kindString |
<< "', '" << (String)label << "', '" << (String)language << "', " << boolString(selected) << ")"; |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return blink::WebMediaPlayer::TrackId(); |
- |
// If another track was selected (potentially by the user), leave it selected. |
if (selected && videoTracks().selectedIndex() != -1) |
selected = false; |
@@ -2492,9 +2479,6 @@ void HTMLMediaElement::removeVideoTrack(WebMediaPlayer::TrackId trackId) |
{ |
BLINK_MEDIA_LOG << "removeVideoTrack(" << (void*)this << ")"; |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return; |
- |
videoTracks().remove(trackId); |
} |
@@ -3683,9 +3667,6 @@ DEFINE_TRACE_WRAPPERS(HTMLMediaElement) |
void HTMLMediaElement::createPlaceholderTracksIfNecessary() |
{ |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return; |
- |
// Create a placeholder audio track if the player says it has audio but it didn't explicitly announce the tracks. |
if (hasAudio() && !audioTracks().length()) |
addAudioTrack("audio", WebMediaPlayerClient::AudioTrackKindMain, "Audio Track", "", true); |
@@ -3697,9 +3678,6 @@ void HTMLMediaElement::createPlaceholderTracksIfNecessary() |
void HTMLMediaElement::selectInitialTracksIfNecessary() |
{ |
- if (!RuntimeEnabledFeatures::audioVideoTracksEnabled()) |
- return; |
- |
// Enable the first audio track if an audio track hasn't been enabled yet. |
if (audioTracks().length() > 0 && !audioTracks().hasEnabledTrack()) |
audioTracks().anonymousIndexedGetter(0)->setEnabled(true); |