Skip to content

Commit

Permalink
Remove superfluous MediaRecorderErrorEvent interface
Browse files Browse the repository at this point in the history
fixes w3c#211
  • Loading branch information
dontcallmedom committed Jan 14, 2022
1 parent 3fd1025 commit ab8afd9
Showing 1 changed file with 10 additions and 51 deletions.
61 changes: 10 additions & 51 deletions MediaRecorder.bs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ interface MediaRecorder : EventTarget {
<dd>Called to handle the <a event>resume</a> event.</dd>

<dt><dfn attribute for="MediaRecorder"><code>onerror</code></dfn></dt>
<dd>Called to handle a {{MediaRecorderErrorEvent}}.</dd>
<dd>Called to handle an {{ErrorEvent}}.</dd>

<dt><dfn attribute for="MediaRecorder"><code>videoBitsPerSecond</code></dfn></dt>
<dd>The target bitrate used to encode video tracks.</dd>
Expand Down Expand Up @@ -670,7 +670,7 @@ dictionary BlobEventInit {

The UA will throw a {{DOMException}} when the error can be detected at the time
that the call is made. In all other cases the UA will <a>fire an event</a> named
{{MediaRecorderErrorEvent}}. If recording has been started and not yet stopped
{{ErrorEvent}}. If recording has been started and not yet stopped
when the error occurs, let <var>blob</var> be the {{Blob}} of collected data so
far; after raising the error, the UA will <a data-lt="fire a blob event">fire a
dataavailable event</a> with <var>blob</var>; immediately after the UA will then
Expand All @@ -680,68 +680,27 @@ maximum {{Blob}} size that it will support, or the number of
{{MediaStreamTrack}}s it will record at once.
It will signal a fatal error if these limits are exceeded.

## MediaRecorderErrorEvent ## {#errorevent-section}

The {{MediaRecorderErrorEvent}} interface is defined for cases when an event is
raised that was caused by an error.
## Error eventsMediaRecorderErrorEvent ## {#errorevent-section}

To <dfn>fire an error event</dfn>
named <var>e</var> with a {{DOMException}} named <var>error</var> means that an
event with the name <var>e</var>, which does not bubble (except where otherwise
stated) and is not cancelable (except where otherwise stated), and which uses
the {{MediaRecorderErrorEvent}} interface with the
{{MediaRecorderErrorEvent/error}} attribute set to <var>error</var>, must be
created and
<a href="https://dom.spec.whatwg.org/#concept-event-dispatch">dispatched</a> at
the {{ErrorEvent}} interface with the
{{ErrorEvent/error}} attribute set to <var>error</var>, must be
created and [=dispatch|dispatch=] at
the given target.

<pre class="idl">
dictionary MediaRecorderErrorEventInit : EventInit {
required DOMException error;
};

[Exposed=Window]
interface MediaRecorderErrorEvent : Event {
constructor(DOMString type, MediaRecorderErrorEventInit eventInitDict);
[SameObject] readonly attribute DOMException error;
};
</pre>

### Constructors ### {#errorevent-constructor}

<dl class="domintro">
<dt><dfn constructor for="MediaRecorderErrorEvent"><code>MediaRecorderErrorEvent(DOMString type, MediaRecorderErrorEventInit eventInitDict)</code></dfn></dt>
<dd>
Constructs a new {{MediaRecorderErrorEvent}}.


</dd>
</dl>

### Attributes ### {#errorevent-attributes}

<dl class="domintro">
<dt><dfn attribute for="MediaRecorderErrorEvent"><code>error</code></dfn></dt>
<dd>The DOMException error that triggered the event.</dd>
</dl>

### MediaRecorderErrorEventInit ### {#erroreventinit}

<dl class="domintro">
<dt><dfn dict-member for="MediaRecorderErrorEventInit"><code>error</code></dfn></dt>
<dd>The {{DOMException}} causing the error that triggered the event.
An explanatory message about the error circumstances MAY be provided
in its <a href="https://heycam.github.io/webidl/#es-DOMException-constructor-object">
message</a> attribute.
The {{DOMException}} causing the error that triggered the event may provide
an explanatory message about the error circumstances
in its {{DOMException/message}} attribute.

<div class="note">
If an implementation places non-standard properties on {{DOMException}},
exposing e.g. stack traces or error line numbers, these are encouraged to
point to whichever method call most closely identifies the run-time operation
that caused the error, e.g. {{start()}}.
</div>
</dd>
</dl>

## Exception Summary ## {#exception-summary}

Expand Down Expand Up @@ -826,7 +785,7 @@ The following additional events fire on {{MediaRecorder}} objects:
</tr>
<tr>
<td><dfn event for=MediaRecorder>error</dfn></td>
<td>{{MediaRecorderErrorEvent}}</td>
<td>{{ErrorEvent}}</td>
<td>An error has occurred, e.g. out of memory or a modification to
the {{MediaRecorder/stream}} has occurred that makes it impossible to
continue recording (e.g. a Track has been added to or removed from
Expand Down

0 comments on commit ab8afd9

Please sign in to comment.