Diff
Modified: trunk/LayoutTests/ChangeLog (236839 => 236840)
--- trunk/LayoutTests/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,15 @@
+2018-10-04 YUHAN WU <[email protected]>
+
+ runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ * platform/win/TestExpectations:
+ * fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt:
+ * fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt:
+ * fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt:
+
2018-10-04 Chris Dumez <[email protected]>
Unreviewed, rolling out r236803.
Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt (236839 => 236840)
--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,4 +1,4 @@
-FAIL Verify that drawing to a 2D canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. Can't find variable: MediaRecorder
-FAIL Verify that drawing to a webgl canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. Can't find variable: MediaRecorder
+FAIL Verify that drawing to a 2D canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
+FAIL Verify that drawing to a webgl canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt (236839 => 236840)
--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 45: ReferenceError: Can't find variable: MediaRecorder
+CONSOLE MESSAGE: line 48: TypeError: recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
Exercises that at least one frame passes on captureStream(0).
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -8,7 +8,7 @@
PASS Got a stream from canvas.
PASS stream.getVideoTracks().length is 1
PASS track.readyState is "live"
-FAIL Unexpected error: ReferenceError: Can't find variable: MediaRecorder
+FAIL Unexpected error: TypeError: recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
FAIL successfullyParsed should be true. Was false.
Some tests failed.
Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt (236839 => 236840)
--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,4 +1,4 @@
-FAIL Untitled Can't find variable: MediaRecorder
-FAIL Untitled 1 Can't find variable: MediaRecorder
+FAIL Untitled recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
+FAIL Untitled 1 recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (236839 => 236840)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,14 @@
+2018-10-04 YUHAN WU <[email protected]>
+
+ runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ * web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt:
+ * web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt: Added.
+ * web-platform-tests/mediacapture-record/MediaRecorder-constructor.html: Added.
+
2018-10-03 Justin Michaud <[email protected]>
Registered custom properties should allow inheritance to be controlled
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt (236839 => 236840)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,7 +1,5 @@
-FAIL The BlobEventInit dictionary is required Can't find variable: BlobEvent
-FAIL The BlobEventInit dictionary's data member is required. assert_throws: function "function () {
- new BlobEvent("type", {});
- }" threw object "ReferenceError: Can't find variable: BlobEvent" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL The BlobEvent instance's data attribute is set. Can't find variable: BlobEvent
+PASS The BlobEventInit dictionary is required
+PASS The BlobEventInit dictionary's data member is required.
+FAIL The BlobEvent instance's data attribute is set. assert_equals: expected (object) object "[object Blob]" but got (undefined) undefined
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt (0 => 236840)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,4 @@
+
+PASS The MediaStream argument is required
+PASS The MediaStream instance's state attribute is set.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html (0 => 236840)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,26 @@
+<!doctype html>
+<title>MediaRecorder constructor</title>
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script>
+ test(function() {
+ assert_equals(MediaRecorder.length, 1);
+ assert_throws(new TypeError, function() {
+ new MediaRecorder();
+ });
+ assert_throws(new TypeError, function() {
+ new MediaRecorder(null);
+ });
+ assert_throws(new TypeError, function() {
+ new MediaRecorder(undefined);
+ });
+ }, "The MediaStream argument is required");
+
+ test(function() {
+ var context = new AudioContext();
+ var dest = context.createMediaStreamDestination();
+ var recorder = new MediaRecorder(dest.stream);
+ assert_equals(recorder.state, "inactive");
+ }, "The MediaStream instance's state attribute is set.");
+</script>
Modified: trunk/LayoutTests/platform/win/TestExpectations (236839 => 236840)
--- trunk/LayoutTests/platform/win/TestExpectations 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/platform/win/TestExpectations 2018-10-04 19:27:10 UTC (rev 236840)
@@ -4212,3 +4212,9 @@
webkit.org/b/190032 css3/filters/composited-during-animation-layertree.html [ Pass Failure ]
webkit.org/b/190032 transitions/clip-path-transitions.html [ Pass Failure ]
webkit.org/b/190032 legacy-animation-engine/animations/stacking-context-unchanged-while-running.html [ Pass ImageOnlyFailure ]
+
+# MediaRecorder is not enabled on Windows
+imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html [ Skip ]
+imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html [ Skip ]
+fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext.html [ Skip ]
+
Modified: trunk/Source/WebCore/CMakeLists.txt (236839 => 236840)
--- trunk/Source/WebCore/CMakeLists.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/CMakeLists.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -38,6 +38,7 @@
"${WEBCORE_DIR}/Modules/mediasession"
"${WEBCORE_DIR}/Modules/mediasource"
"${WEBCORE_DIR}/Modules/mediastream"
+ "${WEBCORE_DIR}/Modules/mediarecorder"
"${WEBCORE_DIR}/Modules/navigatorcontentutils"
"${WEBCORE_DIR}/Modules/notifications"
"${WEBCORE_DIR}/Modules/paymentrequest"
@@ -175,6 +176,7 @@
Modules/geolocation
Modules/indexeddb
Modules/mediacapabilities
+ Modules/mediarecorder
Modules/mediasession
Modules/mediastream
Modules/notifications
@@ -277,6 +279,9 @@
Modules/mediacontrols/MediaControlsHost.idl
+ Modules/mediarecorder/BlobEvent.idl
+ Modules/mediarecorder/MediaRecorder.idl
+
Modules/mediasession/HTMLMediaElementMediaSession.idl
Modules/mediasession/MediaRemoteControls.idl
Modules/mediasession/MediaSession.idl
Modified: trunk/Source/WebCore/ChangeLog (236839 => 236840)
--- trunk/Source/WebCore/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,39 @@
+2018-10-04 Yuhan Wu <[email protected]>
+
+ runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ Covered by tests:
+ imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
+ imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html
+
+ Add an architecture of the IDL and the class for MediaRecorder and BlobEvent.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * Modules/mediarecorder/BlobEvent.h:
+ (WebCore::BlobEvent::create):
+ (WebCore::BlobEvent:::Event):
+ * Modules/mediarecorder/BlobEvent.idl:
+ * Modules/mediarecorder/MediaRecorder.cpp:
+ (WebCore::MediaRecorder::create):
+ (WebCore::MediaRecorder::MediaRecorder):
+ (WebCore::MediaRecorder::activeDOMObjectName const):
+ (WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
+ * Modules/mediarecorder/MediaRecorder.h: Added.
+ (WebCore::MediaRecorder::state const):
+ (WebCore::MediaRecorder::~MediaRecorder):
+ * Modules/mediarecorder/MediaRecorder.idl:
+ * Modules/mediastream/RTCRtpReceiver.cpp:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/WebCoreBuiltinNames.h:
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::mediaRecorderEnabled const):
+ (WebCore::RuntimeEnabledFeatures::setMediaRecorderEnabled):
+
2018-10-04 Chris Dumez <[email protected]>
Unreviewed, rolling out r236803.
Modified: trunk/Source/WebCore/DerivedSources.make (236839 => 236840)
--- trunk/Source/WebCore/DerivedSources.make 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/DerivedSources.make 2018-10-04 19:27:10 UTC (rev 236840)
@@ -47,6 +47,7 @@
$(WebCore)/Modules/mediasession \
$(WebCore)/Modules/mediasource \
$(WebCore)/Modules/mediastream \
+ $(WebCore)/Modules/mediarecorder \
$(WebCore)/Modules/notifications \
$(WebCore)/Modules/paymentrequest \
$(WebCore)/Modules/plugins \
@@ -202,6 +203,8 @@
$(WebCore)/Modules/mediacapabilities/ScreenLuminance.idl \
$(WebCore)/Modules/mediacapabilities/VideoConfiguration.idl \
$(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
+ $(WebCore)/Modules/mediarecorder/BlobEvent.idl \
+ $(WebCore)/Modules/mediarecorder/MediaRecorder.idl \
$(WebCore)/Modules/mediasession/HTMLMediaElementMediaSession.idl \
$(WebCore)/Modules/mediasession/MediaRemoteControls.idl \
$(WebCore)/Modules/mediasession/MediaSession.idl \
Added: trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h (0 => 236840)
--- trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "Event.h"
+
+namespace WebCore {
+
+class Blob;
+
+class BlobEvent final : public Event {
+public:
+ struct Init : EventInit {
+ RefPtr<Blob> data;
+ double timecode;
+ };
+
+ static Ref<BlobEvent> create(const AtomicString& type, Init&& init, IsTrusted isTrusted = IsTrusted::No)
+ {
+ return adoptRef(*new BlobEvent(type, WTFMove(init), isTrusted));
+ }
+
+private:
+ BlobEvent(const AtomicString& type, Init&& init, IsTrusted isTrusted)
+ : Event(type, WTFMove(init), isTrusted)
+ {
+ }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl (0 => 236840)
--- trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+typedef double DOMHighResTimeStamp;
+
+[
+ Conditional=MEDIA_STREAM,
+ Constructor(DOMString type, BlobEventInit eventInitDict),
+ EnabledAtRuntime=MediaRecorder,
+ Exposed=Window
+] interface BlobEvent : Event {
+ // FIXME: Implement these:
+ // [SameObject] readonly attribute Blob data;
+ // readonly attribute DOMHighResTimeStamp timecode;
+};
+
+dictionary BlobEventInit : EventInit {
+ required Blob data;
+ DOMHighResTimeStamp timecode;
+};
Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp (0 => 236840)
--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include "config.h"
+#include "MediaRecorder.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "Document.h"
+#include "MediaStream.h"
+
+namespace WebCore {
+
+Ref<MediaRecorder> MediaRecorder::create(Document& document, Ref<MediaStream>&& stream, Options&& options)
+{
+ auto recorder = adoptRef(*new MediaRecorder(document, WTFMove(stream), WTFMove(options)));
+ recorder->suspendIfNeeded();
+ return recorder;
+}
+
+MediaRecorder::MediaRecorder(Document& document, Ref<MediaStream>&& stream, Options&& option)
+ : ActiveDOMObject(&document)
+ , m_options(WTFMove(option))
+ , m_stream(WTFMove(stream))
+{
+}
+
+const char* MediaRecorder::activeDOMObjectName() const
+{
+ return "MediaRecorder";
+}
+
+bool MediaRecorder::canSuspendForDocumentSuspension() const
+{
+ return false; // FIXME: We should do better here as this prevents entering PageCache.
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h (0 => 236840)
--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(MEDIA_STREAM)
+#include "ActiveDOMObject.h"
+#include "EventTarget.h"
+
+namespace WebCore {
+
+class Document;
+class MediaStream;
+
+class MediaRecorder final : public ActiveDOMObject, public RefCounted<MediaRecorder>, public EventTargetWithInlineData {
+public:
+ enum class RecordingState { Inactive, Recording, Paused };
+
+ struct Options {
+ String mimeType;
+ unsigned audioBitsPerSecond;
+ unsigned videoBitsPerSecond;
+ unsigned bitsPerSecond;
+ };
+
+ static Ref<MediaRecorder> create(Document&, Ref<MediaStream>&&, Options&& = { });
+
+ RecordingState state() const { return m_state; }
+
+ using RefCounted::ref;
+ using RefCounted::deref;
+
+private:
+ MediaRecorder(Document&, Ref<MediaStream>&&, Options&& = { });
+
+ // EventTarget
+ void refEventTarget() final { ref(); }
+ void derefEventTarget() final { deref(); }
+ EventTargetInterface eventTargetInterface() const final { return MediaStreamEventTargetInterfaceType; }
+ ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+
+ // ActiveDOMObject API.
+ const char* activeDOMObjectName() const final;
+ bool canSuspendForDocumentSuspension() const final;
+
+ Options m_options;
+ Ref<MediaStream> m_stream;
+ RecordingState m_state { RecordingState::Inactive };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl (0 => 236840)
--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl 2018-10-04 19:27:10 UTC (rev 236840)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum RecordingState { "inactive", "recording", "paused" };
+
+[
+ ActiveDOMObject,
+ Conditional=MEDIA_STREAM,
+ Constructor(MediaStream stream, optional MediaRecorderOptions options),
+ ConstructorCallWith=Document,
+ EnabledAtRuntime=MediaRecorder,
+ Exposed=Window
+] interface MediaRecorder : EventTarget {
+ readonly attribute RecordingState state;
+ // FIXME: Implement these:
+ // readonly attribute MediaStream stream;
+ // readonly attribute DOMString mimeType;
+ // attribute EventHandler onstart;
+ // attribute EventHandler onstop;
+ // attribute EventHandler ondataavailable;
+ // attribute EventHandler onpause;
+ // attribute EventHandler onresume;
+ // attribute EventHandler onerror;
+ // readonly attribute unsigned long videoBitsPerSecond;
+ // readonly attribute unsigned long audioBitsPerSecond;
+
+ // void start(optional long timeslice);
+ // void stop();
+ // void pause();
+ // void resume();
+ // void requestData();
+
+ // static boolean isTypeSupported(DOMString type);
+};
+
+dictionary MediaRecorderOptions {
+ DOMString mimeType;
+ unsigned long audioBitsPerSecond;
+ unsigned long videoBitsPerSecond;
+ unsigned long bitsPerSecond;
+};
Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp (236839 => 236840)
--- trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp 2018-10-04 19:27:10 UTC (rev 236840)
@@ -32,6 +32,7 @@
#include "RTCRtpReceiver.h"
#if ENABLE(WEB_RTC)
+#include "PeerConnectionBackend.h"
namespace WebCore {
Modified: trunk/Source/WebCore/Sources.txt (236839 => 236840)
--- trunk/Source/WebCore/Sources.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/Sources.txt 2018-10-04 19:27:10 UTC (rev 236840)
@@ -140,6 +140,8 @@
Modules/mediacontrols/MediaControlsHost.cpp
+Modules/mediarecorder/MediaRecorder.cpp
+
Modules/mediasession/HTMLMediaElementMediaSession.cpp
Modules/mediasession/MediaRemoteControls.cpp
Modules/mediasession/MediaSession.cpp
@@ -2438,6 +2440,7 @@
JSBiquadFilterNode.cpp
JSBlob.cpp
JSBlobCallback.cpp
+JSBlobEvent.cpp
JSBlobLineEndings.cpp
JSBlobPropertyBag.cpp
JSByteLengthQueuingStrategy.cpp
@@ -2762,6 +2765,7 @@
JSMediaList.cpp
JSMediaQueryList.cpp
JSMediaQueryListListener.cpp
+JSMediaRecorder.cpp
JSMediaRemoteControls.cpp
JSMediaSession.cpp
JSMediaSource.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (236839 => 236840)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1351,6 +1351,8 @@
4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */; };
4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */; };
4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 4D3B00AB215D69A70076B983 /* MediaRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3B00A9215D69A70076B983 /* MediaRecorder.h */; };
+ 4D3B00AF215D6A690076B983 /* BlobEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3B00AD215D6A690076B983 /* BlobEvent.h */; };
4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959240A39DACC00220FE5 /* MediaQuery.h */; settings = {ATTRIBUTES = (Private, ); }; };
4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7862,6 +7864,11 @@
4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSRegisterCustomProperty.h; sourceTree = "<group>"; };
4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSCustomPropertyDescriptor.idl; sourceTree = "<group>"; };
4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSRegisteredCustomProperty.h; sourceTree = "<group>"; };
+ 4D3B00A4215D61040076B983 /* MediaRecorder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRecorder.idl; sourceTree = "<group>"; };
+ 4D3B00A6215D645B0076B983 /* BlobEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlobEvent.idl; sourceTree = "<group>"; };
+ 4D3B00A8215D69A60076B983 /* MediaRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRecorder.cpp; sourceTree = "<group>"; };
+ 4D3B00A9215D69A70076B983 /* MediaRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRecorder.h; sourceTree = "<group>"; };
+ 4D3B00AD215D6A690076B983 /* BlobEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobEvent.h; sourceTree = "<group>"; };
4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaFeatureNames.cpp; sourceTree = "<group>"; };
4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaFeatureNames.h; sourceTree = "<group>"; };
4E1959230A39DACC00220FE5 /* MediaQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQuery.cpp; sourceTree = "<group>"; };
@@ -17767,6 +17774,18 @@
path = animation;
sourceTree = "<group>";
};
+ 4D3B00A0215D5C0F0076B983 /* mediarecorder */ = {
+ isa = PBXGroup;
+ children = (
+ 4D3B00AD215D6A690076B983 /* BlobEvent.h */,
+ 4D3B00A6215D645B0076B983 /* BlobEvent.idl */,
+ 4D3B00A8215D69A60076B983 /* MediaRecorder.cpp */,
+ 4D3B00A9215D69A70076B983 /* MediaRecorder.h */,
+ 4D3B00A4215D61040076B983 /* MediaRecorder.idl */,
+ );
+ path = mediarecorder;
+ sourceTree = "<group>";
+ };
510310421BA8C64C003329C0 /* client */ = {
isa = PBXGroup;
children = (
@@ -21001,6 +21020,7 @@
9712A55315004E3C0048AF10 /* indexeddb */,
CDBD3D271FE85C920012C545 /* mediacapabilities */,
CD9A37F517C7D93600C5FA7A /* mediacontrols */,
+ 4D3B00A0215D5C0F0076B983 /* mediarecorder */,
0709D78B1AE5552E004E42F8 /* mediasession */,
B1A942DD15B5CE2200D525D1 /* mediasource */,
07221B4617CEC32700848E51 /* mediastream */,
@@ -27381,6 +27401,7 @@
A15D75161E68F7C800A35FBC /* BlobCallback.h in Headers */,
2EDEF1F4121B0EFC00726DB2 /* BlobData.h in Headers */,
E1D31CDD19196020001005A3 /* BlobDataFileReference.h in Headers */,
+ 4D3B00AF215D6A690076B983 /* BlobEvent.h in Headers */,
7C77C3D71DEF850A00A50BFA /* BlobLineEndings.h in Headers */,
E1C94AF9191303F000D5A893 /* BlobPart.h in Headers */,
7C77C3D11DEE472400A50BFA /* BlobPropertyBag.h in Headers */,
@@ -29574,6 +29595,7 @@
D3AA10F4123A98AA0092152B /* MediaQueryMatcher.h in Headers */,
9493B6C11D74B4120088E780 /* MediaQueryParser.h in Headers */,
4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */,
+ 4D3B00AB215D69A70076B983 /* MediaRecorder.h in Headers */,
C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */,
CD8ACA8F1D23971900ECC59E /* MediaRemoteSoftLink.h in Headers */,
CEEFCD7A19DB31F7003876D7 /* MediaResourceLoader.h in Headers */,
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (236839 => 236840)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -43,6 +43,7 @@
macro(AuthenticatorAssertionResponse) \
macro(AuthenticatorAttestationResponse) \
macro(AuthenticatorResponse) \
+ macro(BlobEvent) \
macro(Cache) \
macro(CacheStorage) \
macro(Client) \
@@ -97,6 +98,7 @@
macro(MediaKeyStatusMap) \
macro(MediaKeySystemAccess) \
macro(MediaKeys) \
+ macro(MediaRecorder) \
macro(MediaSource) \
macro(MediaStream) \
macro(MediaStreamTrack) \
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (236839 => 236840)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -181,6 +181,8 @@
#endif
#if ENABLE(MEDIA_STREAM)
+ bool mediaRecorderEnabled() const { return m_isMediaRecorderEnabled; }
+ void setMediaRecorderEnabled(bool isEnabled) { m_isMediaRecorderEnabled = isEnabled; }
bool mediaDevicesEnabled() const { return m_isMediaDevicesEnabled; }
void setMediaDevicesEnabled(bool isEnabled) { m_isMediaDevicesEnabled = isEnabled; }
bool mediaStreamEnabled() const { return m_isMediaStreamEnabled; }
@@ -344,6 +346,7 @@
#endif
#if ENABLE(MEDIA_STREAM)
+ bool m_isMediaRecorderEnabled { false };
bool m_isMediaDevicesEnabled { false };
bool m_isMediaStreamEnabled { true };
bool m_isScreenCaptureEnabled { false };
Modified: trunk/Source/WebKit/ChangeLog (236839 => 236840)
--- trunk/Source/WebKit/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKit/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,12 @@
+2018-10-04 Yuhan Wu <[email protected]>
+
+ runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ * Shared/WebPreferences.yaml:
+
2018-10-03 Dan Bernstein <[email protected]>
Tried to fix non-Cocoa, ENABLE(ATTACHMENT_ELEMENT) builds after r236822.
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (236839 => 236840)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-10-04 19:27:10 UTC (rev 236840)
@@ -459,6 +459,15 @@
type: bool
defaultValue: false
+MediaRecorderEnabled:
+ type: bool
+ defaultValue: false
+ webcoreBinding: RuntimeEnabledFeatures
+ condition: ENABLE(MEDIA_STREAM)
+ humanReadableName: "MediaRecorder"
+ humanReadableDescription: "MediaRecorder"
+ category: experimental
+
MediaDevicesEnabled:
type: bool
defaultValue: false
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (236839 => 236840)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,19 @@
+2018-10-04 YUHAN WU <[email protected]>
+
+ Runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences mediaRecorderEnabled]):
+ (-[WebPreferences setMediaRecorderEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2018-10-03 Ryosuke Niwa <[email protected]>
Enable selectionAcrossShadowBoundariesEnabled by default in WebKitLegacy
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (236839 => 236840)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -260,5 +260,6 @@
#define WebKitAccessibilityObjectModelEnabledPreferenceKey @"WebKitAccessibilityObjectModelEnabled"
#define WebKitAriaReflectionEnabledPreferenceKey @"WebKitAriaReflectionEnabled"
#define WebKitMediaCapabilitiesEnabledPreferenceKey @"WebKitMediaCapabilitiesEnabled"
+#define WebKitMediaRecorderEnabledPreferenceKey @"WebKitMediaRecorderEnabled"
#define WebKitServerTimingEnabledPreferenceKey @"WebKitServerTimingEnabled"
#define WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey @"WebKitSelectionAcrossShadowBoundariesEnabled"
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (236839 => 236840)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2018-10-04 19:27:10 UTC (rev 236840)
@@ -659,6 +659,7 @@
#if ENABLE(MEDIA_STREAM)
[NSNumber numberWithBool:NO], WebKitMediaDevicesEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitMediaStreamEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitMediaRecorderEnabledPreferenceKey,
#endif
#if ENABLE(WEB_RTC)
[NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey,
@@ -3345,6 +3346,16 @@
[self _setBoolValue:flag forKey:WebKitMediaCapabilitiesEnabledPreferenceKey];
}
+- (BOOL)mediaRecorderEnabled
+{
+ return [self _boolValueForKey:WebKitMediaRecorderEnabledPreferenceKey];
+}
+
+- (void)setMediaRecorderEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitMediaRecorderEnabledPreferenceKey];
+}
+
- (BOOL)serverTimingEnabled
{
return [self _boolValueForKey:WebKitServerTimingEnabledPreferenceKey];
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (236839 => 236840)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h 2018-10-04 19:27:10 UTC (rev 236840)
@@ -611,6 +611,7 @@
@property (nonatomic) BOOL accessibilityObjectModelEnabled;
@property (nonatomic) BOOL ariaReflectionEnabled;
@property (nonatomic) BOOL mediaCapabilitiesEnabled;
+@property (nonatomic) BOOL mediaRecorderEnabled;
@property (nonatomic) BOOL allowCrossOriginSubresourcesToAskForCredentials;
@property (nonatomic) BOOL sourceBufferChangeTypeEnabled;
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (236839 => 236840)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-10-04 19:27:10 UTC (rev 236840)
@@ -3048,6 +3048,7 @@
DeprecatedGlobalSettings::setMediaCaptureRequiresSecureConnection(true);
RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(false);
RuntimeEnabledFeatures::sharedFeatures().setMediaDevicesEnabled(false);
+ RuntimeEnabledFeatures::sharedFeatures().setMediaRecorderEnabled(preferences.mediaRecorderEnabled);
#endif
#if ENABLE(WEB_RTC)
Modified: trunk/Tools/ChangeLog (236839 => 236840)
--- trunk/Tools/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Tools/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
@@ -1,3 +1,13 @@
+2018-10-04 YUHAN WU <[email protected]>
+
+ Runtime flag and IDL for MediaRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=190018
+
+ Reviewed by Youenn Fablet and Chris Dumez.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (enableExperimentalFeatures):
+
2018-10-04 Basuke Suzuki <[email protected]>
[LayoutTests][Win] Stop wpt server correctly.
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (236839 => 236840)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-10-04 19:27:10 UTC (rev 236840)
@@ -869,6 +869,7 @@
[preferences setIntersectionObserverEnabled:YES];
preferences.sourceBufferChangeTypeEnabled = YES;
[preferences setCSSOMViewScrollingAPIEnabled:YES];
+ [preferences setMediaRecorderEnabled:YES];
}
// Called before each test.