Implement error handler of MediaRecorder
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 14:56:03 +0000 (14:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 14:56:03 +0000 (14:56 +0000)
commit3352b3b447a38b839fdc70296283b11483433a3c
tree54b0657cd52e96509860e4cc63d73e43f86fb40f
parentf9608ea9b118f441c5aec9bc7575494ac0436379
Implement error handler of MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190438

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-10-15
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-record/MediaRecorder-error-expected.txt: Added.
* web-platform-tests/mediacapture-record/MediaRecorder-error.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-error.html

Implement error event handler (onerror) for MediaRecorder and basic architecture of start() function.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::~MediaRecorder):
(WebCore::MediaRecorder::stop):
(WebCore::MediaRecorder::start):
(WebCore::MediaRecorder::setNewRecordingState):
(WebCore::MediaRecorder::scheduleDeferredTask):
(WebCore::MediaRecorder::didAddOrRemoveTrack):
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorder.idl:
* Modules/mediarecorder/MediaRecorderErrorEvent.cpp: Added.
(WebCore::MediaRecorderErrorEvent::create):
(WebCore::MediaRecorderErrorEvent::MediaRecorderErrorEvent):
(WebCore::MediaRecorderErrorEvent::eventInterface const):
* Modules/mediarecorder/MediaRecorderErrorEvent.h: Added.
* Modules/mediarecorder/MediaRecorderErrorEvent.idl: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventNames.in:
* dom/EventTargetFactory.in:

LayoutTests:

Since dataavailable event has not been implemented, skip three MediaRecorder-related tests now.
We will need to reenable those tests once implementing the dataavailable event for MediaRecorder.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-error.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
Source/WebCore/Modules/mediarecorder/MediaRecorder.h
Source/WebCore/Modules/mediarecorder/MediaRecorder.idl
Source/WebCore/Modules/mediarecorder/MediaRecorderErrorEvent.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediarecorder/MediaRecorderErrorEvent.h [new file with mode: 0644]
Source/WebCore/Modules/mediarecorder/MediaRecorderErrorEvent.idl [new file with mode: 0644]
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/dom/EventNames.in
Source/WebCore/dom/EventTargetFactory.in