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

Unified Diff: third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp

Issue 2007433002: Revert of MediaCaptureFromElement: add support for audio captureStream(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp
index aad4dab4c61a1e4856448a4223b901f9342494eb..478a74db936ae535ef8852c4ddb8a58bf16d5d13 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.cpp
@@ -6,8 +6,6 @@
#include "core/dom/ExceptionCode.h"
#include "core/html/HTMLMediaElement.h"
-#include "core/html/track/AudioTrackList.h"
-#include "core/html/track/VideoTrackList.h"
#include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
#include "modules/encryptedmedia/MediaKeys.h"
#include "modules/mediastream/MediaStream.h"
@@ -39,14 +37,17 @@
return MediaStream::create(element.getExecutionContext(), MediaStreamRegistry::registry().lookupMediaStreamDescriptor(element.currentSrc().getString()));
}
+ // TODO(mcasas): Only <video> tags are supported at the moment.
+ if (element.isHTMLAudioElement()) {
+ NOTIMPLEMENTED();
+ return nullptr;
+ }
+
WebMediaStream webStream;
webStream.initialize(WebVector<WebMediaStreamTrack>(), WebVector<WebMediaStreamTrack>());
MediaStreamCenter::instance().didCreateMediaStream(webStream);
- if (element.hasVideo())
- Platform::current()->createHTMLVideoElementCapturer(&webStream, element.webMediaPlayer());
- if (element.hasAudio())
- Platform::current()->createHTMLAudioElementCapturer(&webStream, element.webMediaPlayer());
+ Platform::current()->createHTMLVideoElementCapturer(&webStream, element.webMediaPlayer());
return MediaStream::create(element.getExecutionContext(), webStream);
}

Powered by Google App Engine
This is Rietveld 408576698