fix(nitro): fix native codegen

This commit is contained in:
2026-07-19 19:59:56 +02:00
parent 5921c2da59
commit 66471967e3
48 changed files with 1179 additions and 82 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ export interface Source {
mixAudio?: MixAudioMode;
// Opaque, consumer-defined payload forwarded verbatim to the cast receiver
// as the load request's customData. omni does not interpret it.
castData?: unknown;
castData?: Record<string, string>;
}
export interface CastOptions {
+18 -14
View File
@@ -1,16 +1,20 @@
export interface JassubAssets {
/** URL of `jassub-worker.js`. */
workerUrl?: string;
/** URL of `jassub-worker.wasm`. */
wasmUrl?: string;
/** URL of `jassub-worker-modern.wasm`. */
modernWasmUrl?: string;
/** URL of a fallback font used when the ASS file references none. */
fontUrl?: string;
}
export interface PgsAssets {
/** URL of `libpgs.worker.js`. */
workerUrl?: string;
}
export interface SubtitleAssets {
jassub?: {
/** URL of `jassub-worker.js`. */
workerUrl?: string;
/** URL of `jassub-worker.wasm`. */
wasmUrl?: string;
/** URL of `jassub-worker-modern.wasm`. */
modernWasmUrl?: string;
/** URL of a fallback font used when the ASS file references none. */
fontUrl?: string;
};
pgs?: {
/** URL of `libpgs.worker.js`. */
workerUrl?: string;
};
jassub?: JassubAssets;
pgs?: PgsAssets;
}
+14 -15
View File
@@ -119,22 +119,21 @@ export const OmniView = ({
const castData = player.source?.castData;
const config = useMemo<HlsMediaConfig>(
() =>
({
hlsJs: {
xhrSetup: (xhr: XMLHttpRequest) => {
const headers = headersRef.current;
if (!headers) return;
for (const [key, value] of Object.entries(headers)) {
if (value) xhr.setRequestHeader(key, value);
}
},
() => ({
hlsJs: {
xhrSetup: (xhr: XMLHttpRequest) => {
const headers = headersRef.current;
if (!headers) return;
for (const [key, value] of Object.entries(headers)) {
if (value) xhr.setRequestHeader(key, value);
}
},
googleCast: {
receiver: player.castOptions?.receiverApplicationId,
customData: castData ?? null,
},
}) as HlsMediaConfig,
},
googleCast: {
receiver: player.castOptions?.receiverApplicationId,
customData: castData ?? null,
},
}),
[player.castOptions, castData],
);