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

Unified Diff: third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp

Issue 2697703003: MediaRecorder: make sure ondataavailable+onstop events are fired before onerror (Closed)
Patch Set: emircan@s comments Created 3 years, 10 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/mediarecorder/MediaRecorder.cpp
diff --git a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
index 1d8531dd24580afdd91f3b0fe8027fe718f452ea..0ad0deffd1da1a3419a3db1c0c1aff1db81f76a2 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
+++ b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
@@ -163,7 +163,6 @@ MediaRecorder::MediaRecorder(ExecutionContext* context,
ExceptionState& exceptionState)
: SuspendableObject(context),
m_stream(stream),
- m_streamAmountOfTracks(stream->getTracks().size()),
m_mimeType(options.hasMimeType() ? options.mimeType() : kDefaultMimeType),
m_stopped(true),
m_audioBitsPerSecond(0),
@@ -332,13 +331,6 @@ void MediaRecorder::writeData(const char* data,
m_stopped = false;
scheduleDispatchEvent(Event::create(EventTypeNames::start));
}
- if (m_stream && m_streamAmountOfTracks != m_stream->getTracks().size()) {
- m_streamAmountOfTracks = m_stream->getTracks().size();
- onError("Amount of tracks in MediaStream has changed.");
- }
-
- // TODO(mcasas): Act as |m_ignoredMutedMedia| instructs if |m_stream| track(s)
- // is in muted() state.
emircan 2017/02/17 18:59:25 Is this TODO still relevant or...
mcasas 2017/02/17 20:40:29 No, it was removed from the Spec in https://githu
if (!m_blobData) {
m_blobData = BlobData::create();
@@ -358,8 +350,8 @@ void MediaRecorder::writeData(const char* data,
}
void MediaRecorder::onError(const WebString& message) {
- // TODO(mcasas): Beef up the Error Event and add the |message|, see
- // https://github.com/w3c/mediacapture-record/issues/31
+ DLOG(ERROR) << message.ascii();
+ stopRecording();
scheduleDispatchEvent(Event::create(EventTypeNames::error));
}

Powered by Google App Engine
This is Rietveld 408576698