Skip to content

Commit

Permalink
Remove MediaStreamTrackAudioSourceOptions from MDN (#11297)
Browse files Browse the repository at this point in the history
* Remove MediaStreamTrackAudioSourceOptions from MDN

* Finish cleanup

* Minor layout tidy

Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
queengooborg and hamishwillee authored Dec 20, 2021
1 parent 32de4c7 commit a191865
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 126 deletions.
2 changes: 2 additions & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7988,6 +7988,8 @@
/en-US/docs/Web/API/MediaStreamTrack.onunmute /en-US/docs/Web/API/MediaStreamTrack/onunmute
/en-US/docs/Web/API/MediaStreamTrack.readyState /en-US/docs/Web/API/MediaStreamTrack/readyState
/en-US/docs/Web/API/MediaStreamTrack.stop /en-US/docs/Web/API/MediaStreamTrack/stop
/en-US/docs/Web/API/MediaStreamTrackAudioSourceOptions /en-US/docs/Web/API/MediaStreamTrackAudioSourceNode
/en-US/docs/Web/API/MediaStreamTrackAudioSourceOptions/mediaStreamTrack /en-US/docs/Web/API/MediaStreamTrackAudioSourceNode
/en-US/docs/Web/API/MediaStream_API /en-US/docs/Web/API/Media_Streams_API
/en-US/docs/Web/API/Media_Capabilities_API/MediaCapabilities /en-US/docs/Web/API/MediaCapabilities
/en-US/docs/Web/API/Media_Capabilities_API/MediaCapabilitiesInfo /en-US/docs/Web/API/MediaCapabilities/encodingInfo
Expand Down
12 changes: 0 additions & 12 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -59855,18 +59855,6 @@
"Sheppy"
]
},
"Web/API/MediaStreamTrackAudioSourceOptions": {
"modified": "2020-10-15T22:20:28.948Z",
"contributors": [
"Sheppy"
]
},
"Web/API/MediaStreamTrackAudioSourceOptions/mediaStreamTrack": {
"modified": "2020-10-15T22:20:28.881Z",
"contributors": [
"Sheppy"
]
},
"Web/API/MediaStreamTrackEvent": {
"modified": "2020-10-15T21:49:03.693Z",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,41 @@ browser-compat: api.MediaStreamTrackAudioSourceNode.MediaStreamTrackAudioSourceN
---
{{APIRef("Web Audio API")}}

The [Web Audio
API](/en-US/docs/Web/API/Web_Audio_API)'s **`MediaStreamTrackAudioSourceNode()`**
constructor creates and returns a new {{domxref("MediaStreamTrackAudioSourceNode")}}
object whose audio is taken from the {{domxref("MediaStreamTrack")}} specified in the
given options object.
The [Web Audio API](/en-US/docs/Web/API/Web_Audio_API)'s **`MediaStreamTrackAudioSourceNode()`** constructor creates and returns a new {{domxref("MediaStreamTrackAudioSourceNode")}} object whose audio is taken from the {{domxref("MediaStreamTrack")}} specified in the given options object.

Another way to create a `MediaStreamTrackAudioSourceNode` is to call
the{{domxref("AudioContext.createMediaStreamTrackSource()")}} method, specifying the
{{domxref("MediaStreamTrack")}} from which you want to obtain audio.
Another way to create a `MediaStreamTrackAudioSourceNode` is to call the{{domxref("AudioContext.createMediaStreamTrackSource()")}} method, specifying the {{domxref("MediaStreamTrack")}} from which you want to obtain audio.

## Syntax

```js
audioTrackNode = new MediaStreamTrackAudioSourceNode(context, options);
new MediaStreamTrackAudioSourceNode(context, options)
```

### Parameters

- `context`
- : An {{domxref("AudioContext")}} representing the audio context you want the node to
be associated with.
- : An {{domxref("AudioContext")}} representing the audio context you want the node to be associated with.
- `options`

- : A {{domxref("MediaStreamTrackAudioSourceOptions")}} object defining the properties
you want the `MediaStreamTrackAudioSourceNode` to have:
- : An object defining the properties you want the `MediaStreamTrackAudioSourceNode` to have:

{{page("/en-US/docs/Web/API/MediaStreamTrackAudioSourceOptions", "Properties")}}
- `mediaStreamTrack`
- : The {{domxref("MediaStreamTrack")}} from which to take audio data for this node's output.

### Return value

A new {{domxref("MediaStreamTrackAudioSourceNode")}} object representing the audio node
whose media is obtained from the specified media track.
A new {{domxref("MediaStreamTrackAudioSourceNode")}} object representing the audio node whose media is obtained from the specified media track.

### Exceptions

- `NotSupportedError` {{domxref("DOMException")}}
- : Thrown if the specified `context` is not an {{domxref("AudioContext")}}.
- `InvalidStateError` {{domxref("DOMException")}}
- : Thrown if the specified {{domxref("MediaStreamTrack")}} isn't an audio track (that is, its
{{domxref("MediaStreamTrack.kind", "kind")}} property isn't `audio`.
- : Thrown if the specified {{domxref("MediaStreamTrack")}} isn't an audio track (that is, its {{domxref("MediaStreamTrack.kind", "kind")}} property isn't `audio`.

## Example

This example uses {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}} to obtain
access to the user's camera, then creates a new
{{domxref("MediaStreamAudioSourceNode")}} from the first audio track provided by the
device.
This example uses {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}} to obtain access to the user's camera, then creates a new {{domxref("MediaStreamAudioSourceNode")}} from the first audio track provided by the device.

```js
let audioCtx = new (window.AudioContext || window.webkitAudioContext)();
Expand Down
36 changes: 0 additions & 36 deletions files/en-us/web/api/mediastreamtrackaudiosourceoptions/index.md

This file was deleted.

This file was deleted.

0 comments on commit a191865

Please sign in to comment.