Merge pull request #166 from shumaiOne/test/video-player-playwright-e2e

test(webui): video player e2e framework + Safari playhead fix
This commit is contained in:
Yiling-J
2026-07-03 17:20:51 +08:00
committed by GitHub
19 changed files with 903 additions and 57 deletions
+41
View File
@@ -55,3 +55,44 @@ jobs:
echo "Smoke testing shumai-transcode..."
bun run /tmp/shumai-local-release/node/node_modules/@shumai-one/shumai-transcode/bin/shumai-transcode-app.js --check
e2e_video_player:
name: E2E (${{ matrix.project }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
project: chromium
- os: ubuntu-latest
project: firefox
# WebKit is the Safari engine; run it on a macOS runner to validate
# Safari compatibility.
- os: macos-latest
project: webkit
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Install Playwright browser (${{ matrix.project }})
run: bunx playwright install --with-deps ${{ matrix.project }}
- name: Run video player e2e tests
run: bun run test:e2e --project=${{ matrix.project }}
- name: Upload Playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.project }}
path: playwright-report/
retention-days: 7
+6
View File
@@ -11,3 +11,9 @@ data/
*.db
*.diff
*.orig
# Playwright
/playwright-report/
/test-results/
/blob-report/
/playwright/.cache/
+60 -38
View File
@@ -11,7 +11,10 @@
"devDependencies": {
"@eslint/js": "10.0.1",
"@inlang/paraglide-js": "2.20.0",
"@playwright/test": "1.61.1",
"@testcontainers/postgresql": "12.0.1",
"@testing-library/dom": "10.4.1",
"@testing-library/react": "16.3.2",
"@types/bun": "1.3.14",
"@types/node": "25.9.1",
"bun-plugin-pino": "1.5.0",
@@ -22,6 +25,7 @@
"eslint-plugin-prettier": "5.5.6",
"eslint-plugin-react": "7.37.5",
"globals": "17.6.0",
"happy-dom": "20.10.6",
"pino-pretty": "13.1.3",
"prisma": "7.8.0",
"testcontainers": "12.0.1",
@@ -33,7 +37,7 @@
},
"apps/agent": {
"name": "@shumai/agent-app",
"version": "0.1.2",
"version": "0.1.5",
"bin": {
"shumai-agent": "./src/index.ts",
},
@@ -45,7 +49,7 @@
},
"apps/cli": {
"name": "@shumai/cli",
"version": "0.1.2",
"version": "0.1.5",
"bin": {
"shumai-cli": "./src/index.ts",
},
@@ -60,7 +64,7 @@
},
"apps/transcode": {
"name": "@shumai/transcode-app",
"version": "0.1.2",
"version": "0.1.5",
"bin": {
"shumai-transcode": "./src/index.ts",
},
@@ -72,7 +76,7 @@
},
"apps/web": {
"name": "@shumai/web-app",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@shumai/agent": "workspace:*",
"@shumai/api": "workspace:*",
@@ -87,7 +91,7 @@
},
"packages/agent": {
"name": "@shumai/agent",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@anthropic-ai/sandbox-runtime": "0.0.52",
"@earendil-works/pi-agent-core": "0.78.0",
@@ -111,7 +115,7 @@
},
"packages/api": {
"name": "@shumai/api",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@hono/zod-validator": "0.7.6",
"@shumai/core": "workspace:*",
@@ -125,7 +129,7 @@
},
"packages/core": {
"name": "@shumai/core",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@shumai/db": "workspace:*",
"@shumai/dtos": "workspace:*",
@@ -152,7 +156,7 @@
},
"packages/db": {
"name": "@shumai/db",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@earendil-works/pi-agent-core": "0.78.0",
"@prisma/adapter-pg": "7.8.0",
@@ -168,18 +172,18 @@
},
"packages/dtos": {
"name": "@shumai/dtos",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"zod": "4.4.3",
},
},
"packages/tableprinter": {
"name": "@shumai/tableprinter",
"version": "0.1.2",
"version": "0.1.5",
},
"packages/transcode": {
"name": "@shumai/transcode",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@shumai/core": "workspace:*",
"@shumai/db": "workspace:*",
@@ -193,7 +197,7 @@
},
"packages/webui": {
"name": "@shumai/webui",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@base-ui/react": "1.5.0",
"@dnd-kit/abstract": "0.4.0",
@@ -277,24 +281,20 @@
},
"devDependencies": {
"@tailwindcss/postcss": "4.3.0",
"@tailwindcss/vite": "4.3.0",
"@tanstack/router-cli": "1.167.13",
"@tanstack/router-plugin": "1.168.14",
"@types/react": "19.2.16",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "5.2.0",
"autoprefixer": "10.5.0",
"postcss": "8.5.15",
"tailwindcss": "4.3.0",
"tw-animate-css": "1.3.3",
"typescript": "6.0.3",
"vite": "7.3.5",
"vite-tsconfig-paths": "6.1.1",
},
},
"packages/workflow-core": {
"name": "@shumai/workflow-core",
"version": "0.1.2",
"version": "0.1.5",
"dependencies": {
"@shumai/core": "workspace:*",
"@shumai/db": "workspace:*",
@@ -395,10 +395,6 @@
"@babel/plugin-syntax-typescript": ["@babel/plugin-syntax-typescript@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA=="],
"@babel/plugin-transform-react-jsx-self": ["@babel/plugin-transform-react-jsx-self@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw=="],
"@babel/plugin-transform-react-jsx-source": ["@babel/plugin-transform-react-jsx-source@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q=="],
"@babel/runtime": ["@babel/runtime@7.29.7", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="],
"@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="],
@@ -761,6 +757,8 @@
"@pkgr/core": ["@pkgr/core@0.3.6", "", {}, "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA=="],
"@playwright/test": ["@playwright/test@1.61.1", "", { "dependencies": { "playwright": "1.61.1" }, "bin": { "playwright": "cli.js" } }, "sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig=="],
"@pondwader/socks5-server": ["@pondwader/socks5-server@1.0.10", "", {}, "sha512-bQY06wzzR8D2+vVCUoBsr5QS2U6UgPUQRmErNwtsuI6vLcyRKkafjkr3KxbtGFf9aBBIV2mcvlsKD1UYaIV+sg=="],
"@preact/signals-core": ["@preact/signals-core@1.14.2", "", {}, "sha512-RZHdBj9ZF4n40Rp4jS052EHHjBWf96P9oNdXPfhQTovCuWY9iQn3Gq+gOTJSgBO9A/JBuPfMOWsSX/lIU9Pc/A=="],
@@ -941,8 +939,6 @@
"@reduxjs/toolkit": ["@reduxjs/toolkit@2.12.0", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "@standard-schema/utils": "^0.3.0", "immer": "^11.0.0", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "reselect": "^5.1.0" }, "peerDependencies": { "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" }, "optionalPeers": ["react", "react-redux"] }, "sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw=="],
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.3", "", {}, "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q=="],
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.61.0", "", { "os": "android", "cpu": "arm" }, "sha512-dnxczajOqt0gesZlN5pGQ1s1imQVrsmCw5G2Ci4oM+0WvNz3pyRnlWrT7McoZIb8VlFwCawdmbWRmxRn7HI+VQ=="],
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.61.0", "", { "os": "android", "cpu": "arm64" }, "sha512-Bp3JpGP00Vu3f238ivRrjf7z3xSzVPXqCmaJYA9t2c+c8vKYvOzmXF7LkkeUalTEGd6cZcSWe+PFIP3Vy48fRg=="],
@@ -1105,8 +1101,6 @@
"@tailwindcss/postcss": ["@tailwindcss/postcss@4.3.0", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.3.0", "@tailwindcss/oxide": "4.3.0", "postcss": "^8.5.10", "tailwindcss": "4.3.0" } }, "sha512-Jm05Tjx+9yCLGv5qw1c+84Psds8MnyrEQYCB+FFk2lgGiUjlRqdxke4mVTuYrj2xnVZqKim2Apr5ySuQRYAw/w=="],
"@tailwindcss/vite": ["@tailwindcss/vite@4.3.0", "", { "dependencies": { "@tailwindcss/node": "4.3.0", "@tailwindcss/oxide": "4.3.0", "tailwindcss": "4.3.0" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw=="],
"@tanstack/devtools-event-client": ["@tanstack/devtools-event-client@0.4.3", "", { "bin": { "intent": "bin/intent.js" } }, "sha512-OZI6QyULw0FI0wjgmeYzCIfbgPsOEzwJtCpa69XrfLMtNXLGnz3d/dIabk7frg0TmHo+Ah49w5I4KC7Tufwsvw=="],
"@tanstack/form-core": ["@tanstack/form-core@1.33.0", "", { "dependencies": { "@tanstack/devtools-event-client": "^0.4.1", "@tanstack/pacer-lite": "^0.1.1", "@tanstack/store": "^0.11.0" } }, "sha512-AV4Pw9Dk4orFsuPBcDssfWMJFs+yMYBae7zZ4oTqrCf4ftNGQKxvrQRZeqKHG6A4TkiLeSvf2kzIjcVkrW7E6w=="],
@@ -1165,15 +1159,13 @@
"@testcontainers/postgresql": ["@testcontainers/postgresql@12.0.1", "", { "dependencies": { "testcontainers": "^12.0.1" } }, "sha512-6SyyduUM6lTAo4UwKG1aCochP6wTe0k7/W/m5uODZQMUrV3STk6/28Km3474JLGZdw/P793BUEF2IeU7rDyoEg=="],
"@testing-library/dom": ["@testing-library/dom@10.4.1", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.3.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "picocolors": "1.1.1", "pretty-format": "^27.0.2" } }, "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg=="],
"@testing-library/react": ["@testing-library/react@16.3.2", "", { "dependencies": { "@babel/runtime": "^7.12.5" }, "peerDependencies": { "@testing-library/dom": "^10.0.0", "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g=="],
"@types/adm-zip": ["@types/adm-zip@0.5.8", "", { "dependencies": { "@types/node": "*" } }, "sha512-RVVH7QvZYbN+ihqZ4kX/dMiowf6o+Jk1fNwiSdx0NahBJLU787zkULhGhJM8mf/obmLGmgdMM0bXsQTmyfbR7Q=="],
"@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="],
"@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="],
"@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="],
"@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="],
"@types/aria-query": ["@types/aria-query@5.0.4", "", {}, "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="],
"@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
@@ -1241,6 +1233,10 @@
"@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],
"@types/whatwg-mimetype": ["@types/whatwg-mimetype@3.0.2", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
"@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.60.1", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.60.1", "@typescript-eslint/type-utils": "8.60.1", "@typescript-eslint/utils": "8.60.1", "@typescript-eslint/visitor-keys": "8.60.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.60.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-JQ4S5GB0tfjO8BuJ4fcX+HodkzJjYBV+7OJ+wLygaX7OGQ7FudyHL4NSCA6ob+w3Yn+5MkKIozOwQhXeM7opVg=="],
@@ -1271,8 +1267,6 @@
"@videojs/xhr": ["@videojs/xhr@2.7.0", "", { "dependencies": { "@babel/runtime": "^7.5.5", "global": "~4.4.0", "is-function": "^1.0.1" } }, "sha512-giab+EVRanChIupZK7gXjHy90y3nncA2phIOyG3Ne5fvpiMJzvqYwiTOnEVW2S4CoYcuKJkomat7bMXA/UoUZQ=="],
"@vitejs/plugin-react": ["@vitejs/plugin-react@5.2.0", "", { "dependencies": { "@babel/core": "^7.29.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-rc.3", "@types/babel__core": "^7.20.5", "react-refresh": "^0.18.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw=="],
"@vitest/expect": ["@vitest/expect@4.1.8", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.1.8", "@vitest/utils": "4.1.8", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" } }, "sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ=="],
"@vitest/mocker": ["@vitest/mocker@4.1.8", "", { "dependencies": { "@vitest/spy": "4.1.8", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw=="],
@@ -1345,7 +1339,7 @@
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],
"ansis": ["ansis@4.3.1", "", {}, "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA=="],
@@ -1355,6 +1349,8 @@
"aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="],
"aria-query": ["aria-query@5.3.0", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="],
"array-buffer-byte-length": ["array-buffer-byte-length@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "is-array-buffer": "^3.0.5" } }, "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw=="],
"array-includes": ["array-includes@3.1.9", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.4", "define-properties": "^1.2.1", "es-abstract": "^1.24.0", "es-object-atoms": "^1.1.1", "get-intrinsic": "^1.3.0", "is-string": "^1.1.1", "math-intrinsics": "^1.1.0" } }, "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ=="],
@@ -1439,6 +1435,8 @@
"buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
"buffer-image-size": ["buffer-image-size@0.6.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="],
"buildcheck": ["buildcheck@0.0.7", "", {}, "sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA=="],
"bun": ["bun@1.3.14", "", { "optionalDependencies": { "@oven/bun-darwin-aarch64": "1.3.14", "@oven/bun-darwin-x64": "1.3.14", "@oven/bun-darwin-x64-baseline": "1.3.14", "@oven/bun-freebsd-aarch64": "1.3.14", "@oven/bun-freebsd-x64": "1.3.14", "@oven/bun-linux-aarch64": "1.3.14", "@oven/bun-linux-aarch64-android": "1.3.14", "@oven/bun-linux-aarch64-musl": "1.3.14", "@oven/bun-linux-x64": "1.3.14", "@oven/bun-linux-x64-android": "1.3.14", "@oven/bun-linux-x64-baseline": "1.3.14", "@oven/bun-linux-x64-musl": "1.3.14", "@oven/bun-linux-x64-musl-baseline": "1.3.14", "@oven/bun-windows-aarch64": "1.3.14", "@oven/bun-windows-x64": "1.3.14", "@oven/bun-windows-x64-baseline": "1.3.14" }, "os": [ "!aix", "!sunos", "!openbsd", ], "cpu": [ "x64", "arm64", ], "bin": { "bun": "bin/bun.exe", "bunx": "bin/bunx.exe" } }, "sha512-aB6GVd42x1Y5ie1K16SF+oLGtgSkwX9hgoDdIW88pjvfTccU8F1vfpoOt34QLv0dZ1v3XimtaxPlZUG81Gx9Zg=="],
@@ -1599,6 +1597,8 @@
"doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="],
"dom-accessibility-api": ["dom-accessibility-api@0.5.16", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="],
"dom-walk": ["dom-walk@0.1.2", "", {}, "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="],
"dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="],
@@ -1629,6 +1629,8 @@
"enhanced-resolve": ["enhanced-resolve@5.22.1", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-6QEuw3zoX1SJQc7b87aBXke/no+mG2bTBgw29gWMQonLmpEkWoCAVkl+M49e48AZlWzxiDzDZzYdp6kobcyLww=="],
"entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
"env-paths": ["env-paths@3.0.0", "", {}, "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A=="],
"es-abstract": ["es-abstract@1.24.2", "", { "dependencies": { "array-buffer-byte-length": "^1.0.2", "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.4", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", "get-intrinsic": "^1.3.0", "get-proto": "^1.0.1", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", "has-proto": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "internal-slot": "^1.1.0", "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", "is-negative-zero": "^2.0.3", "is-regex": "^1.2.1", "is-set": "^2.0.3", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", "is-weakref": "^1.1.1", "math-intrinsics": "^1.1.0", "object-inspect": "^1.13.4", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", "regexp.prototype.flags": "^1.5.4", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", "stop-iteration-iterator": "^1.1.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.3", "typed-array-byte-length": "^1.0.3", "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", "which-typed-array": "^1.1.19" } }, "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg=="],
@@ -1751,7 +1753,7 @@
"fs-monkey": ["fs-monkey@1.1.0", "", {}, "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw=="],
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="],
"function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
@@ -1815,6 +1817,8 @@
"graphmatch": ["graphmatch@1.1.1", "", {}, "sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg=="],
"happy-dom": ["happy-dom@20.10.6", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-6QD0ilzDDt93tX44y8tbmZdAcdTRYDhUP+Asgi6pC8Pp5IA3cvaZGyoVN/EGtlq9ziT65iPuBBn3ASLr6hCgVw=="],
"has-bigints": ["has-bigints@1.1.0", "", {}, "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg=="],
"has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
@@ -2043,6 +2047,8 @@
"lucide-react": ["lucide-react@1.17.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9FA9evdox/JQL5PT57fdA1x/yg8T7knJ98+zjTL3UfKza6pflQUUh3XtaQIHKvnsJw1lmsEyHVlt5jchYxOQ5w=="],
"lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="],
"m3u8-parser": ["m3u8-parser@7.2.0", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^4.1.1", "global": "^4.4.0" } }, "sha512-CRatFqpjVtMiMaKXxNvuI3I++vUumIXVVT/JpCpdU/FynV/ceVw1qpPyyBNindL+JlPMSesx+WX1QJaZEJSaMQ=="],
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
@@ -2249,6 +2255,10 @@
"pkg-types": ["pkg-types@2.3.1", "", { "dependencies": { "confbox": "^0.2.4", "exsolve": "^1.0.8", "pathe": "^2.0.3" } }, "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg=="],
"playwright": ["playwright@1.61.1", "", { "dependencies": { "playwright-core": "1.61.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ=="],
"playwright-core": ["playwright-core@1.61.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg=="],
"possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],
"postcss": ["postcss@8.5.15", "", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A=="],
@@ -2271,6 +2281,8 @@
"prettier-linter-helpers": ["prettier-linter-helpers@1.0.1", "", { "dependencies": { "fast-diff": "^1.1.2" } }, "sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg=="],
"pretty-format": ["pretty-format@27.5.1", "", { "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" } }, "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ=="],
"prisma": ["prisma@7.8.0", "", { "dependencies": { "@prisma/config": "7.8.0", "@prisma/dev": "0.24.3", "@prisma/engines": "7.8.0", "@prisma/studio-core": "0.27.3", "mysql2": "3.15.3", "postgres": "3.4.7" }, "peerDependencies": { "better-sqlite3": ">=9.0.0", "typescript": ">=5.4.0" }, "optionalPeers": ["better-sqlite3", "typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-yfN4yrw7HV9kEJhoy1+jgah0jafEIQsf7uWouSsM8MvJtlubsk+kM7AIBWZ8+GJl74Yj3c+nbYqBkMOxtsZ3Lw=="],
"prisma-json-types-generator": ["prisma-json-types-generator@4.1.1", "", { "dependencies": { "@prisma/generator-helper": "^7.2.0", "semver": "^7.7.3", "try": "^1.0.3", "tslib": "^2.8.1" }, "peerDependencies": { "@prisma/client": "^7.2.0", "prisma": "^7.2.0", "typescript": "^5.9.3" }, "bin": { "prisma-json-types-generator": "index.js" } }, "sha512-oz0MYu1r2Jqu3qOGCEGulz6RjPsECVjyS3ZAz3HEmz0jkKbVkZEwQyksNJm0X5utV1TZCmaG/98EPExN7S22xw=="],
@@ -2329,8 +2341,6 @@
"react-redux": ["react-redux@9.3.0", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g=="],
"react-refresh": ["react-refresh@0.18.0", "", {}, "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw=="],
"react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="],
"react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="],
@@ -2657,6 +2667,8 @@
"webpack-virtual-modules": ["webpack-virtual-modules@0.6.2", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="],
"whatwg-mimetype": ["whatwg-mimetype@3.0.0", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="],
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
"which-boxed-primitive": ["which-boxed-primitive@1.1.1", "", { "dependencies": { "is-bigint": "^1.1.0", "is-boolean-object": "^1.2.1", "is-number-object": "^1.1.1", "is-string": "^1.1.1", "is-symbol": "^1.1.1" } }, "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA=="],
@@ -3027,6 +3039,8 @@
"pg-types/postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="],
"pretty-format/react-is": ["react-is@17.0.2", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="],
"prisma-json-types-generator/semver": ["semver@7.8.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg=="],
"protobufjs/@types/node": ["@types/node@22.19.19", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew=="],
@@ -3113,6 +3127,8 @@
"readdir-glob/minimatch": ["minimatch@5.1.9", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="],
"rollup/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"schema-utils/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="],
"sharp/semver": ["semver@7.8.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg=="],
@@ -3127,8 +3143,14 @@
"thread-stream/real-require": ["real-require@1.0.0", "", {}, "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g=="],
"vite/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"webpack/eslint-scope": ["eslint-scope@5.1.1", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw=="],
"wrap-ansi/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"yauzl/buffer-crc32": ["buffer-crc32@0.2.13", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
+9
View File
@@ -18,6 +18,11 @@
"typecheck": "tsc --noEmit",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"test": "bun --bun vitest run",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:report": "playwright show-report",
"test:e2e:install": "playwright install --with-deps",
"harness:dev": "bun run packages/webui/e2e/harness/serve.ts",
"format": "prettier --write .",
"db:migrate": "bun run prisma migrate dev",
"db:deploy": "bun run prisma migrate deploy",
@@ -38,7 +43,10 @@
"devDependencies": {
"@eslint/js": "10.0.1",
"@inlang/paraglide-js": "2.20.0",
"@playwright/test": "1.61.1",
"@testcontainers/postgresql": "12.0.1",
"@testing-library/dom": "10.4.1",
"@testing-library/react": "16.3.2",
"@types/bun": "1.3.14",
"@types/node": "25.9.1",
"bun-plugin-pino": "1.5.0",
@@ -49,6 +57,7 @@
"eslint-plugin-prettier": "5.5.6",
"eslint-plugin-react": "7.37.5",
"globals": "17.6.0",
"happy-dom": "20.10.6",
"pino-pretty": "13.1.3",
"prisma": "7.8.0",
"testcontainers": "12.0.1",
@@ -262,6 +262,7 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
onMouseLeave={handleMouseLeave}
onMouseDown={handleMouseDown}
onTouchStart={handleTouchStart}
data-testid="seekbar"
>
{/* Hidden Preview Video Element */}
<video
@@ -316,6 +317,7 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
<div
className="relative absolute top-0 left-0 h-full rounded-full bg-primary"
style={{ width: `${progressPercent}%` }}
data-testid="seekbar-fill"
>
{/* Thumb (Playhead) - visible on group hover or active */}
<div
@@ -0,0 +1,229 @@
// @vitest-environment happy-dom
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { act, cleanup, renderHook } from '@testing-library/react'
import { useFramePlayer } from './use-frame-player'
/**
* Deterministic reproduction of the Safari playhead-rewind bug.
*
* On Safari/WebKit, `video.currentTime` (the playback/audio clock) runs AHEAD of
* the frame actually presented on screen right after playback starts, and the
* first `requestVideoFrameCallback` (mediaTime) arrives only after a delay. The
* old logic drove the playhead from `currentTime` immediately on play, racing it
* forward, then snapped it backward when the first rVFC reported the true (lower)
* presented frame.
*
* The headless WebKit engine does not exhibit that clock skew, so this can only
* be reproduced deterministically at the logic layer: we mock a video element
* whose `currentTime` leads while a fake `requestVideoFrameCallback` delivers a
* lagging `mediaTime`, drive RAF/clock manually, and assert the playhead never
* moves backward.
*/
const FPS = 30
const TOTAL = 150
// --- Controllable environment -------------------------------------------------
interface RafEntry {
id: number
cb: FrameRequestCallback
}
let clock = 0
let rafQueue: RafEntry[] = []
let rafSeq = 0
/** Run exactly the RAF callbacks queued at flush time (one simulated frame). */
const flushRaf = () => {
const queued = rafQueue
rafQueue = []
for (const { cb } of queued) cb(clock)
}
/** Minimal HTMLVideoElement stand-in with a manually-fired rVFC. */
class FakeVideo extends EventTarget {
currentTime = 0
paused = true
ended = false
private vfcCallbacks: Array<(now: number, meta: { mediaTime: number }) => void> = []
requestVideoFrameCallback(cb: (now: number, meta: { mediaTime: number }) => void): number {
this.vfcCallbacks.push(cb)
return this.vfcCallbacks.length
}
cancelVideoFrameCallback(): void {
this.vfcCallbacks = []
}
pause(): void {
this.paused = true
this.dispatchEvent(new Event('pause'))
}
play(): void {
this.paused = false
this.dispatchEvent(new Event('play'))
}
/** Simulate the compositor presenting a frame at the given mediaTime. */
fireVfc(mediaTime: number): void {
const callbacks = this.vfcCallbacks
this.vfcCallbacks = []
for (const cb of callbacks) cb(0, { mediaTime })
}
}
function makeRef(video: FakeVideo): { current: HTMLVideoElement | null } {
return { current: video as unknown as HTMLVideoElement }
}
let originalRaf: typeof globalThis.requestAnimationFrame
let originalCaf: typeof globalThis.cancelAnimationFrame
beforeEach(() => {
clock = 0
rafQueue = []
rafSeq = 0
vi.spyOn(Date, 'now').mockImplementation(() => clock)
originalRaf = globalThis.requestAnimationFrame
originalCaf = globalThis.cancelAnimationFrame
globalThis.requestAnimationFrame = ((cb: FrameRequestCallback): number => {
rafSeq += 1
rafQueue.push({ id: rafSeq, cb })
return rafSeq
}) as typeof globalThis.requestAnimationFrame
globalThis.cancelAnimationFrame = ((id: number): void => {
rafQueue = rafQueue.filter((entry) => entry.id !== id)
}) as typeof globalThis.cancelAnimationFrame
})
afterEach(() => {
cleanup()
vi.restoreAllMocks()
globalThis.requestAnimationFrame = originalRaf
globalThis.cancelAnimationFrame = originalCaf
})
// --- Tests --------------------------------------------------------------------
describe('useFramePlayer Safari playhead synchronization', () => {
it('does not rewind the playhead on play when currentTime leads the presented frame', () => {
const video = new FakeVideo()
const { result } = renderHook(() => useFramePlayer(makeRef(video), FPS, TOTAL))
const frames: number[] = []
const record = () => frames.push(result.current.currentFrame)
// Start playback via the play event (as a real click would).
act(() => {
video.paused = false
video.dispatchEvent(new Event('play'))
})
record()
// Safari: the playback clock races ahead (~frame 10) while NO rVFC frame has
// been presented yet. The playhead must NOT follow currentTime here.
const leadingCurrentTimes = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35]
for (const ct of leadingCurrentTimes) {
clock += 50
video.currentTime = ct
act(() => {
flushRaf()
})
record()
}
expect(Math.max(...frames)).toBe(0) // Fix 1: no forward race from currentTime
// First presented frame arrives, lagging currentTime (frame 1).
act(() => {
video.fireVfc(1 / FPS)
})
record()
// Subsequent presented frames advance normally.
for (let f = 2; f <= 8; f++) {
clock += 33
act(() => {
flushRaf()
})
act(() => {
video.fireVfc(f / FPS)
})
record()
}
// The playhead must be monotonic non-decreasing throughout (never rewinds).
for (let i = 1; i < frames.length; i++) {
expect(frames[i]).toBeGreaterThanOrEqual(frames[i - 1])
}
expect(result.current.currentFrame).toBe(8)
})
it('still falls back to currentTime once rVFC has delivered and then stalls', () => {
const video = new FakeVideo()
const { result } = renderHook(() => useFramePlayer(makeRef(video), FPS, TOTAL))
act(() => {
video.paused = false
video.dispatchEvent(new Event('play'))
})
// rVFC delivers a few frames -> the session has "seen" the compositor.
for (let f = 1; f <= 3; f++) {
clock += 33
video.currentTime = f / FPS
act(() => {
flushRaf()
})
act(() => {
video.fireVfc(f / FPS)
})
}
expect(result.current.currentFrame).toBe(3)
// Video track ends: rVFC stops, but audio (currentTime) keeps advancing past
// the stall threshold. The RAF fallback should take over from currentTime.
clock += 200
video.currentTime = 10 / FPS
act(() => {
flushRaf()
})
expect(result.current.currentFrame).toBe(10)
})
it('locks the paused frame to the presented mediaTime, not the leading currentTime', () => {
const video = new FakeVideo()
const { result } = renderHook(() => useFramePlayer(makeRef(video), FPS, TOTAL))
act(() => {
video.paused = false
video.dispatchEvent(new Event('play'))
})
// Presented up to frame 16 via rVFC.
for (let f = 1; f <= 16; f++) {
clock += 33
act(() => {
flushRaf()
})
act(() => {
video.fireVfc(f / FPS)
})
}
expect(result.current.currentFrame).toBe(16)
// Safari's currentTime has raced ahead to frame 20's center.
video.currentTime = 20 / FPS + 1 / (2 * FPS)
// Pause while rVFC is still fresh.
act(() => {
video.pause()
})
// Fix 2: the paused frame follows the presented frame (16), not currentTime (20).
expect(result.current.currentFrame).toBe(16)
})
})
@@ -15,6 +15,11 @@ interface HtmlVideoElementWithCallback {
cancelVideoFrameCallback?: (id: number) => void
}
// If requestVideoFrameCallback is supported but has not delivered a frame within
// this window after playback starts, fall back to the currentTime/RAF driver so
// the playhead can never freeze permanently on an engine that stops emitting rVFC.
const INITIAL_VFC_GRACE_MS = 1000
export function useFramePlayer(
videoRef: React.RefObject<HTMLVideoElement | null>,
frameRate: number,
@@ -59,7 +64,23 @@ export function useFramePlayer(
let rVfcId: number | null = null
let rafId: number | null = null
let active = true
// Per-playback-session synchronization state.
// `lastVfcTime` / `hasDeliveredVfc` gate when it is safe to trust
// `video.currentTime` (see the fallback condition below). `lastMediaTime` is
// the most recent compositor-presented time, used to lock the playhead on
// pause to the frame the user is actually looking at.
let lastVfcTime = Date.now()
let hasDeliveredVfc = false
let lastMediaTime = -1
// Reset session state whenever playback (re)starts, so each play waits for a
// fresh compositor frame before trusting the playback clock.
const beginSession = () => {
lastVfcTime = Date.now()
hasDeliveredVfc = false
lastMediaTime = -1
}
const updateFrameLoop = () => {
if (!active) return
@@ -69,13 +90,32 @@ export function useFramePlayer(
}
const videoWithCallback = video as unknown as HtmlVideoElementWithCallback
const rVfcSupported = !!videoWithCallback.requestVideoFrameCallback
// Calculate dynamic stall threshold (minimum 100ms, or 3 frames of duration)
const stallThreshold = Math.max(100, 3000 / frameRate)
const isVfcStalled = Date.now() - lastVfcTime > stallThreshold
const sinceLastVfc = Date.now() - lastVfcTime
// Only update playhead via currentTime (RAF) if rVFC has stalled or isn't supported
if (!videoWithCallback.requestVideoFrameCallback || isVfcStalled) {
// Decide whether the RAF path may drive the playhead from `video.currentTime`.
//
// `video.currentTime` is the playback (audio) clock. On some engines
// (notably Safari/WebKit) it runs AHEAD of the frame actually presented on
// screen right after playback starts, so trusting it before the compositor
// catches up makes the playhead race forward and then snap backward when the
// first requestVideoFrameCallback (mediaTime) arrives.
//
// We therefore only use the currentTime fallback when:
// - rVFC is unsupported (it is the only driver available), or
// - rVFC has delivered at least one frame this session AND has since
// stalled (e.g. the video track ended while audio keeps playing), or
// - rVFC never delivered within the initial grace window (safety net so
// the playhead cannot freeze forever).
const rVfcStalledAfterDelivery = hasDeliveredVfc && sinceLastVfc > stallThreshold
const rVfcNeverDelivered = !hasDeliveredVfc && sinceLastVfc > INITIAL_VFC_GRACE_MS
const useCurrentTimeFallback =
!rVfcSupported || rVfcStalledAfterDelivery || rVfcNeverDelivered
if (useCurrentTimeFallback) {
const frame = Math.floor(video.currentTime * frameRate + 0.45)
const clamped = Math.max(0, Math.min(frame, totalFrames - 1))
setCurrentFrame(clamped)
@@ -90,6 +130,8 @@ export function useFramePlayer(
(_now: DOMHighResTimeStamp, metadata: { mediaTime: number }) => {
rVfcId = null
lastVfcTime = Date.now() // Reset stall timer
hasDeliveredVfc = true
lastMediaTime = metadata.mediaTime
const compositorFrame = Math.floor(metadata.mediaTime * frameRate + 0.45)
const compositorClamped = Math.max(0, Math.min(compositorFrame, totalFrames - 1))
@@ -100,6 +142,7 @@ export function useFramePlayer(
}
const handlePlay = () => {
beginSession()
updateFrameLoop()
}
@@ -120,8 +163,17 @@ export function useFramePlayer(
rafId = null
}
// Synchronize frame on pause
const frame = Math.floor(video.currentTime * frameRate + 0.45)
// Synchronize the frame on pause. Prefer the last compositor-presented time
// (mediaTime) when it is still fresh, because on Safari `video.currentTime`
// can lead the on-screen frame — using it would snap the playhead forward
// past the frame the user actually paused on. Fall back to currentTime when
// rVFC is stale/unsupported (e.g. the video track ended while audio plays).
const stallThreshold = Math.max(100, 3000 / frameRate)
const vfcFresh =
hasDeliveredVfc && lastMediaTime >= 0 && Date.now() - lastVfcTime <= stallThreshold
const syncTime = vfcFresh ? lastMediaTime : video.currentTime
const frame = Math.floor(syncTime * frameRate + 0.45)
const clamped = Math.max(0, Math.min(frame, totalFrames - 1))
setCurrentFrame(clamped)
@@ -138,6 +190,7 @@ export function useFramePlayer(
// If it's already playing when this effect runs
if (!video.paused) {
beginSession()
updateFrameLoop()
}
@@ -165,7 +165,13 @@ const ControlBar: React.FC<ControlBarProps> = ({
>
{/* Left Side: Play, Vol, Time */}
<div className="flex items-center gap-4">
<button onClick={togglePlay} className="hover:text-primary transition-colors">
<button
onClick={togglePlay}
className="hover:text-primary transition-colors"
data-testid="play-toggle"
data-playing={state.isPlaying}
aria-label={state.isPlaying ? 'Pause' : 'Play'}
>
{state.isPlaying ? (
<Pause className="w-6 h-6 fill-current" />
) : (
@@ -206,7 +212,9 @@ const ControlBar: React.FC<ControlBarProps> = ({
</div>
<div className="flex items-center gap-1 text-sm font-medium tabular-nums select-none min-w-[100px]">
<span className="text-muted-foreground font-mono">{displayString}</span>
<span className="text-muted-foreground font-mono" data-testid="time-readout">
{displayString}
</span>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<button className="h-6 w-6 inline-flex items-center justify-center rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer focus:outline-none">
@@ -911,6 +919,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
)}
onClick={togglePlay}
data-vjs-player
data-testid="video-area"
>
{/* Hidden VideoJS container */}
<div ref={videoContainerRef} className="absolute inset-0 z-[-1]" />
+11 -6
View File
@@ -97,9 +97,9 @@ When playing, the playhead loop coordinates two mechanisms in parallel to preven
1. **`requestVideoFrameCallback` (rVFC):** The primary driver when the video is actively decoding. It fires only when a new video frame is sent to the compositor, updating the UI frame-accurately based on `metadata.mediaTime`.
2. **`requestAnimationFrame` (RAF):** Runs continuously at 60Hz. It acts as the fallback driver.
3. **Stall Detection:** The playhead tracks when the last rVFC callback was fired. If it has been stalled for longer than the **dynamic stall threshold**:
3. **Compositor-First Gating & Stall Detection:** `video.currentTime` is the playback (audio) clock, and on some engines (notably Safari/WebKit) it runs *ahead* of the frame actually presented on screen right after playback starts. Trusting it before the compositor catches up would race the playhead forward and then snap it backward when the first rVFC (`mediaTime`) arrives. To prevent this, each `play` resets the per-session sync state, and the playhead is driven from `video.currentTime` **only** when `requestVideoFrameCallback` is unsupported, **or** rVFC has delivered a frame this session and has since stalled beyond the **dynamic stall threshold**:
$$\text{Threshold} = \max\left(100, \frac{3000}{\text{frameRate}}\right)\text{ ms}$$
the RAF loop takes over playhead updates using `video.currentTime`.
the `requestAnimationFrame` loop may drive playhead updates from `video.currentTime`. As a safety net, this fallback also engages if rVFC never fires within an initial grace window (~1000&nbsp;ms) after play, so the playhead can never freeze permanently. Until the first compositor frame is presented, the playhead follows `mediaTime` (rVFC) exclusively, so it never leads the on-screen image.
This prevents the timeline from freezing when the video track ends but audio keeps playing (e.g. video track ends at 10s, audio at 15.4s).
@@ -109,9 +109,10 @@ When playing, the playhead loop coordinates two mechanisms in parallel to preven
### A. Play Video
1. User clicks Play.
2. The `play` event listener triggers `updateFrameLoop()`.
2. The `play` event listener resets the per-session sync state and triggers `updateFrameLoop()`.
3. If supported, `requestVideoFrameCallback` is registered. In parallel, `requestAnimationFrame` is scheduled recursively.
4. UI displays continuous updates aligned with compositor frames.
4. Until the first rVFC frame is presented, the playhead is driven **only** by `mediaTime`; the `requestAnimationFrame` path does not advance it from `video.currentTime` (see §3), avoiding a forward race on engines whose playback clock leads presentation at startup.
5. Thereafter the UI displays continuous updates aligned with compositor frames.
---
@@ -119,12 +120,16 @@ When playing, the playhead loop coordinates two mechanisms in parallel to preven
1. User clicks Pause.
2. The `pause` event listener triggers `handlePause()`:
* Cancels active VFC (`cancelVideoFrameCallback`) and RAF (`cancelAnimationFrame`) loops.
* Chooses the synchronization time. When rVFC is **fresh** (it delivered a frame within the stall threshold), the last presented compositor time `lastMediaTime` is used — this is the frame actually on screen. Otherwise (rVFC stale or unsupported, e.g. an audio-only tail after the video track ends) it falls back to `video.currentTime`:
$$\text{syncTime} = \begin{cases} \text{lastMediaTime} & \text{if rVFC is fresh} \\ video.currentTime & \text{otherwise} \end{cases}$$
* Performs a final playhead synchronization:
$$\text{clampedFrame} = \max\left(0, \min\left(\lfloor(video.currentTime \cdot frameRate) + 0.45\rfloor, \text{totalFrames} - 1\right)\right)$$
* Calls `setCurrentFrame(clampedFrame)` to lock the UI to the correct frame.
$$\text{clampedFrame} = \max\left(0, \min\left(\lfloor(\text{syncTime} \cdot frameRate) + 0.45\rfloor, \text{totalFrames} - 1\right)\right)$$
* Calls `setCurrentFrame(clampedFrame)` to lock the UI to the frame the user is actually looking at.
* **Snaps the browser playhead** to the calculated frame's center time to force the browser compositor to align:
$$\text{currentTime} = \text{calculateFrameCenterTime}(\text{clampedFrame}, \text{frameRate})$$
> **Frame-accurate tradeoff:** because pause locks to the *presented* frame (which on Safari lags the audio clock), snapping `currentTime` back to that frame's center means the small audio segment between the presented frame and the audio position is replayed on resume. This is intentional and matches other frame-accurate tools (e.g. frame.io): landing on the exact displayed frame takes priority over seamless audio. The effect is proportional to the engine's audio/video presentation offset — negligible on Chrome, ~100–300 ms on Safari.
---
### C. Drag Seekbar Head to a Timestamp
Binary file not shown.
+50
View File
@@ -0,0 +1,50 @@
import type { AssetInfo } from '@shumai/dtos'
/**
* Deterministic metadata for the committed fixture video
* (packages/webui/e2e/fixtures/sample.mp4).
*
* Generated with:
* ffmpeg -f lavfi -i testsrc=size=16x16:rate=30 -t 5 -pix_fmt yuv420p sample.mp4
*
* Verified via ffprobe: 16x16, 30/1 fps, duration 5.0s, 150 frames.
* These constants are shared by the harness and the Playwright specs so the
* frame-accurate assertions have known-good expected values.
*/
export const SAMPLE_FRAME_RATE = 30
export const SAMPLE_TOTAL_FRAMES = 150
export const SAMPLE_DURATION = 5
export const SAMPLE_WIDTH = 16
export const SAMPLE_HEIGHT = 16
/**
* The fixture video is served statically by the harness Vite server
* (publicDir points at packages/webui/e2e/fixtures), so it is reachable at
* the site root. No backend is involved.
*/
export const SAMPLE_VIDEO_URL = '/sample.mp4'
export const sampleVideoAsset: AssetInfo = {
id: 'e2e-sample-asset',
name: 'sample.mp4',
sizeByte: 6170,
fileCount: 1,
type: 'file',
status: 'ready',
mediaType: 'video',
createdAt: '2024-01-01T00:00:00.000Z',
updatedAt: '2024-01-01T00:00:00.000Z',
media: {
original: {
downloadUrl: SAMPLE_VIDEO_URL,
key: 'sample.mp4',
},
metadata: {
duration: SAMPLE_DURATION,
originalWidth: SAMPLE_WIDTH,
originalHeight: SAMPLE_HEIGHT,
frameRate: SAMPLE_FRAME_RATE,
totalFrames: SAMPLE_TOTAL_FRAMES,
},
},
}
+13
View File
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../../globals.css" />
<title>Video Player E2E Harness</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>
+37
View File
@@ -0,0 +1,37 @@
import ReactDOM from 'react-dom/client'
import VideoPlayer from '@/ui/components/viewers/video-player'
import { useUiStore } from '@/ui/stores/ui'
import { sampleVideoAsset } from './fixture'
/**
* Backend-free harness page that mounts the *real* VideoPlayer component with a
* fixture AssetInfo pointing at a locally served sample video. No API/router/
* query providers are required for playback, so this isolates the frame-accurate
* player logic (useFramePlayer + ProgressBar + video.js) for UI integration tests.
*
* We force the time readout into "frames" mode so specs can parse the exact
* integer frame index the UI is displaying and assert it against the native
* <video> clock and the seekbar fill.
*/
useUiStore.setState({ videoTimeDisplayMode: 'frames' })
const rootElement = document.getElementById('root')
if (!rootElement) {
throw new Error('Harness root element not found')
}
// Replicate the exact constrained container the real app (file-viewer) mounts
// the player inside: a `flex flex-col flex-1 h-full overflow-hidden` wrapper that
// itself sits in a bounded flex parent. This gives the player root a definite
// 800x600 box and prevents the video area's canvas from feeding its width back
// through the ResizeObserver (which otherwise grows unbounded in a bare stage).
ReactDOM.createRoot(rootElement).render(
<div
data-testid="harness-stage"
style={{ width: '800px', height: '600px', display: 'flex', overflow: 'hidden' }}
>
<div className="flex flex-col flex-1 h-full overflow-hidden relative">
<VideoPlayer data={sampleVideoAsset} />
</div>
</div>,
)
+34
View File
@@ -0,0 +1,34 @@
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import index from './index.html'
/**
* Backend-free harness server for the Playwright e2e suite.
*
* Uses Bun's native HTML bundler (the same path the real app uses via
* `Bun.serve({ routes })` in apps/web) so the test toolchain matches the
* project's Bun-based dev/prod serving. Tailwind is applied through the
* `bun-plugin-tailwind` entry configured in the repo's bunfig.toml
* ([serve.static]). It serves:
* - the harness page (index.html -> main.tsx, bundled on the fly), and
* - the committed fixture video from ../fixtures at the site root.
*/
const here = dirname(fileURLToPath(import.meta.url))
const fixturesDir = join(here, '..', 'fixtures')
const port = process.env.HARNESS_PORT ? Number(process.env.HARNESS_PORT) : 5199
const server = Bun.serve({
port,
development: true,
routes: {
'/sample.mp4': () =>
new Response(Bun.file(join(fixturesDir, 'sample.mp4')), {
headers: { 'Content-Type': 'video/mp4' },
}),
'/': index,
'/*': index,
},
})
console.log(`🎬 Video player harness running at ${server.url}`)
@@ -0,0 +1,139 @@
import type { Locator, Page } from '@playwright/test'
import { SAMPLE_FRAME_RATE, SAMPLE_TOTAL_FRAMES } from '../harness/fixture'
const VIDEO_SELECTOR = '[data-testid="video-area"] video'
/**
* Snapshot of the player's synchronized state, read from the three independent
* surfaces that must stay frame-locked:
* - the native <video> element (video.js engine / media clock),
* - the seekbar fill (derived from useFramePlayer's currentFrame),
* - the numeric frame readout (also derived from currentFrame).
*/
export interface PlayerSnapshot {
paused: boolean
ended: boolean
currentTime: number
/** Frame index implied by the native media clock: floor(t * fps + 0.45). */
nativeFrame: number
/** Frame index shown in the "N / M fr" readout. */
readoutFrame: number
/** Seekbar fill width as a fraction (0..1) of the track width. */
seekbarFraction: number
}
export class VideoPlayerPage {
readonly page: Page
readonly stage: Locator
readonly videoArea: Locator
readonly playToggle: Locator
readonly video: Locator
readonly seekbar: Locator
readonly seekbarFill: Locator
readonly timeReadout: Locator
constructor(page: Page) {
this.page = page
this.stage = page.getByTestId('harness-stage')
this.videoArea = page.getByTestId('video-area')
this.playToggle = page.getByTestId('play-toggle')
this.video = page.locator(VIDEO_SELECTOR).first()
this.seekbar = page.getByTestId('seekbar')
this.seekbarFill = page.getByTestId('seekbar-fill')
this.timeReadout = page.getByTestId('time-readout')
}
async goto(): Promise<void> {
await this.page.goto('/')
await this.waitUntilReady()
}
/** Wait until the video.js engine has metadata and a usable frame readout. */
async waitUntilReady(): Promise<void> {
await this.video.waitFor({ state: 'attached' })
await this.page.waitForFunction(
(selector) => {
const el = document.querySelector(selector) as HTMLVideoElement | null
return !!el && el.readyState >= 1 /* HAVE_METADATA */ && Number.isFinite(el.duration)
},
VIDEO_SELECTOR,
{ timeout: 15_000 },
)
// The readout renders "N / M fr" once currentFrame state is wired up.
await this.page.waitForFunction(
(selector) => /\d+\s*\/\s*\d+\s*fr/.test(document.querySelector(selector)?.textContent ?? ''),
'[data-testid="time-readout"]',
{ timeout: 15_000 },
)
}
/**
* Some engines (notably WebKit headless) refuse to start playback for a clip
* that could produce sound without an explicit muted flag. The fixture has no
* audio track, but we mute defensively so play() resolves consistently.
*/
async muteNativeVideo(): Promise<void> {
await this.video.evaluate((el: HTMLVideoElement) => {
el.muted = true
})
}
async isPaused(): Promise<boolean> {
return this.video.evaluate((el: HTMLVideoElement) => el.paused)
}
async currentTime(): Promise<number> {
return this.video.evaluate((el: HTMLVideoElement) => el.currentTime)
}
private async readoutFrame(): Promise<number> {
const text = (await this.timeReadout.textContent()) ?? ''
const match = text.match(/(\d+)\s*\/\s*\d+\s*fr/)
return match ? Number.parseInt(match[1], 10) : Number.NaN
}
private async seekbarFraction(): Promise<number> {
const track = await this.seekbar.boundingBox()
const fill = await this.seekbarFill.boundingBox()
if (!track || !fill || track.width === 0) return 0
return fill.width / track.width
}
/** Read a coherent snapshot of all three synchronized surfaces. */
async snapshot(): Promise<PlayerSnapshot> {
const [native, readoutFrame, seekbarFraction] = await Promise.all([
this.video.evaluate((el: HTMLVideoElement, fps: number) => {
return {
paused: el.paused,
ended: el.ended,
currentTime: el.currentTime,
nativeFrame: Math.floor(el.currentTime * fps + 0.45),
}
}, SAMPLE_FRAME_RATE),
this.readoutFrame(),
this.seekbarFraction(),
])
return {
paused: native.paused,
ended: native.ended,
currentTime: native.currentTime,
nativeFrame: native.nativeFrame,
readoutFrame,
seekbarFraction,
}
}
clickPlayToggle(): Promise<void> {
return this.playToggle.click()
}
clickVideoArea(): Promise<void> {
// The drawing-canvas overlay is pointer-events:none when not drawing, so the
// click lands on the video-area div and triggers togglePlay.
return this.videoArea.click({ position: { x: 20, y: 20 } })
}
}
export const FRAME_RATE = SAMPLE_FRAME_RATE
export const TOTAL_FRAMES = SAMPLE_TOTAL_FRAMES
+141
View File
@@ -0,0 +1,141 @@
import { expect, test } from '@playwright/test'
import { FRAME_RATE, TOTAL_FRAMES, VideoPlayerPage } from '../pages/video-player.page'
/**
* Pure UI integration test for the frame-accurate video player.
*
* The player keeps three surfaces in lockstep off a single `currentFrame` state:
* 1. the native <video> element (video.js media clock),
* 2. the seekbar fill, and
* 3. the numeric frame readout.
*
* On pause, useFramePlayer snaps the native clock to the paused frame's center
* time, so after a short settle the native frame, the readout frame and the
* seekbar fill must all agree. We assert that invariant here rather than trusting
* any single surface.
*/
const SEEKBAR_TOLERANCE = 0.01 // fraction of the track (~1%), covers sub-pixel + thumb rounding
const HALF_FRAME_SECONDS = 1 / (2 * FRAME_RATE)
test.beforeEach(async ({ page }) => {
// Mock every backend call so this stays a pure frontend test. The player never
// hits the API during play/pause, but this guarantees isolation regardless.
//
// NOTE: the patterns are anchored to the origin root (/api/, /files/) so they
// only match real backend requests and NOT Vite-served source modules whose
// paths happen to contain those segments (e.g. /packages/webui/api/client.ts).
await page.route(/^https?:\/\/[^/]+\/(api|files)\//, (route) =>
route.fulfill({ status: 200, contentType: 'application/json', body: '{}' }),
)
})
/**
* Wait until the player has settled to a stable, paused, fully-synchronized
* frame, then assert the native clock, the readout and the seekbar all agree.
*/
async function expectPausedAndSynchronized(vp: VideoPlayerPage): Promise<void> {
await expect.poll(() => vp.isPaused(), { timeout: 5_000 }).toBe(true)
// Wait for the pause snap + external-seek nudge to fully settle: currentTime
// stops changing between consecutive reads.
await expect
.poll(
async () => {
const a = await vp.currentTime()
await vp.page.waitForTimeout(80)
const b = await vp.currentTime()
return Math.abs(b - a) < 1e-3
},
{ timeout: 5_000 },
)
.toBe(true)
// The UI frame and the native-clock frame converge on the same integer.
await expect
.poll(
async () => {
const snap = await vp.snapshot()
return snap.readoutFrame === snap.nativeFrame
},
{ timeout: 5_000 },
)
.toBe(true)
const snap = await vp.snapshot()
expect(snap.paused).toBe(true)
// Readout <-> native media clock.
expect(snap.readoutFrame).toBe(snap.nativeFrame)
// Seekbar fill <-> frame index.
expect(Math.abs(snap.seekbarFraction - snap.nativeFrame / TOTAL_FRAMES)).toBeLessThan(
SEEKBAR_TOLERANCE,
)
// Native clock is snapped to the paused frame's center time.
const frameCenter = snap.nativeFrame / FRAME_RATE + HALF_FRAME_SECONDS
expect(Math.abs(snap.currentTime - frameCenter)).toBeLessThan(HALF_FRAME_SECONDS + 1e-6)
}
/** Assert the player is genuinely stopped: the frame does not advance over time. */
async function expectPlayheadStopped(vp: VideoPlayerPage): Promise<void> {
const first = await vp.snapshot()
await vp.page.waitForTimeout(300)
const second = await vp.snapshot()
// The integer frame is the robust "not advancing" signal.
expect(second.readoutFrame).toBe(first.readoutFrame)
// currentTime must not advance meaningfully. A playing video would move ~0.3s
// in 300ms; a stopped one moves less than a frame (browser seeks land *near*,
// not exactly on, the requested frame-center, and the pause snap may still be
// settling), so half a frame cleanly separates stopped from playing.
expect(Math.abs(second.currentTime - first.currentTime)).toBeLessThan(HALF_FRAME_SECONDS)
}
test.describe('video player play/pause', () => {
test('toggles via the play/pause control', async ({ page }) => {
const vp = new VideoPlayerPage(page)
await vp.goto()
await vp.muteNativeVideo()
// Starts paused at frame 0.
const initial = await vp.snapshot()
expect(initial.paused).toBe(true)
expect(initial.readoutFrame).toBe(0)
// Play via the control -> playback starts and the readout advances.
await vp.clickPlayToggle()
await expect.poll(() => vp.isPaused(), { timeout: 5_000 }).toBe(false)
await expect
.poll(async () => (await vp.snapshot()).readoutFrame, { timeout: 5_000 })
.toBeGreaterThan(initial.readoutFrame)
// Pause via the control -> everything re-synchronizes and stays put.
await vp.clickPlayToggle()
await expectPausedAndSynchronized(vp)
await expectPlayheadStopped(vp)
})
test('toggles via clicking the video area', async ({ page }) => {
const vp = new VideoPlayerPage(page)
await vp.goto()
await vp.muteNativeVideo()
const initial = await vp.snapshot()
expect(initial.paused).toBe(true)
expect(initial.readoutFrame).toBe(0)
// Click the video surface to play.
await vp.clickVideoArea()
await expect.poll(() => vp.isPaused(), { timeout: 5_000 }).toBe(false)
await expect
.poll(async () => (await vp.snapshot()).readoutFrame, { timeout: 5_000 })
.toBeGreaterThan(initial.readoutFrame)
// Click again to pause -> native clock, readout and seekbar agree.
await vp.clickVideoArea()
await expectPausedAndSynchronized(vp)
await expectPlayheadStopped(vp)
})
})
+1 -5
View File
@@ -88,17 +88,13 @@
"devDependencies": {
"typescript": "6.0.3",
"@tailwindcss/postcss": "4.3.0",
"@tailwindcss/vite": "4.3.0",
"@tanstack/router-cli": "1.167.13",
"@tanstack/router-plugin": "1.168.14",
"@types/react": "19.2.16",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "5.2.0",
"autoprefixer": "10.5.0",
"postcss": "8.5.15",
"tailwindcss": "4.3.0",
"tw-animate-css": "1.3.3",
"vite": "7.3.5",
"vite-tsconfig-paths": "6.1.1"
"tw-animate-css": "1.3.3"
}
}
+57
View File
@@ -0,0 +1,57 @@
import { defineConfig, devices } from '@playwright/test'
/**
* Playwright configuration for the webui UI integration tests.
*
* The suite runs against a backend-free harness (packages/webui/e2e) served by
* Bun's native HTML bundler, so no database, auth or transcode pipeline is
* required.
*
* Browser selection: pass `--project=<name>` to pick an engine, e.g.
* bun run test:e2e --project=webkit # WebKit (Safari engine), used on macOS CI
* bun run test:e2e --project=chromium
* bun run test:e2e --project=firefox
*/
export default defineConfig({
testDir: './packages/webui/e2e/tests',
testMatch: '**/*.spec.ts',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',
timeout: 60_000,
expect: { timeout: 10_000 },
use: {
// `baseURL` is Playwright's required option key and cannot be renamed.
// eslint-disable-next-line @typescript-eslint/naming-convention
baseURL: 'http://localhost:5199',
trace: 'on-first-retry',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
// Launch the isolated harness dev server (Bun's native HTML bundler) before
// the tests.
webServer: {
command: 'bun run packages/webui/e2e/harness/serve.ts',
url: 'http://localhost:5199',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
})
+4 -1
View File
@@ -1,5 +1,5 @@
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [tsconfigPaths()],
@@ -7,6 +7,9 @@ export default defineConfig({
globalSetup: './packages/db/src/test-global-setup.ts',
globals: false,
pool: 'forks',
// Playwright e2e specs live under packages/webui/e2e and are run by the
// Playwright runner (bun run test:e2e), not Vitest.
exclude: [...configDefaults.exclude, 'packages/webui/e2e/**'],
server: {
deps: {
inline: ['zod'],