|
309 | 309 | [=Enqueues a control message=] to configure the audio decoder for decoding
|
310 | 310 | chunks as described by |config|.
|
311 | 311 |
|
312 |
| - NOTE: This method will trigger a {{NotSupportedError}} if the user agent |
| 312 | + NOTE: This method will trigger a {{NotSupportedError}} if the User Agent |
313 | 313 | does not support |config|. Authors should first check support by calling
|
314 |
| - {{AudioDecoder/isConfigSupported()}} with |config|. User agents are not |
| 314 | + {{AudioDecoder/isConfigSupported()}} with |config|. User Agents are not |
315 | 315 | required to support any particular codec type or configuration.
|
316 | 316 |
|
317 | 317 | When invoked, run these steps:
|
|
418 | 418 | <dt><dfn method for=AudioDecoder>isConfigSupported(config)</dfn></dt>
|
419 | 419 | <dd>
|
420 | 420 | Returns a promise indicating whether the provided |config| is supported by
|
421 |
| - the user agent. |
| 421 | + the User Agent. |
422 | 422 |
|
423 | 423 | NOTE: The returned {{AudioDecoderSupport}} {{AudioDecoderSupport/config}}
|
424 |
| - will contain only the dictionary members that user agent recognized. |
| 424 | + will contain only the dictionary members that User Agent recognized. |
425 | 425 | Unrecognized dictionary members will be ignored. Authors may detect
|
426 | 426 | unrecognized dictionary members by comparing
|
427 | 427 | {{AudioDecoderSupport/config}} to their provided |config|.
|
|
576 | 576 | [=Enqueues a control message=] to configure the video decoder for decoding
|
577 | 577 | chunks as described by |config|.
|
578 | 578 |
|
579 |
| - NOTE: This method will trigger a {{NotSupportedError}} if the user agent |
| 579 | + NOTE: This method will trigger a {{NotSupportedError}} if the User Agent |
580 | 580 | does not support |config|. Authors should first check support by calling
|
581 |
| - {{VideoDecoder/isConfigSupported()}} with |config|. User agents are not |
| 581 | + {{VideoDecoder/isConfigSupported()}} with |config|. User Agents are not |
582 | 582 | required to support any particular codec type or configuration.
|
583 | 583 |
|
584 | 584 | When invoked, run these steps:
|
|
691 | 691 | <dt><dfn method for=VideoDecoder>isConfigSupported(config)</dfn></dt>
|
692 | 692 | <dd>
|
693 | 693 | Returns a promise indicating whether the provided |config| is supported by
|
694 |
| - the user agent. |
| 694 | + the User Agent. |
695 | 695 |
|
696 | 696 | NOTE: The returned {{VideoDecoderSupport}} {{VideoDecoderSupport/config}}
|
697 |
| - will contain only the dictionary members that user agent recognized. |
| 697 | + will contain only the dictionary members that User Agent recognized. |
698 | 698 | Unrecognized dictionary members will be ignored. Authors may detect
|
699 | 699 | unrecognized dictionary members by comparing
|
700 | 700 | {{VideoDecoderSupport/config}} to their provided |config|.
|
|
861 | 861 | [=Enqueues a control message=] to configure the audio encoder for
|
862 | 862 | decoding chunks as described by |config|.
|
863 | 863 |
|
864 |
| - NOTE: This method will trigger a {{NotSupportedError}} if the user agent |
| 864 | + NOTE: This method will trigger a {{NotSupportedError}} if the User Agent |
865 | 865 | does not support |config|. Authors should first check support by calling
|
866 |
| - {{AudioEncoder/isConfigSupported()}} with |config|. User agents are not |
| 866 | + {{AudioEncoder/isConfigSupported()}} with |config|. User Agents are not |
867 | 867 | required to support any particular codec type or configuration.
|
868 | 868 |
|
869 | 869 | When invoked, run these steps:
|
|
962 | 962 | <dt><dfn method for=AudioEncoder>isConfigSupported(config)</dfn></dt>
|
963 | 963 | <dd>
|
964 | 964 | Returns a promise indicating whether the provided |config| is supported by
|
965 |
| - the user agent. |
| 965 | + the User Agent. |
966 | 966 |
|
967 | 967 | NOTE: The returned {{AudioEncoderSupport}} {{AudioEncoderSupport/config}}
|
968 |
| - will contain only the dictionary members that user agent recognized. |
| 968 | + will contain only the dictionary members that User Agent recognized. |
969 | 969 | Unrecognized dictionary members will be ignored. Authors may detect
|
970 | 970 | unrecognized dictionary members by comparing
|
971 | 971 | {{AudioEncoderSupport/config}} to their provided |config|.
|
|
1020 | 1020 | |outputConfig|.{{AudioDecoderConfig/numberOfChannels}}.
|
1021 | 1021 | 4. Assign |outputConfig|.{{AudioDecoderConfig/description}} with a
|
1022 | 1022 | sequence of codec specific bytes as determined by the
|
1023 |
| - {{AudioEncoder/[[codec implementation]]}}. The user agent must |
| 1023 | + {{AudioEncoder/[[codec implementation]]}}. The User Agent must |
1024 | 1024 | ensure that the provided description could be used to
|
1025 | 1025 | correctly decode output.
|
1026 | 1026 |
|
|
1177 | 1177 | [=Enqueues a control message=] to configure the video encoder for
|
1178 | 1178 | decoding chunks as described by |config|.
|
1179 | 1179 |
|
1180 |
| - NOTE: This method will trigger a {{NotSupportedError}} if the user agent |
| 1180 | + NOTE: This method will trigger a {{NotSupportedError}} if the User Agent |
1181 | 1181 | does not support |config|. Authors should first check support by calling
|
1182 |
| - {{VideoEncoder/isConfigSupported()}} with |config|. User agents are not |
| 1182 | + {{VideoEncoder/isConfigSupported()}} with |config|. User Agents are not |
1183 | 1183 | required to support any particular codec type or configuration.
|
1184 | 1184 |
|
1185 | 1185 | When invoked, run these steps:
|
|
1279 | 1279 | <dt><dfn method for=VideoEncoder>isConfigSupported(config)</dfn></dt>
|
1280 | 1280 | <dd>
|
1281 | 1281 | Returns a promise indicating whether the provided |config| is supported by
|
1282 |
| - the user agent. |
| 1282 | + the User Agent. |
1283 | 1283 |
|
1284 | 1284 | NOTE: The returned {{VideoEncoderSupport}} {{VideoEncoderSupport/config}}
|
1285 |
| - will contain only the dictionary members that user agent recognized. |
| 1285 | + will contain only the dictionary members that User Agent recognized. |
1286 | 1286 | Unrecognized dictionary members will be ignored. Authors may detect
|
1287 | 1287 | unrecognized dictionary members by comparing
|
1288 | 1288 | {{VideoEncoderSupport/config}} to their provided |config|.
|
|
1341 | 1341 | 5. Assign `encoderConfig.displayHeight` to
|
1342 | 1342 | `outputConfig.displayHeight`.
|
1343 | 1343 | 6. Assign the remaining keys of `outputConfig` as determined by
|
1344 |
| - {{VideoEncoder/[[codec implementation]]}}. The user agent |
| 1344 | + {{VideoEncoder/[[codec implementation]]}}. The User Agent |
1345 | 1345 | must ensure that the configuration is completely described
|
1346 | 1346 | such that |outputConfig| could be used to correctly decode
|
1347 | 1347 | |output|.
|
|
1431 | 1431 | <dfn>Check Configuration Support</dfn> (with |config|) {#config-support}
|
1432 | 1432 | ------------------------------------------------------------------------
|
1433 | 1433 | Run these steps:
|
1434 |
| -1. If the user agent can provide a <a>codec</a> to support all entries of the |
| 1434 | +1. If the User Agent can provide a <a>codec</a> to support all entries of the |
1435 | 1435 | |config|, including applicable default values for keys that are not
|
1436 | 1436 | included, return `true`.
|
1437 | 1437 |
|
|
1441 | 1441 |
|
1442 | 1442 | NOTE: Support for a given configuration may change dynamically if the
|
1443 | 1443 | hardware is altered (e.g. external GPU unplugged) or if required
|
1444 |
| - hardware resources are exhausted. User agents should describe support on |
| 1444 | + hardware resources are exhausted. User Agents should describe support on |
1445 | 1445 | a best-effort basis given the resources that are available at the time
|
1446 | 1446 | of the query.
|
1447 | 1447 |
|
|
1450 | 1450 | <dfn>Clone Configuration</dfn> (with |config|) {#clone-config}
|
1451 | 1451 | --------------------------------------------------------------
|
1452 | 1452 |
|
1453 |
| -NOTE: This algorithm will copy only the dictionary members that the user agent |
| 1453 | +NOTE: This algorithm will copy only the dictionary members that the User Agent |
1454 | 1454 | recognizes as part of the dictionary type.
|
1455 | 1455 |
|
1456 | 1456 | Run these steps:
|
|
1479 | 1479 | <dt><dfn dict-member for=AudioDecoderSupport>supported</dfn></dt>
|
1480 | 1480 | <dd>
|
1481 | 1481 | A boolean indicating the whether the corresponding
|
1482 |
| - {{AudioDecoderSupport/config}} is supported by the user agent. |
| 1482 | + {{AudioDecoderSupport/config}} is supported by the User Agent. |
1483 | 1483 | </dd>
|
1484 | 1484 | <dt><dfn dict-member for=AudioDecoderSupport>config</dfn></dt>
|
1485 | 1485 | <dd>
|
1486 |
| - An {{AudioDecoderConfig}} used by the user agent in determining the value of |
| 1486 | + An {{AudioDecoderConfig}} used by the User Agent in determining the value of |
1487 | 1487 | {{AudioDecoderSupport/supported}}.
|
1488 | 1488 | </dd>
|
1489 | 1489 | </dl>
|
|
1500 | 1500 | <dt><dfn dict-member for=VideoDecoderSupport>supported</dfn></dt>
|
1501 | 1501 | <dd>
|
1502 | 1502 | A boolean indicating the whether the corresponding
|
1503 |
| - {{VideoDecoderSupport/config}} is supported by the user agent. |
| 1503 | + {{VideoDecoderSupport/config}} is supported by the User Agent. |
1504 | 1504 | </dd>
|
1505 | 1505 | <dt><dfn dict-member for=VideoDecoderSupport>config</dfn></dt>
|
1506 | 1506 | <dd>
|
1507 |
| - A {{VideoDecoderConfig}} used by the user agent in determining the value of |
| 1507 | + A {{VideoDecoderConfig}} used by the User Agent in determining the value of |
1508 | 1508 | {{VideoDecoderSupport/supported}}.
|
1509 | 1509 | </dd>
|
1510 | 1510 | </dl>
|
|
1521 | 1521 | <dt><dfn dict-member for=AudioEncoderSupport>supported</dfn></dt>
|
1522 | 1522 | <dd>
|
1523 | 1523 | A boolean indicating the whether the corresponding
|
1524 |
| - {{AudioEncoderSupport/config}} is supported by the user agent. |
| 1524 | + {{AudioEncoderSupport/config}} is supported by the User Agent. |
1525 | 1525 | </dd>
|
1526 | 1526 | <dt><dfn dict-member for=AudioEncoderSupport>config</dfn></dt>
|
1527 | 1527 | <dd>
|
1528 |
| - An {{AudioEncoderConfig}} used by the user agent in determining the value of |
| 1528 | + An {{AudioEncoderConfig}} used by the User Agent in determining the value of |
1529 | 1529 | {{AudioEncoderSupport/supported}}.
|
1530 | 1530 | </dd>
|
1531 | 1531 | </dl>
|
|
1542 | 1542 | <dt><dfn dict-member for=VideoEncoderSupport>supported</dfn></dt>
|
1543 | 1543 | <dd>
|
1544 | 1544 | A boolean indicating the whether the corresponding
|
1545 |
| - {{VideoEncoderSupport/config}} is supported by the user agent. |
| 1545 | + {{VideoEncoderSupport/config}} is supported by the User Agent. |
1546 | 1546 | </dd>
|
1547 | 1547 | <dt><dfn dict-member for=VideoEncoderSupport>config</dfn></dt>
|
1548 | 1548 | <dd>
|
1549 |
| - A {{VideoEncoderConfig}} used by the user agent in determining the value of |
| 1549 | + A {{VideoEncoderConfig}} used by the User Agent in determining the value of |
1550 | 1550 | {{VideoEncoderSupport/supported}}.
|
1551 | 1551 | </dd>
|
1552 | 1552 | </dl>
|
|
1851 | 1851 |
|
1852 | 1852 | <div class='note'>
|
1853 | 1853 | NOTE: Most authors will be best served by using the default of
|
1854 |
| - {{HardwareAcceleration/allow}}. This gives the user agent flexibility to |
| 1854 | + {{HardwareAcceleration/allow}}. This gives the User Agent flexibility to |
1855 | 1855 | optimize based on its knowledge of the system and configuration. A common
|
1856 | 1856 | strategy will be to prioritize hardware acceleration at higher resolutions
|
1857 | 1857 | with a fallback to software codecs if hardware acceleration fails.
|
|
1886 | 1886 | <dl>
|
1887 | 1887 | <dt><dfn enum-value for=HardwareAcceleration>allow</dfn></dt>
|
1888 | 1888 | <dd>
|
1889 |
| - Indicates that the user agent may use hardware acceleration if it is |
| 1889 | + Indicates that the User Agent may use hardware acceleration if it is |
1890 | 1890 | available and compatible with other aspects of the codec configuration.
|
1891 | 1891 | </dd>
|
1892 | 1892 | <dt><dfn enum-value for=HardwareAcceleration>deny</dfn></dt>
|
1893 | 1893 | <dd>
|
1894 |
| - Indicates that the user agent must not use hardware acceleration. |
| 1894 | + Indicates that the User Agent must not use hardware acceleration. |
1895 | 1895 |
|
1896 | 1896 | NOTE: This will cause the configuration to be unsupported on platforms where
|
1897 | 1897 | an unaccelerated codec is unavailable or is incompatible with other aspects
|
1898 | 1898 | of the codec configuration.
|
1899 | 1899 | </dd>
|
1900 | 1900 | <dt><dfn enum-value for=HardwareAcceleration>require</dfn></dt>
|
1901 | 1901 | <dd>
|
1902 |
| - Indicates that the user agent must use hardware acceleration. |
| 1902 | + Indicates that the User Agent must use hardware acceleration. |
1903 | 1903 |
|
1904 | 1904 | NOTE: This will cause the configuration to be unsupported on platforms where
|
1905 | 1905 | an accelerated codec is unavailable or is incompatible with other aspects of
|
|
1917 | 1917 | </xmp>
|
1918 | 1918 |
|
1919 | 1919 | : <dfn enum-value for=LatencyMode>quality</dfn>
|
1920 |
| -:: Indicates that the user agent should optimize for encoding quality. In |
| 1920 | +:: Indicates that the User Agent should optimize for encoding quality. In |
1921 | 1921 | this mode:
|
1922 |
| - * User agents may increase encoding latency to improve quality. |
1923 |
| - * User agents must not drop frames to achieve the target |
| 1922 | + * User Agents may increase encoding latency to improve quality. |
| 1923 | + * User Agents must not drop frames to achieve the target |
1924 | 1924 | {{VideoEncoderConfig/bitrate}}.
|
1925 | 1925 |
|
1926 | 1926 | : <dfn enum-value for=LatencyMode>realtime</dfn>
|
1927 |
| -:: Indicates that the user agent should optimize for low latency. In this |
| 1927 | +:: Indicates that the User Agent should optimize for low latency. In this |
1928 | 1928 | mode:
|
1929 |
| - * User agents may sacrifice quality to improve latency. |
1930 |
| - * User agents may drop frames to achieve the target |
| 1929 | + * User Agents may sacrifice quality to improve latency. |
| 1930 | + * User Agents may drop frames to achieve the target |
1931 | 1931 | {{VideoEncoderConfig/bitrate}}.
|
1932 | 1932 |
|
1933 | 1933 | Configuration Equivalence{#config-equivalence}
|
|
1949 | 1949 | <dt><dfn dict-member for=VideoEncoderEncodeOptions>keyFrame</dfn></dt>
|
1950 | 1950 | <dd>
|
1951 | 1951 | A value of `true` indicates that the given frame MUST be encoded as a key
|
1952 |
| - frame. A value of `false` indicates that the user agent has flexibility to |
| 1952 | + frame. A value of `false` indicates that the User Agent has flexibility to |
1953 | 1953 | decide whether the frame will be encoded as a [=key frame=].
|
1954 | 1954 | </dd>
|
1955 | 1955 | </dl>
|
|
2175 | 2175 | referenced by a `[[resource reference]]`.
|
2176 | 2176 |
|
2177 | 2177 | NOTE: When a [=media resource=] is no longer referenced by a
|
2178 |
| - `[[resource reference]]`, the resource may be destroyed. User agents are |
| 2178 | + `[[resource reference]]`, the resource may be destroyed. User Agents are |
2179 | 2179 | encouraged to destroy such resources quickly to reduce memory pressure and
|
2180 | 2180 | facilitate resource reuse.
|
2181 | 2181 |
|
|
2816 | 2816 | {{PixelFormat}} and reference them in the steps above. See
|
2817 | 2817 | [#165](https://github.com/w3c/webcodecs/issues/165).
|
2818 | 2818 |
|
2819 |
| - NOTE: The user agent may choose to allocate resource with a larger coded |
| 2819 | + NOTE: The User Agent may choose to allocate resource with a larger coded |
2820 | 2820 | size and plane strides to improve memory alignment. Increases will be
|
2821 | 2821 | reflected by {{VideoFrame/codedWidth}} and {{VideoFrame/codedHeight}}.
|
2822 | 2822 |
|
|
2837 | 2837 | the byte positioned at |dataOffset| and stopping after
|
2838 | 2838 | {{PlaneInit/stride}} bytes have been copied.
|
2839 | 2839 |
|
2840 |
| - NOTE: The user agent may use {{VideoFramePlaneInit/visibleRect}} |
| 2840 | + NOTE: The User Agent may use {{VideoFramePlaneInit/visibleRect}} |
2841 | 2841 | to copy only the visible rectangle. It may also reposition
|
2842 | 2842 | the visible rectangle within |resource|. The final position
|
2843 | 2843 | will be reflected by {{VideoFrame/visibleRect}}.
|
|
3421 | 3421 | specify how the plane is laid out in the destination {{BufferSource}}}.
|
3422 | 3422 | Alternatively, callers can inspect {{VideoFrame/copyTo()}}'s returned sequence
|
3423 | 3423 | of {{PlaneLayout}}s to learn the the offset and stride for planes as decided by
|
3424 |
| -the user agent. |
| 3424 | +the User Agent. |
3425 | 3425 |
|
3426 | 3426 | <xmp class='idl'>
|
3427 | 3427 | dictionary PlaneLayout {
|
|
3554 | 3554 | ImageDecoder(init)
|
3555 | 3555 | </dfn>
|
3556 | 3556 | :: NOTE: Calling {{ImageDecoder/decode()}} on the constructed {{ImageDecoder}}
|
3557 |
| - will trigger a {{NotSupportedError}} if the user agent does not support |
| 3557 | + will trigger a {{NotSupportedError}} if the User Agent does not support |
3558 | 3558 | |type|. Authors should first check support by calling
|
3559 |
| - {{ImageDecoder/isTypeSupported()}} with |type|. User agents are not |
| 3559 | + {{ImageDecoder/isTypeSupported()}} with |type|. User Agents are not |
3560 | 3560 | required to support any particular type.
|
3561 | 3561 |
|
3562 | 3562 | When invoked, run these steps:
|
|
3661 | 3661 | steps:
|
3662 | 3662 | 1. Wait for {{ImageDecoder/[[tracks established]]}} to become `true`.
|
3663 | 3663 | 2. If |options|.{{ImageDecodeOptions/completeFramesOnly}} is `false` and
|
3664 |
| - the image is a [=Progressive Image=] for which the user agent supports |
| 3664 | + the image is a [=Progressive Image=] for which the User Agent supports |
3665 | 3665 | progressive decoding, run the [=Decode Progressive Frame=] algorithm with |options|.{{ImageDecodeOptions/frameIndex}} and |promise|.
|
3666 | 3666 | 3. Otherwise, run the [=Decode Complete Frame=] algorithm with
|
3667 | 3667 | |options|.{{ImageDecodeOptions/frameIndex}} and |promise|.
|
|
3681 | 3681 |
|
3682 | 3682 | : <dfn method for=ImageDecoder>isTypeSupported(type)</dfn>
|
3683 | 3683 | :: Returns a promise indicating whether the provided config is supported by the
|
3684 |
| - user agent. |
| 3684 | + User Agent. |
3685 | 3685 |
|
3686 | 3686 | When invoked, run these steps:
|
3687 | 3687 | 1. If |type| is not a [=valid image MIME type=], return a {{Promise}}
|
|
3962 | 3962 | {{EncodingError}} {{DOMException}}.
|
3963 | 3963 |
|
3964 | 3964 | : <dfn for=ImageDecoder>Check Type Support</dfn> (with |type|)
|
3965 |
| -:: 1. If the user agent can provide a codec to support decoding |type|, return |
| 3965 | +:: 1. If the User Agent can provide a codec to support decoding |type|, return |
3966 | 3966 | `true`.
|
3967 | 3967 | 2. Otherwise, return `false`.
|
3968 | 3968 |
|
|
4077 | 4077 | previous call, until finally the full-detail image is produced.
|
4078 | 4078 |
|
4079 | 4079 | If {{ImageDecodeOptions/completeFramesOnly}} is assigned `true`, or if the
|
4080 |
| - image is not a [=Progressive Image=], or if the user agent does not support |
| 4080 | + image is not a [=Progressive Image=], or if the User Agent does not support |
4081 | 4081 | progressive decoding for the given image type, calls to
|
4082 | 4082 | {{ImageDecoder/decode()}} will only resolve once the full detail image is
|
4083 | 4083 | decoded.
|
|
4292 | 4292 | affords attackers the ability to invoke sequences of control methods that were
|
4293 | 4293 | not previously possible via the higher level APIs.
|
4294 | 4294 |
|
4295 |
| -User agents should mitigate this risk by extensively fuzzing their |
| 4295 | +User Agents should mitigate this risk by extensively fuzzing their |
4296 | 4296 | implementation with random inputs and control method invocations. Additionally,
|
4297 |
| -user agents are encouraged to isolate their underlying codecs in processes with |
| 4297 | +User Agents are encouraged to isolate their underlying codecs in processes with |
4298 | 4298 | restricted privileges (sandbox) as a barrier against successful exploits being
|
4299 | 4299 | able to read user data.
|
4300 | 4300 |
|
|
4328 | 4328 | expose some additional information in the form of low level codec features.
|
4329 | 4329 |
|
4330 | 4330 | A codec feature profile alone is unlikely to be uniquely identifying. Underlying
|
4331 |
| -codecs are often implemented entirely in software (be it part of the user agent |
| 4331 | +codecs are often implemented entirely in software (be it part of the User Agent |
4332 | 4332 | binary or part of the operating system), such that all users who run that
|
4333 | 4333 | software will have a common set of capabilities. Additionally, underlying codecs
|
4334 | 4334 | are often implemented with hardware acceleration, but such hardware is mass
|
|
4340 | 4340 |
|
4341 | 4341 | Segmenting groups of users by codec feature profile still amounts to a bit of
|
4342 | 4342 | entropy that can be combined with other metrics to uniquely identify a user.
|
4343 |
| -User agents may partially mitigate this by returning an error whenever a site |
4344 |
| -attempts to exhaustively probe for codec capabilities. Additionally, user agents |
| 4343 | +User Agents may partially mitigate this by returning an error whenever a site |
| 4344 | +attempts to exhaustively probe for codec capabilities. Additionally, User Agents |
4345 | 4345 | may implement a "privacy budget", which depletes as authors use WebCodecs and
|
4346 | 4346 | other identifying APIs. Upon exhaustion of the privacy budget, codec
|
4347 | 4347 | capabilities could be reduced to a common baseline or prompt for user approval.
|
0 commit comments