player: runtime-src is honoured for srcdoc only - an src embed always fetches the runtime from jsDelivr
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with the player entry points H, F, Pt, and _injectRuntime in hyperframes-player.global.js, then reproduce the src path using host.html and comp-nested.html. Done means an src embed requests /local-runtime.js when runtime-src is valid and otherwise retains the jsDelivr fallback, matching srcdoc behavior.
索引モデルが issue の本文から書いたものです。
説明
Summary
<hyperframes-player> accepts a runtime-src attribute, and validates it carefully (http/https,
same-origin or loopback). But it is only ever read on the srcdoc path:
function H(r, e) { return qe(It(e, ...), Pt(r)); } // srcdoc -> honours runtime-src (Pt)
function F(r, e) { return Lt(e, ...); } // src -> URL params only
The probe that injects the runtime into an src iframe uses the module constant instead, with no
access to the host element:
var k = "https://cdn.jsdelivr.net/npm/@hyperframes/[email protected]/dist/hyperframe.runtime.iife.js";
_injectRuntime() {
this._runtimeInjected = true;
const t = doc.createElement("script");
t.src = k; // <- always the CDN
(doc.head || doc.documentElement).appendChild(t);
}
So an src embed cannot be given a local runtime. On an offline or air-gapped machine, or behind
a script-src 'self' CSP, the injection silently fails (it is inside a bare try {} catch {}),
__hf never appears, and the element eventually emits
error: "Composition timeline not found after 8s".
Reproduction
comp-nested.html — a [data-composition-src] child makes the probe inject immediately:
<!doctype html><html><head><meta charset="utf-8"></head><body>
<div id="root" data-composition-id="main" data-width="1080" data-height="1920">
<div data-composition-src="child.html" data-start="0" data-duration="5"></div>
</div>
</body></html>
host.html, served over http from the same origin as a local copy of the runtime:
<script src="https://cdn.jsdelivr.net/npm/@hyperframes/[email protected]/dist/hyperframes-player.global.js"></script>
<hyperframes-player src="comp-nested.html" runtime-src="/local-runtime.js"
width="1080" height="1920"></hyperframes-player>
Actual
The network panel shows
GET https://cdn.jsdelivr.net/npm/@hyperframes/[email protected]/dist/hyperframe.runtime.iife.js 200
and no request for /local-runtime.js. runtime-src passes the element's own validation and is
still ignored.
Expected
src and srcdoc resolve the runtime the same way: runtime-src when it is set and valid, the
jsDelivr default otherwise. Concretely, pass the resolved URL into the probe (it is already
computed by Pt(host)) instead of closing over the module constant, so an embed can serve its own
pinned copy.
Two smaller things that would help either way:
- the injected
<script>has noonerror, so a blocked or 404 runtime is indistinguishable from
a slow one — the element just times out after 8 s with a message about the timeline; - documenting
runtime-srcas srcdoc-only would at least make the current behaviour discoverable.
Environment
@hyperframes/player0.8.41, Chromium 141, Linux
Why it matters
A local review tool that embeds staged projects has to reach a CDN for every composition it opens,
or pre-inject the runtime into the served HTML itself (which is what we now do) — even though the
exact matching runtime is already sitting in node_modules/hyperframes/dist/.
- 主要言語
- TypeScript
- スター
- 54.1k
- フォーク
- 4.9k
- 平均マージ
- 7時間 18分
- マージ済み PR(30日)
- 784
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
heygen-com/hyperframes のほかの issue
-
Docs: clarify that "Enable auto-update" is only available in the Claude Code terminal (CLI) /plugin UI対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
heygen-com/hyperframes#5027 ·
メンテナーはふだん 1 日以内に返信
-
fix(producer): propagate useGpu to HDR layered streaming encoder対応中かも @Monster-GM が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
heygen-com/hyperframes#5002 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#4702 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Studio catalog prompt editor has no accessible name対応中かも @lorenzozanee が 12 日前に担当しました。 オープンbug difficulty/easy triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#4384 ·
メンテナーはふだん 1 日以内に返信
-
lint: validate composition variables declared on supported root elements再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug difficulty/easy triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
heygen-com/hyperframes#4383 ·
メンテナーはふだん 1 日以内に返信
heygen-com/hyperframes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
wardian-app/Wardian#1603 ·
メンテナーはふだん 1 日以内に返信
-
Sign the pledgeオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
input-output-hk/devx-updates#168 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/docs#46222 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-ready area: config area: skills type: chore upstream: brain-kit
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
dev experience frontend good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cuttle-cards/cuttle#1403 ·
メンテナーはふだん 1 日以内に返信