Files
hyperframes/packages/player/package.json
T
Miguel Ángel 87fddbc1a1 fix(player): a sealed film is heard when its frame may not start sound (#8495)
* fix(player): a sealed film is heard when its frame may not start sound

When a browser refuses the film's own play (an iPhone, or Chrome's tap-first
rule for a sealed frame), the player plays copies of the film's media in its
page. A sealed player could not read the frame, so it made no copies and muted
the frame anyway: silence.

The runtime now sends the clips to copy with the refusal, and again whenever
they change. The player copies only files under the composition's own folder,
anonymously, and mutes the frame only while a copy plays instead.

* fix(player): a sealed film's copy plays its file from the composition's own origin

The copy's address is now the composition's origin followed by the checked
path, never the string the frame sent. The player's size budget rises by
exactly what the sealed copies add (npm pack, main vs this branch).

* fix(player): a sealed film's copy address is rebuilt from encoded path parts

* fix(player): a sealed film's copy refuses an encoded way out of its folder

* fix(player): a sealed film is muted only once its copy plays, and only from web addresses

Copies come only from http(s) addresses, so two opaque origins never match.
A clip with an invalid file address gets no copy, and the rest are still listed.
The frame is muted once a copy is playing, and gets its sound back when the
last one fails or is dropped.

* fix(player): a sealed film gets its sound back when its last playing copy fails

* fix(player): a sealed film's mute follows its copies' own state, whatever order events arrive in
2026-11-22 17:32:43 +00:00

53 lines
1.7 KiB
JSON

{
"name": "@hyperframes/player",
"version": "0.9.81",
"description": "Embeddable web component for HyperFrames compositions",
"repository": {
"type": "git",
"url": "https://github.com/heygen-com/hyperframes",
"directory": "packages/player"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/hyperframes-player.js",
"types": "./dist/hyperframes-player.d.ts",
"exports": {
".": {
"types": "./dist/hyperframes-player.d.ts",
"script": "./dist/hyperframes-player.global.js",
"import": "./dist/hyperframes-player.js",
"require": "./dist/hyperframes-player.cjs"
},
"./slideshow": {
"types": "./dist/slideshow/hyperframes-slideshow.d.ts",
"script": "./dist/slideshow/hyperframes-slideshow.global.js",
"import": "./dist/slideshow/hyperframes-slideshow.js",
"require": "./dist/slideshow/hyperframes-slideshow.cjs"
}
},
"scripts": {
"build": "tsup && node scripts/verify-runtime-pin.mjs",
"typecheck": "tsc --noEmit && tsc --noEmit -p tests/perf/tsconfig.json && tsc --noEmit -p tests/playbench/tsconfig.json",
"test": "vitest run",
"test:browser-security": "bun run tests/browser/sandbox-origin.ts",
"test:browser-raster": "bun run tests/browser/preview-raster-size.ts",
"test:browser-box": "bun run tests/browser/player-box.ts",
"test:browser-sealed-audio": "bun run tests/browser/sealed-audio.ts",
"perf": "bun run tests/perf/index.ts",
"playbench": "bun run tests/playbench/run.ts"
},
"dependencies": {
"@hyperframes/core": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.1.0",
"gsap": "^3.12.5",
"puppeteer-core": "^25.2.1",
"tsup": "^8.0.0",
"typescript": "^5.0.0",
"vitest": "^4.1.12"
}
}