From 6f71d94faa8a8ea08db9cfacb0812474b7c1e8d8 Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Wed, 7 Mar 2018 15:00:15 -0500 Subject: [PATCH 1/3] Update the mediacapture-record IDL file --- interfaces/mediacapture-record.idl | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 interfaces/mediacapture-record.idl diff --git a/interfaces/mediacapture-record.idl b/interfaces/mediacapture-record.idl new file mode 100644 index 00000000000000..f28845808caf82 --- /dev/null +++ b/interfaces/mediacapture-record.idl @@ -0,0 +1,56 @@ +[Exposed=Window, + Constructor(MediaStream stream, optional MediaRecorderOptions options)] +interface MediaRecorder : EventTarget { + readonly attribute MediaStream stream; + readonly attribute DOMString mimeType; + readonly attribute RecordingState state; + 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; +}; + +enum RecordingState { + "inactive", + "recording", + "paused" +}; + +[Exposed=Window, Constructor(DOMString type, BlobEventInit eventInitDict)] +interface BlobEvent : Event { + [SameObject] readonly attribute Blob data; + readonly attribute DOMHighResTimeStamp timecode; +}; + +dictionary BlobEventInit { + required Blob data; + DOMHighResTimeStamp timecode; +}; + +dictionary MediaRecorderErrorEventInit : EventInit { + required DOMException error; +}; + +[Exposed=Window, Constructor(DOMString type, MediaRecorderErrorEventInit eventInitDict)] +interface MediaRecorderErrorEvent : Event { + [SameObject] readonly attribute DOMException error; +}; From fc1bec214c3a6ee16e6265936a890a354bba1073 Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Wed, 23 May 2018 09:24:44 -0400 Subject: [PATCH 2/3] Updated mediacapture-record IDL file --- interfaces/mediacapture-record.idl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interfaces/mediacapture-record.idl b/interfaces/mediacapture-record.idl index f28845808caf82..d1a2f211dd6f76 100644 --- a/interfaces/mediacapture-record.idl +++ b/interfaces/mediacapture-record.idl @@ -1,3 +1,7 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the MediaStream Recording spec. +// See https://w3c.github.io/mediacapture-record/ + [Exposed=Window, Constructor(MediaStream stream, optional MediaRecorderOptions options)] interface MediaRecorder : EventTarget { From 6fde5991eb1b21a0452581a1f420f5520c8d59ab Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Tue, 19 Jun 2018 10:50:14 -0400 Subject: [PATCH 3/3] Update test to use IDL --- mediacapture-record/idlharness.html | 71 ++--------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) diff --git a/mediacapture-record/idlharness.html b/mediacapture-record/idlharness.html index 01cc151164d5bc..8e4ba3c3ebae93 100644 --- a/mediacapture-record/idlharness.html +++ b/mediacapture-record/idlharness.html @@ -12,72 +12,11 @@ - -