|
3748 | 3748 | : <dfn method for=VideoFrame>copyTo(|destination|, |options|)</dfn> |
3749 | 3749 | :: Asynchronously copies the planes of this frame into |destination| according |
3750 | 3750 | to |options|. The format of the data is specified by {{VideoFrameCopyToOptions/format}}, |
3751 | | - if present, or the same as {{VideoFrame/format}}. |
| 3751 | + if present, otherwise {{VideoFrame/format}}. |
3752 | 3752 |
|
3753 | 3753 | NOTE: Promises that are returned by several calls to |
3754 | 3754 | {{VideoFrame/copyTo()}} are not guaranteed to resolve in the order they |
|
4217 | 4217 | 5. If |format| is equal to {{BGRA}} or {{BGRX}}: |
4218 | 4218 | 1. Let |pixelIndex| be `0` |
4219 | 4219 | 2. While |pixelIndex| is less than `rect.width` multiplied by `rect.height`: |
4220 | | - 1. Swap items in |imageData|.{{ImageData/data}} at indexes `4 * pixelIndex` |
| 4220 | + 1. Swap elements in |imageData|.{{ImageData/data}} at indexes `4 * pixelIndex` |
4221 | 4221 | and `4 * pixelIndex + 2`. |
4222 | 4222 | 2. Increment |pixelIndex| by `1` |
4223 | 4223 | 6. Let |init| be a new {{VideoFrameBufferInit}} constructed with |
|
4322 | 4322 | invalid to specify planes that overlap. |
4323 | 4323 | : <dfn dict-member for=VideoFrameCopyToOptions>format</dfn> |
4324 | 4324 | :: A {{VideoPixelFormat}} for the pixel data in the destination |
4325 | | - {{BufferSource}}. Explicity values cab be: |
4326 | | - {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} and the same as {{VideoFrame/format}}. |
| 4325 | + {{BufferSource}}. Explicit values cab be: |
| 4326 | + {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} or the same as {{VideoFrame/format}}. |
4327 | 4327 | If unspecified, the {{VideoFrame/format}} is used. |
4328 | 4328 | : <dfn dict-member for=VideoFrameCopyToOptions>colorSpace</dfn> |
4329 | 4329 | :: A {{PredefinedColorSpace}} that <em class="rfc2119">SHALL</em> be used to as |
|
0 commit comments