player: runtime-src is honoured for srcdoc only - an src embed always fetches the runtime from jsDelivr
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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/.
- Ngôn ngữ chính
- TypeScript
- Star
- 54.1k
- Fork
- 4.9k
- Merge trung bình
- 7 giờ 19 phút
- Pull request đã merge (30 ngày)
- 746
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của heygen-com/hyperframes
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
heygen-com/hyperframes#5117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: clarify that "Enable auto-update" is only available in the Claude Code terminal (CLI) /plugin UICó thể đã có người làm @rumi7911 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
heygen-com/hyperframes#5027 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(producer): propagate useGpu to HDR layered streaming encoderCó thể đã có người làm @Monster-GM đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
heygen-com/hyperframes#5002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skills: remoteHeadSha() can open a Git Credential Manager dialog on Windows (GIT_TERMINAL_PROMPT does not cover GUI helpers; slug unvalidated)Có thể đã có người làm @RaphaelFakhri đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4702 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Studio catalog prompt editor has no accessible nameCó thể đã có người làm @lorenzozanee đã nhận 14 ngày trước. Đang mởbug difficulty/easy triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4384 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của heygen-com/hyperframes
Issue tương tự
-
[bug] diagnostics.dumpBody:Buffer 形态请求(透传 lane)跳过 dumps/ 落盘,仅留 raw/-unknown-Có thể đã có người làm @ranxianglei đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ranxianglei/billion-context#2421 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
nuxt/test-utils#1842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
MoonshotAI/kimi-code#4146 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
farbenmeer/tapi#531 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày