Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MediaStreamTrackAudioSourceOptions from MDN #11297

Merged
merged 3 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.