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

Unified Diff: Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp

Issue 1202193002: Make setSinkId try to set the sink even if the given new sinkId equals the current sinkId. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
diff --git a/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp b/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
index fbfe6510495216865ece7887e25474bfa2d56fbd..f46949f94ea5e8814c707058978e0b6a6c34b36e 100644
--- a/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
+++ b/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
@@ -38,12 +38,7 @@ ScriptPromise HTMLMediaElementAudioOutputDevice::setSinkId(ScriptState* scriptSt
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(AbortError, "No media player available"));
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
- HTMLMediaElementAudioOutputDevice& aodElement = HTMLMediaElementAudioOutputDevice::from(element);
- if (sinkId == aodElement.m_sinkId)
- resolver->resolve();
- else
- webMediaPlayer->setSinkId(sinkId, new SetSinkIdCallbacks(resolver, element, sinkId));
-
+ webMediaPlayer->setSinkId(sinkId, new SetSinkIdCallbacks(resolver, element, sinkId));
return resolver->promise();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698