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 MediaCapabilitesInfo dictionary from MDN #9781

Merged
merged 3 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7909,6 +7909,7 @@
/en-US/docs/Web/API/MSLaunchUri /en-US/docs/Web/API/Navigator/msLaunchUri
/en-US/docs/Web/API/MSManipulationStateChanged /en-US/docs/Web/API/Element/MSManipulationStateChanged_event
/en-US/docs/Web/API/MediaCapabilities/MediaCapabilitiesInfo /en-US/docs/Web/API/MediaCapabilities
/en-US/docs/Web/API/MediaCapabilitiesInfo /en-US/docs/Web/API/MediaCapabilities/encodingInfo
/en-US/docs/Web/API/MediaCapabilities_API /en-US/docs/Web/API/Media_Capabilities_API/Using_the_Media_Capabilities_API
/en-US/docs/Web/API/MediaDevices/mediaDevices.getUserMedia /en-US/docs/Web/API/MediaDevices/getUserMedia
/en-US/docs/Web/API/MediaMetadata/MediaMetadata.title /en-US/docs/Web/API/MediaMetadata/title
Expand Down Expand Up @@ -7952,7 +7953,7 @@
/en-US/docs/Web/API/MediaStreamTrack.stop /en-US/docs/Web/API/MediaStreamTrack/stop
/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/MediaCapabilitiesInfo
/en-US/docs/Web/API/Media_Capabilities_API/MediaCapabilitiesInfo /en-US/docs/Web/API/MediaCapabilities/encodingInfo
/en-US/docs/Web/API/Media_Capabilities_API/MediaConfiguration /en-US/docs/Web/API/MediaConfiguration
/en-US/docs/Web/API/Media_Capabilities_API_ /en-US/docs/Web/API/MediaCapabilities
/en-US/docs/Web/API/Media_Streams_API/ended_event /en-US/docs/Web/API/MediaStreamTrack/ended_event
Expand Down
8 changes: 0 additions & 8 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -58641,14 +58641,6 @@
"estelle"
]
},
"Web/API/MediaCapabilitiesInfo": {
"modified": "2020-10-15T22:07:32.490Z",
"contributors": [
"Wind1808",
"chrisdavidmills",
"estelle"
]
},
"Web/API/MediaConfiguration": {
"modified": "2020-10-15T22:07:10.854Z",
"contributors": [
Expand Down
2 changes: 0 additions & 2 deletions files/en-us/web/api/media_capabilities_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ Media capabilities information enables websites to enable adaptative streaming t

- {{DOMxRef("MediaCapabilities")}}
- : Provides information about the decoding abilities of the device, system and browser based on codecs, profile, resolution, and bitrates. The  information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient .
- {{DOMxRef("MediaCapabilitiesInfo")}}
- : The interface of the promise returned by  the {{DOMxRef("MediaCapabilities", "mediaCapabilities")}}'s  [`encodingInfo()`](/en-US/docs/Web/API/MediaCapabilities/encodingInfo) and [`decodingInfo()`](/en-US/docs/Web/API/MediaCapabilities/decodingInfo) methods; returning whether the media configuration tested is  supported, smooth, and power efficient.
- ScreenColorGamut
- : Will describe the color gamut, or the range of color, the screen can display (not currently supported anywhere).
- ScreenLuminance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Now that we've created a video decoding configuration we can pass it as a parama
var promise = navigator.mediaCapabilities.decodingInfo(videoConfiguration);
```

The `decodingInfo()` and {{domxref("MediaCapabilities.encodingInfo", "encodingInfo()")}} methods both return promises. Once the promises state is fulfilled, you can access the {{domxref("MediaCapabilitiesInfo")}} interface's `supported`, `smooth`, and `powerEfficient` properties.
The `decodingInfo()` and {{domxref("MediaCapabilities.encodingInfo", "encodingInfo()")}} methods both return promises. Once the promises state is fulfilled, you can access the `supported`, `smooth`, and `powerEfficient` properties from the returned object.

### Handling the response

Expand All @@ -103,7 +103,7 @@ navigator.mediaCapabilities.decodingInfo(videoConfiguration).then(result => {
});
```

The response provided is defined by the  {{domxref("MediaCapabilitiesInfo")}} interface.
The response provided is defined by the  [`MediaCapabilitiesInfo`](https://w3c.github.io/media-capabilities/#media-capabilities-info) dictionary.
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved

## Handling errors

Expand Down
12 changes: 7 additions & 5 deletions files/en-us/web/api/mediacapabilities/decodinginfo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ browser-compat: api.MediaCapabilities.decodingInfo
---
{{APIRef("MediaCapabilities")}}

The **`MediaCapabilities.decodingInfo()`** method, part of the [Media Capabilities API](/en-US/docs/Web/API/MediaCapabilities), returns a promise with the tested media configuration's [mediaCapabilitiesInfo](/en-US/docs/Web/API/MediaCapabilities/MediaCapabilitiesInfo); this contains the three Boolean properties `supported`, `smooth`, and `powerefficient`, which describe whether decoding the media described would be supported, smooth, and powerefficient.
The **`MediaCapabilities.decodingInfo()`** method, part of the [Media Capabilities API](/en-US/docs/Web/API/MediaCapabilities), returns a promise with the tested media configuration's capabilities info; this contains the three Boolean properties `supported`, `smooth`, and `powerefficient`, which describe whether decoding the media described would be supported, smooth, and powerefficient.

## Syntax

Expand All @@ -30,11 +30,13 @@ mediaCapabilities.decodingInfo(MediaDecodingConfiguration)

### Return value

A {{jsxref('Promise')}} fulfilling with a {{domxref("MediaCapabilitiesInfo")}} interface containing three Boolean attributes:
A {{jsxref('Promise')}} fulfilling with an object containing three Boolean attributes:

- `supported`
- `smooth`
- `powerEfficient`
- `supported`: Given the properties defined in the {{domxref("MediaConfiguration")}}, can the specified piece of media content be encoded (if {{domxref("MediaEncodingConfiguration")}} is set) or decode (if {{domxref("MediaDecodingConfiguration")}} is set) at all? If yes, `supported` is _true_. Otherwise, it is _false_.
- `smooth`: Given the properties defined in the {{domxref("MediaConfiguration")}}, will the playback of the specified piece of media be high quality? Will it be smooth?  If `supported` is `true`, and playback will be smooth, `smooth` is _true_, Otherwise, is it _false._
- `powerEfficient`: Given the properties defined in the {{domxref("MediaConfiguration")}}, will the playback of the specified piece of media be power efficient? If `supported` is `true`, and playback will be power efficient, `powerEfficient` is _true_, Otherwise, is it _false._

Browsers will report a supported media configuration as `smooth` and `powerEfficient` until stats on this device have been recorded. All supported audio codecs are reported to be power efficient.

### Exceptions

Expand Down
13 changes: 7 additions & 6 deletions files/en-us/web/api/mediacapabilities/encodinginfo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ browser-compat: api.MediaCapabilities.encodingInfo

The **`MediaCapabilities.encodingInfo()`** method, part of
the {{domxref("MediaCapabilities")}} interface of the [Media Capabilities API](/en-US/docs/Web/API/MediaCapabilities), returns a
promise with the tested media configuration's {{domxref("MediaCapabilitiesInfo")}}; this
promise with the tested media configuration's capabilities information; this
contains the three Boolean properties `supported`, `smooth`, and
`powerefficient`, which describe how compatible the device is with the type
of media.
Expand All @@ -38,12 +38,13 @@ mediaCapabilities.encodingInfo(mediaEncodingConfiguration)

### Return value

A {{jsxref("Promise")}} fulfilling with a {{domxref("MediaCapabilitiesInfo")}}
interface containing three Boolean attributes:
A {{jsxref("Promise")}} fulfilling with an object containing three Boolean attributes:

- `supported`
- `smooth`
- `powerEfficient`
- `supported`: Given the properties defined in the {{domxref("MediaConfiguration")}}, can the specified piece of media content be encoded (if {{domxref("MediaEncodingConfiguration")}} is set) or decode (if {{domxref("MediaDecodingConfiguration")}} is set) at all? If yes, `supported` is _true_. Otherwise, it is _false_.
- `smooth`: Given the properties defined in the {{domxref("MediaConfiguration")}}, will the playback of the specified piece of media be high quality? Will it be smooth?  If `supported` is `true`, and playback will be smooth, `smooth` is _true_, Otherwise, is it _false._
- `powerEfficient`: Given the properties defined in the {{domxref("MediaConfiguration")}}, will the playback of the specified piece of media be power efficient? If `supported` is `true`, and playback will be power efficient, `powerEfficient` is _true_, Otherwise, is it _false._

Browsers will report a supported media configuration as `smooth` and `powerEfficient` until stats on this device have been recorded. All supported audio codecs are reported to be power efficient.

### Exceptions

Expand Down
63 changes: 0 additions & 63 deletions files/en-us/web/api/mediacapabilitiesinfo/index.md

This file was deleted.

3 changes: 1 addition & 2 deletions files/jsondata/GroupData.json
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,7 @@
"interfaces": [
"MediaCapabilities",
"ScreenLuminance",
"Screen",
"MediaCapabilitiesInfo"
"Screen"
],
"methods": [
"mediaCapabilities.decodingInfo()",
Expand Down