v152 · media · feature detection
Ignored-member detector
Dictionary members are the web platform's silent failure mode: a browser that predates encryptionScheme doesn't reject it — it ignores it and happily answers for the unscoped query. This page detects real support the only sound way: ask about a scheme that cannot exist.
The Media Capabilities spec requires an implementing browser to return
supported: false for an unrecognized encryption scheme. So encryptionScheme: 'showcase-nonexistent-scheme' is a perfect litmus test: false ⇒ the member is really consulted; true ⇒ this browser is ignoring the member and every scheme-scoped answer you get from it is untrustworthy. Never feature-detect a dictionary member by "the call didn't throw".Detect real encryptionScheme support
Runs three real decodingInfo() queries against Clear Key (the key system EME requires everywhere): a baseline with no scheme, one with 'cenc', and one with an invented scheme name.
| Query | encryptionScheme | supported |
|---|---|---|
| Not run yet. | ||
No verdict yet.
code path
const probe = await navigator.mediaCapabilities.decodingInfo({
type: 'media-source',
video, // any decodable config
keySystemConfiguration: {
keySystem: 'org.w3.clearkey',
video: { encryptionScheme: 'showcase-nonexistent-scheme' },
},
});
// spec-correct browsers MUST answer { supported: false } here.
// A browser that answers true is ignoring encryptionScheme entirely.