mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
fix(nitro): fix native codegen
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user