content icon indicating copy to clipboard operation
content copied to clipboard

Align `getCapabilities()` documentation with JavaScript runtime behavior

Open low-perry opened this issue 9 months ago • 2 comments

Description

As pointed out by #38249 the objects presented as the properties of the return value of the getCapabilities(), method were wrong. I removed that abstraction all together and mapped the properties to the actual runtime behavior developers see in JavaScript. There’s no need to introduce abstract or specialized types like "UDoubleRange" that might make developers think they’re dealing with a built-in, complex data type. This reduces unnecessary cognitive overhead.

Motivation

Additional details

Related issues and pull requests

Fixes #38249

low-perry avatar Apr 24 '25 01:04 low-perry

Preview URLs

Flaws (1)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/MediaStreamTrack/getCapabilities Title: MediaStreamTrack: getCapabilities() method Flaw count: 1

  • macros:
    • Can't resolve /en-US/docs/Web/API/MediaTrackConstraints/resizeMode

(comment last updated: 2025-08-05 11:22:20)

github-actions[bot] avatar Apr 24 '25 01:04 github-actions[bot]

@Josh-Cena, I added another file here to document the getCapabilities() method. I upgraded the code example because the previous one was throwing errors. Also, the properties of the MediaTrackCapabilities need to be changed here as well, but I'll wait for your review on the previous file

low-perry avatar Apr 24 '25 13:04 low-perry