feat(android): support chromecast

This commit is contained in:
2026-07-26 19:27:41 +02:00
parent 6423ed0bc5
commit 06efcbf1aa
32 changed files with 902 additions and 57 deletions
+10 -2
View File
@@ -1,12 +1,13 @@
import type { HybridObject } from "react-native-nitro-modules";
import type { OmniEvents } from "../types/events";
import type {
CastStatus,
OmniPlayerState,
OmniPlayer as OmniPlayerT,
PlayerBackend,
PlayerStatus,
} from "../types/player";
import type { Source } from "../types/source";
import type { CastOptions, Source } from "../types/source";
export type NumberProperty = Exclude<
keyof OmniPlayerState,
@@ -25,6 +26,9 @@ export interface OmniEventMap extends HybridObject<{ android: "kotlin" }> {
addPlayerStatusListener(cb: (value: PlayerStatus) => void): void;
removePlayerStatusListener(cb: (value: PlayerStatus) => void): void;
addCastStatusListener(cb: (value: CastStatus) => void): void;
removeCastStatusListener(cb: (value: CastStatus) => void): void;
addOnEndListener(cb: OmniEvents["end"]): void;
removeOnEndListener(cb: OmniEvents["end"]): void;
@@ -60,5 +64,9 @@ export interface OmniPlayer
}
export interface OmniPlayerFactory extends HybridObject<{ android: "kotlin" }> {
createPlayer(props?: Source, backend?: PlayerBackend): OmniPlayer;
createPlayer(
props?: Source,
backend?: PlayerBackend,
cast?: CastOptions,
): OmniPlayer;
}