fix(player): version runtime protocol

This commit is contained in:
James
2026-07-13 13:28:11 -04:00
parent 95fa14b2c2
commit dcefdd98ca
32 changed files with 683 additions and 78 deletions
+12 -1
View File
@@ -19,8 +19,19 @@ import {
isRuntimeDurationAdapter,
} from "./timeline-adapters.js";
declare const __HYPERFRAMES_RUNTIME_CDN_URL__: string;
export function runtimeCdnUrlForVersion(version: string): string {
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(version)) {
throw new Error(`Invalid HyperFrames runtime version: ${version}`);
}
return `https://cdn.jsdelivr.net/npm/@hyperframes/core@${version}/dist/hyperframe.runtime.iife.js`;
}
const RUNTIME_CDN_URL =
"https://cdn.jsdelivr.net/npm/@hyperframes/core/dist/hyperframe.runtime.iife.js";
typeof __HYPERFRAMES_RUNTIME_CDN_URL__ === "string"
? __HYPERFRAMES_RUNTIME_CDN_URL__
: runtimeCdnUrlForVersion("0.0.0-dev");
export interface ProbeResult {
duration: number;