Commit 19e2596
committed
fix(engine): use getBoundingClientRect for video frame replacement geometry
Fixes #1009 — portrait (1080×1920) video compositions show a bottom gap
for the first ~37 seconds when rendered with pooled browsers on macOS.
Root cause: injectVideoFramesBatch() positioned the replacement <img>
using video.offsetWidth/offsetHeight/offsetLeft/offsetTop. On macOS
Chrome with pooled browsers (enabled in v0.6.11), these offset*
properties can report stale compositor-dependent values before Chrome's
video decoder fully settles, causing the <img> to be sized smaller than
the CSS box.
Fix: use getBoundingClientRect() which always reflects the CSS layout
dimensions regardless of compositor state. Position is computed relative
to offsetParent's rect for correct absolute positioning.
Also adds portrait-video-fullbleed regression test (1080×1920 video with
position:absolute;inset:0) to catch future bottom-edge coverage issues.1 parent ee4e088 commit 19e2596
6 files changed
Lines changed: 88 additions & 10 deletions
File tree
- packages
- engine/src/services
- producer/tests/portrait-video-fullbleed
- output
- src
- assets/video
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
441 | 444 | | |
442 | 445 | | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
447 | 453 | | |
448 | 454 | | |
449 | | - | |
450 | | - | |
| 455 | + | |
| 456 | + | |
451 | 457 | | |
452 | 458 | | |
453 | | - | |
454 | | - | |
| 459 | + | |
| 460 | + | |
455 | 461 | | |
456 | 462 | | |
457 | 463 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 34 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Binary file not shown.
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments