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