Skip to content

Commit b0c2ce6

Browse files
Add deprecation notice for audioprocess event (#41223)
* Add deprecation notice for audioprocess event * Event tables to definition lists --------- Co-authored-by: Hamish Willee <[email protected]>
1 parent cded216 commit b0c2ce6

File tree

2 files changed

+96
-342
lines changed

2 files changed

+96
-342
lines changed

files/en-us/web/html/reference/elements/audio/index.md

Lines changed: 50 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ browser-compat: html.elements.audio
66
sidebar: htmlsidebar
77
---
88

9-
The **`<audio>`** [HTML](/en-US/docs/Web/HTML) element is used to embed sound content in documents. It may contain one or more audio sources, represented using the `src` attribute or the {{HTMLElement("source")}} element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a {{domxref("MediaStream")}}.
9+
The **`<audio>`** [HTML](/en-US/docs/Web/HTML) element is used to embed sound content in documents. It may contain one or more audio sources, represented using the `src` attribute or the {{HTMLElement("source")}} element: the browser will choose the most suitable one.
10+
It can also be the destination for streamed media, using a {{domxref("MediaStream")}}.
1011

1112
{{InteractiveExample("HTML Demo: &lt;audio&gt;", "tabbed-standard")}}
1213

@@ -24,7 +25,8 @@ figure {
2425
}
2526
```
2627

27-
The above example shows basic usage of the `<audio>` element. In a similar manner to the {{htmlelement("img")}} element, we include a path to the media we want to embed inside the `src` attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc.
28+
The above example shows basic usage of the `<audio>` element.
29+
In a similar manner to the {{htmlelement("img")}} element, we include a path to the media we want to embed inside the `src` attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc.
2830

2931
The content inside the opening and closing `<audio></audio>` tags is shown as a fallback in browsers that don't support the element.
3032

@@ -36,7 +38,10 @@ This element's attributes include the [global attributes](/en-US/docs/Web/HTML/R
3638
- : A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.
3739

3840
> [!NOTE]
39-
> Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control. See our [autoplay guide](/en-US/docs/Web/Media/Guides/Autoplay) for additional information about how to properly use autoplay.
41+
> Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible.
42+
> If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it).
43+
> However, this can be useful when creating media elements whose source will be set at a later time, under user control.
44+
> See our [autoplay guide](/en-US/docs/Web/Media/Guides/Autoplay) for additional information about how to properly use autoplay.
4045
4146
- `controls`
4247
- : If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.
@@ -83,165 +88,48 @@ This element's attributes include the [global attributes](/en-US/docs/Web/HTML/R
8388

8489
## Events
8590

86-
<table class="no-markdown">
87-
<thead>
88-
<tr>
89-
<th scope="col">Event name</th>
90-
<th scope="col">Fired when</th>
91-
</tr>
92-
</thead>
93-
<tbody>
94-
<tr>
95-
<td>{{domxref("ScriptProcessorNode/audioprocess_event", "audioprocess")}}</td>
96-
<td>
97-
The input buffer of a {{DOMxRef("ScriptProcessorNode")}} is
98-
ready to be processed.
99-
</td>
100-
</tr>
101-
<tr>
102-
<td>
103-
{{domxref("HTMLMediaElement.canplay_event", 'canplay')}}
104-
</td>
105-
<td>
106-
The browser can play the media, but estimates that not enough data has
107-
been loaded to play the media up to its end without having to stop for
108-
further buffering of content.
109-
</td>
110-
</tr>
111-
<tr>
112-
<td>
113-
{{domxref("HTMLMediaElement.canplaythrough_event", 'canplaythrough')}}
114-
</td>
115-
<td>
116-
The browser estimates it can play the media up to its end without
117-
stopping for content buffering.
118-
</td>
119-
</tr>
120-
<tr>
121-
<td>{{domxref("OfflineAudioContext/complete_event", "complete")}}</td>
122-
<td>
123-
The rendering of an {{DOMxRef("OfflineAudioContext")}} is
124-
terminated.
125-
</td>
126-
</tr>
127-
<tr>
128-
<td>
129-
{{domxref("HTMLMediaElement.durationchange_event", 'durationchange')}}
130-
</td>
131-
<td>The <code>duration</code> attribute has been updated.</td>
132-
</tr>
133-
<tr>
134-
<td>
135-
{{domxref("HTMLMediaElement.emptied_event", 'emptied')}}
136-
</td>
137-
<td>
138-
The media has become empty; for example, this event is sent if the media
139-
has already been loaded (or partially loaded), and the
140-
{{domxref("HTMLMediaElement.load")}} method is called to
141-
reload it.
142-
</td>
143-
</tr>
144-
<tr>
145-
<td>
146-
{{domxref("HTMLMediaElement.ended_event", 'ended')}}
147-
</td>
148-
<td>Playback has stopped because the end of the media was reached.</td>
149-
</tr>
150-
<tr>
151-
<td>
152-
{{domxref("HTMLMediaElement.loadeddata_event", 'loadeddata')}}
153-
</td>
154-
<td>The first frame of the media has finished loading.</td>
155-
</tr>
156-
<tr>
157-
<td>
158-
{{domxref("HTMLMediaElement.loadedmetadata_event", 'loadedmetadata')}}
159-
</td>
160-
<td>The metadata has been loaded.</td>
161-
</tr>
162-
<tr>
163-
<td>
164-
{{domxref("HTMLMediaElement.loadstart_event", 'loadstart')}}
165-
</td>
166-
<td>Fired when the browser has started to load the resource.</td>
167-
</tr>
168-
<tr>
169-
<td>
170-
{{domxref("HTMLMediaElement.pause_event", 'pause')}}
171-
</td>
172-
<td>Playback has been paused.</td>
173-
</tr>
174-
<tr>
175-
<td>
176-
{{domxref("HTMLMediaElement.play_event", 'play')}}
177-
</td>
178-
<td>Playback has begun.</td>
179-
</tr>
180-
<tr>
181-
<td>
182-
{{domxref("HTMLMediaElement.playing_event", 'playing')}}
183-
</td>
184-
<td>
185-
Playback is ready to start after having been paused or delayed due to
186-
lack of data.
187-
</td>
188-
</tr>
189-
<tr>
190-
<td>
191-
{{domxref("HTMLMediaElement.ratechange_event", 'ratechange')}}
192-
</td>
193-
<td>The playback rate has changed.</td>
194-
</tr>
195-
<tr>
196-
<td>
197-
{{domxref("HTMLMediaElement.seeked_event", 'seeked')}}
198-
</td>
199-
<td>A <em>seek</em> operation completed.</td>
200-
</tr>
201-
<tr>
202-
<td>
203-
{{domxref("HTMLMediaElement.seeking_event", 'seeking')}}
204-
</td>
205-
<td>A <em>seek</em> operation began.</td>
206-
</tr>
207-
<tr>
208-
<td>
209-
{{domxref("HTMLMediaElement.stalled_event", 'stalled')}}
210-
</td>
211-
<td>
212-
The user agent is trying to fetch media data, but data is unexpectedly
213-
not forthcoming.
214-
</td>
215-
</tr>
216-
<tr>
217-
<td>
218-
{{domxref("HTMLMediaElement.suspend_event", 'suspend')}}
219-
</td>
220-
<td>Media data loading has been suspended.</td>
221-
</tr>
222-
<tr>
223-
<td>
224-
{{domxref("HTMLMediaElement.timeupdate_event", 'timeupdate')}}
225-
</td>
226-
<td>
227-
The time indicated by the <code>currentTime</code> attribute has been
228-
updated.
229-
</td>
230-
</tr>
231-
<tr>
232-
<td>
233-
{{domxref("HTMLMediaElement.volumechange_event", 'volumechange')}}
234-
</td>
235-
<td>The volume has changed.</td>
236-
</tr>
237-
<tr>
238-
<td>
239-
{{domxref("HTMLMediaElement.waiting_event", 'waiting')}}
240-
</td>
241-
<td>Playback has stopped because of a temporary lack of data</td>
242-
</tr>
243-
</tbody>
244-
</table>
91+
- {{domxref("ScriptProcessorNode/audioprocess_event", "audioprocess")}} {{Deprecated_Inline}}
92+
- : The input buffer of a {{DOMxRef("ScriptProcessorNode")}} is ready to be processed.
93+
- {{domxref("HTMLMediaElement.canplay_event", 'canplay')}}
94+
- : The browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
95+
- {{domxref("HTMLMediaElement.canplaythrough_event", 'canplaythrough')}}
96+
- : The browser estimates it can play the media up to its end without stopping for content buffering.
97+
- {{domxref("OfflineAudioContext/complete_event", "complete")}}
98+
- : The rendering of an {{DOMxRef("OfflineAudioContext")}} is terminated.
99+
- {{domxref("HTMLMediaElement.durationchange_event", 'durationchange')}}
100+
- : The `duration` attribute has been updated.
101+
- {{domxref("HTMLMediaElement.emptied_event", 'emptied')}}
102+
- : The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the {{domxref("HTMLMediaElement.load")}} method is called to reload it.
103+
- {{domxref("HTMLMediaElement.ended_event", 'ended')}}
104+
- : Playback has stopped because the end of the media was reached.
105+
- {{domxref("HTMLMediaElement.loadeddata_event", 'loadeddata')}}
106+
- : The first frame of the media has finished loading.
107+
- {{domxref("HTMLMediaElement.loadedmetadata_event", 'loadedmetadata')}}
108+
- : The metadata has been loaded.
109+
- {{domxref("HTMLMediaElement.loadstart_event", 'loadstart')}}
110+
- : Fired when the browser has started to load the resource.
111+
- {{domxref("HTMLMediaElement.pause_event", 'pause')}}
112+
- : Playback has been paused.
113+
- {{domxref("HTMLMediaElement.play_event", 'play')}}
114+
- : Playback has begun.
115+
- {{domxref("HTMLMediaElement.playing_event", 'playing')}}
116+
- : Playback is ready to start after having been paused or delayed due to lack of data.
117+
- {{domxref("HTMLMediaElement.ratechange_event", 'ratechange')}}
118+
- : The playback rate has changed.
119+
- {{domxref("HTMLMediaElement.seeked_event", 'seeked')}}
120+
- : A _seek_ operation completed.
121+
- {{domxref("HTMLMediaElement.seeking_event", 'seeking')}}
122+
- : A _seek_ operation began.
123+
- {{domxref("HTMLMediaElement.stalled_event", 'stalled')}}
124+
- : The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
125+
- {{domxref("HTMLMediaElement.suspend_event", 'suspend')}}
126+
- : Media data loading has been suspended.
127+
- {{domxref("HTMLMediaElement.timeupdate_event", 'timeupdate')}}
128+
- : The time indicated by the `currentTime` attribute has been updated.
129+
- {{domxref("HTMLMediaElement.volumechange_event", 'volumechange')}}
130+
- : The volume has changed.
131+
- {{domxref("HTMLMediaElement.waiting_event", 'waiting')}}
132+
- : Playback has stopped because of a temporary lack of data.
245133

246134
## Usage notes
247135

0 commit comments

Comments
 (0)