Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index d970453a0d86580201289e48f1229c31ec8e083d..d8821addf3e52abb1b01efa7908240fb52ec62d1 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -349,6 +349,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
, m_closedCaptionsVisible(false) |
, m_completelyLoaded(false) |
, m_havePreparedToPlay(false) |
+ , m_didPerformAutomaticTrackSelection(false) |
, m_tracksAreReady(true) |
, m_haveVisibleTextTrack(false) |
, m_processingPreferenceChange(false) |
@@ -1167,6 +1168,11 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack* track) |
textTracks()->scheduleChangeEvent(); |
} |
+void HTMLMediaElement::disableAutomaticTextTrackSelection() |
+{ |
+ m_didPerformAutomaticTrackSelection = true; |
+} |
+ |
bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionIfInvalid) |
{ |
if (!url.isValid()) { |
@@ -2481,6 +2487,9 @@ void HTMLMediaElement::honorUserPreferencesForAutomaticTextTrackSelection() |
if (!m_textTracks || !m_textTracks->length()) |
return; |
+ if (m_didPerformAutomaticTrackSelection) |
+ return; |
+ |
AutomaticTrackSelection::Configuration configuration; |
if (m_processingPreferenceChange) |
configuration.disableCurrentlyEnabledTracks = true; |