|
3337 | 3337 | readonly attribute unsigned long codedHeight;
|
3338 | 3338 | readonly attribute DOMRectReadOnly? codedRect;
|
3339 | 3339 | readonly attribute DOMRectReadOnly? visibleRect;
|
| 3340 | + readonly attribute double rotation; |
| 3341 | + readonly attribute boolean flip; |
3340 | 3342 | readonly attribute unsigned long displayWidth;
|
3341 | 3343 | readonly attribute unsigned long displayHeight;
|
3342 | 3344 | readonly attribute unsigned long long? duration; // microseconds
|
|
3364 | 3366 | // aspect ratio unless an explicit displayWidth and displayHeight are given.
|
3365 | 3367 | DOMRectInit visibleRect;
|
3366 | 3368 |
|
| 3369 | + double rotation = 0; |
| 3370 | + boolean flip = false; |
| 3371 | + |
3367 | 3372 | // Default matches image unless visibleRect is provided.
|
3368 | 3373 | [EnforceRange] unsigned long displayWidth;
|
3369 | 3374 | [EnforceRange] unsigned long displayHeight;
|
|
3384 | 3389 | // Default visible rect is coded size positioned at (0,0)
|
3385 | 3390 | DOMRectInit visibleRect;
|
3386 | 3391 |
|
| 3392 | + double rotation = 0; |
| 3393 | + boolean flip = false; |
| 3394 | + |
3387 | 3395 | // Default display dimensions match visibleRect.
|
3388 | 3396 | [EnforceRange] unsigned long displayWidth;
|
3389 | 3397 | [EnforceRange] unsigned long displayHeight;
|
|
3433 | 3441 | :: The height of pixels to include in visible rectangle, starting from
|
3434 | 3442 | {{VideoFrame/[[visible top]]}}.
|
3435 | 3443 |
|
| 3444 | +: <dfn attribute for=VideoFrame>\[[rotation]]</dfn> |
| 3445 | +:: The rotation to applied to the {{VideoFrame}} when rendered, in degrees |
| 3446 | + clockwise. Rotation applies before flip. |
| 3447 | + |
| 3448 | +: <dfn attribute for=VideoFrame>\[[flip]]</dfn> |
| 3449 | +:: Whether a horizontal flip is applied to the {{VideoFrame}} when rendered. |
| 3450 | + Flip is applied after rotation. |
| 3451 | + |
3436 | 3452 | : <dfn attribute for=VideoFrame>[[display width]]</dfn>
|
3437 | 3453 | :: Width of the {{VideoFrame}} when displayed after applying aspect ratio
|
3438 | 3454 | adjustments.
|
|
3489 | 3505 | default image of the animation (the one that the format defines is
|
3490 | 3506 | to be used when animation is not supported or is disabled), or, if
|
3491 | 3507 | there is no such image, the first frame of the animation.
|
3492 |
| - 4. Let |width| and |height| be the [=natural width=] and |
3493 |
| - [=natural height=] of |image|. |
3494 |
| - 5. Run the [=VideoFrame/Initialize Frame With Resource and Size=] |
3495 |
| - algorithm with |init|, |frame|, |resource|, |width|, and |height| |
| 3508 | + 4. Let |codedWidth| and |codedHeight| be the width and height of |
| 3509 | + |resource|. |
| 3510 | + 5. Let |baseRotation| and |baseFlip| describe the rotation and flip of |
| 3511 | + |image| relative to |resource|. |
| 3512 | + 6. Let |defaultDisplayWidth| and |defaultDisplayHeight| be the |
| 3513 | + [=natural width=] and [=natural height=] of |image|. |
| 3514 | + 7. Run the [=VideoFrame/Initialize Frame With Resource=] |
| 3515 | + algorithm with |init|, |frame|, |resource|, |codedWidth|, |
| 3516 | + |codedHeight|, |baseRotation|, |baseFlip|, |defaultDisplayWidth|, |
| 3517 | + and |defaultDisplayHeight|. |
3496 | 3518 |
|
3497 | 3519 | - {{HTMLVideoElement}}
|
3498 | 3520 | 1. If |image|'s {{HTMLMediaElement/networkState}} attribute is
|
|
3517 | 3539 | reference counting where feasible.
|
3518 | 3540 |
|
3519 | 3541 | 3. Let |width| be `image.width` and |height| be `image.height`.
|
3520 |
| - 4. Run the [=VideoFrame/Initialize Frame With Resource and Size=] |
3521 |
| - algorithm with |init|, |frame|, |resource|, |width|, and |height|. |
| 3542 | + 4. Run the [=VideoFrame/Initialize Frame With Resource=] |
| 3543 | + algorithm with |init|, |frame|, |resource|, |width|, |height|, |
| 3544 | + `0`, `false`, |width|, and |height|. |
3522 | 3545 |
|
3523 | 3546 | - {{VideoFrame}}
|
3524 | 3547 | 1. Run the [=VideoFrame/Initialize Frame From Other Frame=] algorithm
|
|
3609 | 3632 | {{VideoFrame/[[visible width]]}}.
|
3610 | 3633 | 2. Assign {{VideoFrame/[[coded height]]}} to
|
3611 | 3634 | {{VideoFrame/[[visible height]]}}.
|
3612 |
| - 4. If |init|.{{VideoFrameBufferInit/displayWidth}} [=map/exists=], assign |
3613 |
| - it to {{VideoFrame/[[display width]]}}. Otherwise, assign |
3614 |
| - {{VideoFrame/[[visible width]]}} to {{VideoFrame/[[display width]]}}. |
3615 |
| - 5. If |init|.{{VideoFrameBufferInit/displayHeight}} [=map/exists=], assign |
3616 |
| - it to {{VideoFrame/[[display height]]}}. Otherwise, assign |
3617 |
| - {{VideoFrame/[[visible height]]}} to {{VideoFrame/[[display height]]}}. |
3618 |
| - 6. Assign |init|'s {{VideoFrameBufferInit/timestamp}} and |
| 3635 | + 4. Assign the result of running the [=VideoFrame/Parse Rotation=] algorithm, |
| 3636 | + with |init|.{{VideoFrameBufferInit/rotation}}, to |
| 3637 | + {{VideoFrame/[[rotation]]}}. |
| 3638 | + 5. Assign |init|.{{VideoFrameBufferInit/flip}} to |
| 3639 | + {{VideoFrame/[[flip]]}}. |
| 3640 | + 6. If {{VideoFrameBufferInit/displayWidth}} and |
| 3641 | + {{VideoFrameBufferInit/displayHeight}} [=map/exist=] in |init|, assign |
| 3642 | + them to {{VideoFrame/[[display width]]}} and |
| 3643 | + {{VideoFrame/[[display height]]}} respectively. |
| 3644 | + 7. Otherwise: |
| 3645 | + 1. If {{VideoFrame/[[rotation]]}} is equal to `0` or `180`: |
| 3646 | + 1. Assign {{VideoFrame/[[visible width]]}} to |
| 3647 | + {{VideoFrame/[[display width]]}}. |
| 3648 | + 2. Assign {{VideoFrame/[[visible height]]}} to |
| 3649 | + {{VideoFrame/[[display height]]}}. |
| 3650 | + 2. Otherwise: |
| 3651 | + 1. Assign {{VideoFrame/[[visible height]]}} to |
| 3652 | + {{VideoFrame/[[display width]]}}. |
| 3653 | + 2. Assign {{VideoFrame/[[visible width]]}} to |
| 3654 | + {{VideoFrame/[[display height]]}}. |
| 3655 | + 8. Assign |init|'s {{VideoFrameBufferInit/timestamp}} and |
3619 | 3656 | {{VideoFrameBufferInit/duration}} to {{VideoFrame/[[timestamp]]}} and
|
3620 | 3657 | {{VideoFrame/[[duration]]}} respectively.
|
3621 |
| - 7. Let |colorSpace| be `undefined`. |
3622 |
| - 8. If |init|.{{VideoFrameBufferInit/colorSpace}} [=map/exists=], assign its |
| 3658 | + 9. Let |colorSpace| be `undefined`. |
| 3659 | + 10. If |init|.{{VideoFrameBufferInit/colorSpace}} [=map/exists=], assign its |
3623 | 3660 | value to |colorSpace|.
|
3624 |
| - 9. Assign |init|'s {{VideoFrameBufferInit/format}} to |
| 3661 | + 11. Assign |init|'s {{VideoFrameBufferInit/format}} to |
3625 | 3662 | {{VideoFrame/[[format]]}}.
|
3626 |
| - 10. Assign the result of running the [=VideoFrame/Pick Color Space=] |
| 3663 | + 12. Assign the result of running the [=VideoFrame/Pick Color Space=] |
3627 | 3664 | algorithm, with |colorSpace| and {{VideoFrame/[[format]]}}, to
|
3628 | 3665 | {{VideoFrame/[[color space]]}}.
|
3629 |
| - 11. Assign the result of calling [=Copy VideoFrame metadata=] |
| 3666 | + 13. Assign the result of calling [=Copy VideoFrame metadata=] |
3630 | 3667 | with |init|'s {{VideoFrameBufferInit/metadata}} to
|
3631 | 3668 | |frame|.{{VideoFrame/[[metadata]]}}.
|
3632 | 3669 | 22. Return |frame|.
|
|
3685 | 3722 | {{DOMRectReadOnly/height}} respectively.
|
3686 | 3723 | 3. Return |rect|.
|
3687 | 3724 |
|
| 3725 | +: <dfn attribute for=VideoFrame>rotation</dfn> |
| 3726 | +:: The rotation to applied to the VideoFrame when rendered, in degrees |
| 3727 | + clockwise. Rotation applies before flip. |
| 3728 | + |
| 3729 | + The {{VideoFrame/rotation}} getter steps are to return |
| 3730 | + {{VideoFrame/[[rotation]]}}. |
| 3731 | + |
| 3732 | +: <dfn attribute for=VideoFrame>flip</dfn> |
| 3733 | +:: Whether a horizontal flip is applied to the {{VideoFrame}} when rendered. |
| 3734 | + Flip applies after rotation. |
| 3735 | + |
| 3736 | + The {{VideoFrame/flip}} getter steps are to return {{VideoFrame/[[flip]]}}. |
| 3737 | + |
3688 | 3738 | : <dfn attribute for=VideoFrame>displayWidth</dfn>
|
3689 |
| -:: Width of the VideoFrame when displayed after applying aspect ratio |
3690 |
| - adjustments. |
| 3739 | +:: Width of the VideoFrame when displayed after applying rotation and aspect |
| 3740 | + ratio adjustments. |
3691 | 3741 |
|
3692 | 3742 | The {{VideoFrame/displayWidth}} getter steps are to return
|
3693 | 3743 | {{VideoFrame/[[display width]]}}.
|
3694 | 3744 |
|
3695 | 3745 | : <dfn attribute for=VideoFrame>displayHeight</dfn>
|
3696 |
| -:: Height of the VideoFrame when displayed after applying aspect ratio |
3697 |
| - adjustments. |
| 3746 | +:: Height of the VideoFrame when displayed after applying rotation and aspect |
| 3747 | + ratio adjustments. |
3698 | 3748 |
|
3699 | 3749 | The {{VideoFrame/displayHeight}} getter steps are to return
|
3700 | 3750 | {{VideoFrame/[[display height]]}}.
|
|
3961 | 4011 | {{VideoFrame/colorSpace}}.
|
3962 | 4012 | 6. Let |defaultVisibleRect| be the result of performing the getter steps
|
3963 | 4013 | for {{VideoFrame/visibleRect}} on |otherFrame|.
|
3964 |
| - 7. Let |defaultDisplayWidth|, and |defaultDisplayHeight| be |otherFrame|'s |
3965 |
| - {{VideoFrame/[[display width]]}}, and {{VideoFrame/[[display height]]}} |
| 4014 | + 7. Let |baseRotation| and |baseFlip| be |otherFrame|'s |
| 4015 | + {{VideoFrame/[[rotation]]}} and {{VideoFrame/[[flip]]}}, respectively. |
| 4016 | + 8. Let |defaultDisplayWidth| and |defaultDisplayHeight| be |otherFrame|'s |
| 4017 | + {{VideoFrame/[[display width]]}} and {{VideoFrame/[[display height]]}}, |
3966 | 4018 | respectively.
|
3967 |
| - 8. Run the [=VideoFrame/Initialize Visible Rect and Display Size=] |
3968 |
| - algorithm with |init|, |frame|, |defaultVisibleRect|, |
3969 |
| - |defaultDisplayWidth|, and |defaultDisplayHeight|. |
3970 |
| - 9. If {{VideoFrameInit/duration}} [=map/exists=] in |init|, assign it to |
| 4019 | + 9. Run the [=VideoFrame/Initialize Visible Rect, Orientation, and Display Size=] |
| 4020 | + algorithm with |init|, |frame|, |defaultVisibleRect|, |baseRotation|, |
| 4021 | + |baseFlip|, |defaultDisplayWidth|, and |defaultDisplayHeight|. |
| 4022 | + 10. If {{VideoFrameInit/duration}} [=map/exists=] in |init|, assign it to |
3971 | 4023 | |frame|'s {{VideoFrame/[[duration]]}}. Otherwise, assign
|
3972 | 4024 | |otherFrame|.{{VideoFrame/duration}} to
|
3973 | 4025 | |frame|'s {{VideoFrame/[[duration]]}}.
|
3974 |
| - 10. If {{VideoFrameInit/timestamp}} [=map/exists=] in |init|, assign it to |
| 4026 | + 11. If {{VideoFrameInit/timestamp}} [=map/exists=] in |init|, assign it to |
3975 | 4027 | |frame|'s {{VideoFrame/[[timestamp]]}}. Otherwise, assign
|
3976 | 4028 | |otherFrame|'s {{VideoFrame/timestamp}} to
|
3977 | 4029 | |frame|'s {{VideoFrame/[[timestamp]]}}.
|
3978 |
| - 11. Assign |format| to |frame|.{{VideoFrame/[[format]]}}. |
3979 |
| - 12. Assign the result of calling [=Copy VideoFrame metadata=] |
| 4030 | + 12. Assign |format| to |frame|.{{VideoFrame/[[format]]}}. |
| 4031 | + 13. Assign the result of calling [=Copy VideoFrame metadata=] |
3980 | 4032 | with |init|'s {{VideoFrameInit/metadata}} to |frame|.{{VideoFrame/[[metadata]]}}.
|
3981 | 4033 |
|
3982 |
| -: <dfn for=VideoFrame>Initialize Frame With Resource and Size</dfn> (with |
3983 |
| - |init|, |frame|, |resource|, |width| and |height|) |
| 4034 | +: <dfn for=VideoFrame>Initialize Frame With Resource</dfn> (with |
| 4035 | + |init|, |frame|, |resource|, |codedWidth|, |codedHeight|, |baseRotation|, |
| 4036 | + |baseFlip|, |defaultDisplayWidth|, and |defaultDisplayHeight|) |
3984 | 4037 | :: 1. Let |format| be `null`.
|
3985 | 4038 | 2. If |resource| uses a recognized {{VideoPixelFormat}}, assign the
|
3986 | 4039 | {{VideoPixelFormat}} of |resource| to |format|.
|
|
3992 | 4045 | 6. If |init|.{{VideoFrameInit/alpha}} is {{AlphaOption/discard}}, assign
|
3993 | 4046 | |format|'s [=equivalent opaque format=] to |format|.
|
3994 | 4047 | 7. Assign |format| to {{VideoFrame/[[format]]}}
|
3995 |
| - 8. Assign |width| and |height| to |frame|'s {{VideoFrame/[[coded width]]}} |
3996 |
| - and {{VideoFrame/[[coded height]]}} respectively. |
| 4048 | + 8. Assign |codedWidth| and |codedHeight| to |frame|'s |
| 4049 | + {{VideoFrame/[[coded width]]}} and {{VideoFrame/[[coded height]]}} |
| 4050 | + respectively. |
3997 | 4051 | 9. Let |defaultVisibleRect| be a new {{DOMRect}} constructed with
|
3998 |
| - «[ "x:" → `0`, "y" → `0`, "width" → |width|, "height" → |height| ]» |
3999 |
| - 10. Run the [=VideoFrame/Initialize Visible Rect and Display Size=] |
4000 |
| - algorithm with |init|, |frame|, |defaultVisibleRect|, |width|, and |
4001 |
| - |height|. |
| 4052 | + «[ "x:" → `0`, "y" → `0`, "width" → |codedWidth|, "height" → |codedHeight| ]» |
| 4053 | + 10. Run the [=VideoFrame/Initialize Visible Rect, Orientation, and Display Size=] |
| 4054 | + algorithm with |init|, |frame|, |defaultVisibleRect|, |
| 4055 | + |defaultDisplayWidth|, and |defaultDisplayHeight|. |
4002 | 4056 | 11. Assign `init`.{{VideoFrameInit/duration}} to
|
4003 | 4057 | |frame|'s {{VideoFrame/[[duration]]}}.
|
4004 | 4058 | 12. Assign `init`.{{VideoFrameInit/timestamp}} to
|
|
4008 | 4062 | 14. Otherwise, assign a new {{VideoColorSpace}}, constructed with an empty
|
4009 | 4063 | {{VideoColorSpaceInit}}, to {{VideoFrame/[[color space]]}}.
|
4010 | 4064 |
|
4011 |
| -: <dfn for=VideoFrame>Initialize Visible Rect and Display Size</dfn> (with |
4012 |
| - |init|, |frame|, |defaultVisibleRect|, |defaultDisplayWidth| and |
4013 |
| - |defaultDisplayHeight|) |
| 4065 | +: <dfn for=VideoFrame>Initialize Visible Rect, Orientation, and Display Size</dfn> |
| 4066 | + (with |init|, |frame|, |defaultVisibleRect|, |baseRotation|, |baseFlip|, |
| 4067 | + |defaultDisplayWidth| and |defaultDisplayHeight|) |
4014 | 4068 | :: 1. Let |visibleRect| be |defaultVisibleRect|.
|
4015 | 4069 | 2. If |init|.{{VideoFrameInit/visibleRect}} [=map/exists=], assign it to
|
4016 | 4070 | |visibleRect|.
|
4017 | 4071 | 3. Assign |visibleRect|'s {{DOMRect/x}}, {{DOMRect/y}}, {{DOMRect/width}},
|
4018 | 4072 | and {{DOMRect/height}}, to |frame|'s {{VideoFrame/[[visible left]]}},
|
4019 | 4073 | {{VideoFrame/[[visible top]]}}, {{VideoFrame/[[visible width]]}}, and
|
4020 | 4074 | {{VideoFrame/[[visible height]]}} respectively.
|
4021 |
| - 4. If {{VideoFrameInit/displayWidth}} and {{VideoFrameInit/displayHeight}} |
| 4075 | + 4. Let |rotation| be the result of running the [=VideoFrame/Parse Rotation=] |
| 4076 | + algorithm, with |init|.{{VideoFrameInit/rotation}}. |
| 4077 | + 5. Assign the result of running the [=VideoFrame/Add Rotations=] algorithm, |
| 4078 | + with |baseRotation|, |baseFlip|, and |rotation|, to |frame|'s |
| 4079 | + {{VideoFrame/[[rotation]]}}. |
| 4080 | + 6. If |baseFlip| is equal to |init|.{{VideoFrameInit/flip}}, assign `false` |
| 4081 | + to |frame|'s {{VideoFrame/[[flip]]}}. Otherwise, assign `true` to |
| 4082 | + |frame|'s {{VideoFrame/[[flip]]}}. |
| 4083 | + 7. If {{VideoFrameInit/displayWidth}} and {{VideoFrameInit/displayHeight}} |
4022 | 4084 | [=map/exist=] in |init|, assign them to {{VideoFrame/[[display width]]}}
|
4023 | 4085 | and {{VideoFrame/[[display height]]}} respectively.
|
4024 |
| - 5. Otherwise: |
4025 |
| - 1. Let |widthScale| be the result of dividing |defaultDisplayWidth| by |
4026 |
| - |defaultVisibleRect|.{{DOMRect/width}}. |
4027 |
| - 2. Let |heightScale| be the result of dividing |defaultDisplayHeight| by |
4028 |
| - |defaultVisibleRect|.{{DOMRect/height}}. |
4029 |
| - 3. Multiply |frame|'s {{VideoFrame/[[visible width]]}} by |widthScale| |
4030 |
| - and round the result. Assign the rounded result to |
4031 |
| - {{VideoFrame/[[display width]]}}. |
4032 |
| - 4. Multiply |frame|'s {{VideoFrame/[[visible height]]}} by |
4033 |
| - |heightScale| and round the result. Assign the rounded result to |
4034 |
| - |frame|'s {{VideoFrame/[[display height]]}}. |
| 4086 | + 8. Otherwise: |
| 4087 | + 1. If |baseRotation| is equal to `0` or `180`: |
| 4088 | + 1. Let |widthScale| be the result of dividing |defaultDisplayWidth| |
| 4089 | + by |defaultVisibleRect|.{{DOMRect/width}}. |
| 4090 | + 2. Let |heightScale| be the result of dividing |
| 4091 | + |defaultDisplayHeight| by |
| 4092 | + |defaultVisibleRect|.{{DOMRect/height}}. |
| 4093 | + 2. Otherwise: |
| 4094 | + 1. Let |widthScale| be the result of dividing |defaultDisplayHeight| |
| 4095 | + by |defaultVisibleRect|.{{DOMRect/width}}. |
| 4096 | + 2. Let |heightScale| be the result of dividing |defaultDisplayWidth| |
| 4097 | + by |defaultVisibleRect|.{{DOMRect/height}}. |
| 4098 | + 3. Let |displayWidth| be |
| 4099 | + `|frame|'s {{VideoFrame/[[visible width]]}} * |widthScale|`, rounded |
| 4100 | + to the nearest integer. |
| 4101 | + 4. Let |displayHeight| be |
| 4102 | + `|frame|'s {{VideoFrame/[[visible height]]}} * |heightScale|`, |
| 4103 | + rounded to the nearest integer. |
| 4104 | + 5. If |rotation| is equal to `0` or `180`: |
| 4105 | + 1. Assign |displayWidth| to |frame|'s |
| 4106 | + {{VideoFrame/[[display width]]}}. |
| 4107 | + 2. Assign |displayHeight| to |frame|'s |
| 4108 | + {{VideoFrame/[[display height]]}}. |
| 4109 | + 6. Otherwise: |
| 4110 | + 1. Assign |displayHeight| to |frame|'s |
| 4111 | + {{VideoFrame/[[display width]]}}. |
| 4112 | + 2. Assign |displayWidth| to |frame|'s |
| 4113 | + {{VideoFrame/[[display height]]}}. |
4035 | 4114 |
|
4036 | 4115 | : <dfn export>Clone VideoFrame</dfn> (with |frame|)
|
4037 | 4116 | :: 1. Let |clone| be a new {{VideoFrame}} initialized as follows:
|
|
4052 | 4131 | 4. Assign `0` to |frame|'s {{VideoFrame/[[coded width]]}},
|
4053 | 4132 | {{VideoFrame/[[coded height]]}}, {{VideoFrame/[[visible left]]}},
|
4054 | 4133 | {{VideoFrame/[[visible top]]}}, {{VideoFrame/[[visible width]]}},
|
4055 |
| - {{VideoFrame/[[visible height]]}}, {{VideoFrame/[[display width]]}}, |
4056 |
| - and {{VideoFrame/[[display height]]}}. |
4057 |
| - 5. Assign a new {{VideoFrameMetadata}} to |frame|.{{VideoFrame/[[metadata]]}}. |
| 4134 | + {{VideoFrame/[[visible height]]}}, {{VideoFrame/[[rotation]]}}, |
| 4135 | + {{VideoFrame/[[display width]]}}, and {{VideoFrame/[[display height]]}}. |
| 4136 | + 5. Assign `false` to |frame|'s {{VideoFrame/[[flip]]}}. |
| 4137 | + 6. Assign a new {{VideoFrameMetadata}} to |frame|.{{VideoFrame/[[metadata]]}}. |
| 4138 | + |
| 4139 | +: <dfn for=VideoFrame>Parse Rotation</dfn> (with |rotation|) |
| 4140 | +:: 1. Let |alignedRotation| be the nearest multiple of `90` to |rotation|. |
| 4141 | + 2. Let |fullTurns| be the greatest multiple of `360` less than or equal to |
| 4142 | + |alignedRotation|. |
| 4143 | + 3. Return `|alignedRotation| - |fullTurns|`. |
| 4144 | + |
| 4145 | +: <dfn for=VideoFrame>Add Rotations</dfn> (with |baseRotation|, |baseFlip|, |
| 4146 | + and |rotation|) |
| 4147 | +:: 1. If |baseFlip| is `false`, let |combinedRotation| be |
| 4148 | + `|baseRotation| + |rotation|`. Otherwise, let |combinedRotation| be |
| 4149 | + `|baseRotation| - |rotation|`. |
| 4150 | + 2. Let |fullTurns| be the greatest multiple of `360` less than or equal to |
| 4151 | + |combinedRotation|. |
| 4152 | + 3. Return `|combinedRotation| - |fullTurns|`. |
4058 | 4153 |
|
4059 | 4154 | : <dfn for=VideoFrame>Parse VideoFrameCopyToOptions</dfn> (with |options|)
|
4060 | 4155 | :: 1. Let |defaultRect| be the result of performing the getter steps for
|
|
4232 | 4327 | {{VideoFrame/[[coded height]]}}, {{VideoFrame/[[visible left]]}},
|
4233 | 4328 | {{VideoFrame/[[visible top]]}}, {{VideoFrame/[[visible width]]}},
|
4234 | 4329 | and {{VideoFrame/[[visible height]]}} respectively.
|
4235 |
| - 6. Assign |frame|'s {{VideoFrame/[[duration]]}} and |frame|'s |
| 4330 | + 6. Assign |frame|'s {{VideoFrame/[[duration]]}} and |frame|'s |
4236 | 4331 | {{VideoFrame/[[timestamp]]}} to {{VideoFrame/[[duration]]}} and
|
4237 | 4332 | {{VideoFrame/[[timestamp]]}} respectively.
|
4238 | 4333 | 7. Assign the result of running the <a>Convert
|
|
0 commit comments