fix(player): an embed without a height shows its film, and heavy films are measured in Safari (#5932)

* test(player): measure heavy films in real Safari and Chrome on macOS

* test(player): count runtime media seeks and rate writes during the Safari bench

* test(player): compare the Safari bench against native playback of the same media

* test(player): split Safari control playback into per-frame media writes and per-frame transforms

* perf(core): write media volume and mute only when they change

* test(player): presented frame rate and compositor-animation controls in the Safari bench

* perf(core): keep the media volume guard without a new comment line

* test(player): derive presented frames from playback counters and snapshot video state

* test(player): control page plays only listed media, and anchor the Safari process match

* test(player): send the bench as code, and write only validated numbers from the browser

* fix(player): perf host page gives the player a real box, so films are on screen when measured

* fix(player): a player with no height set takes its film's shape instead of collapsing to nothing

The player box had no intrinsic height, so an embed that set only a width (or nothing) was 0 px tall
and showed no picture. An in-flow sizer now carries the composition's aspect ratio; a height the
embed sets still wins, and a height-only embed keeps its full width.

* test(player): label each embed on the player box page
This commit is contained in:
Miguel Ángel
2026-10-20 15:05:46 +00:00
committed by GitHub
parent 6d357ff0d8
commit 46cb5ca446
27 changed files with 1893 additions and 3 deletions
+7
View File
@@ -140,6 +140,13 @@ jobs:
PUPPETEER_EXECUTABLE_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
run: bun run test:browser-raster
- name: Verify the player takes the box its embed asks for (load shard only)
if: matrix.shard == 'load'
working-directory: packages/player
env:
PUPPETEER_EXECUTABLE_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
run: bun run test:browser-box
- name: Run player perf — ${{ matrix.shard }} (measure mode)
working-directory: packages/player
env:
+63
View File
@@ -0,0 +1,63 @@
name: Player Safari perf
permissions:
contents: read
env:
HYPERFRAMES_NO_TELEMETRY: "1"
on:
pull_request:
paths:
- "packages/player/**"
- "packages/core/src/runtime/**"
- ".github/workflows/player-safari.yml"
schedule:
- cron: "23 7 * * *"
workflow_dispatch:
concurrency:
group: player-safari-${{ github.ref }}
cancel-in-progress: true
jobs:
heavy-films:
name: "Heavy films: Safari vs Chrome"
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: bun install --frozen-lockfile
# The bench serves packages/player/dist and packages/core/dist, as the Linux perf shards do.
- run: bun run build
- name: Generate heavy media
run: |
brew install ffmpeg
bash packages/player/tests/perf/browsers/make-media.sh
- name: Enable safaridriver
run: sudo safaridriver --enable
- name: Run heavy films in Safari and Chrome
working-directory: packages/player
run: |
sw_vers
CHROMEDRIVER="$CHROMEWEBDRIVER/chromedriver" bun run tests/perf/browsers/run.ts --browsers safari,chrome --runs 2
- name: Upload results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: player-safari-heavy-films
path: packages/player/tests/perf/results/
if-no-files-found: warn
retention-days: 30