fix(web): make source a listenable state, fixes the view

This commit is contained in:
2026-07-31 19:43:49 +02:00
parent d2ca76b4a9
commit 0c7c2b3848
21 changed files with 323 additions and 54 deletions
+4 -1
View File
@@ -11,7 +11,7 @@ import type { CastOptions, Source } from "../types/source";
export type NumberProperty = Exclude<
keyof OmniPlayerState,
"status" | "isPlaying" | "muted"
"status" | "isPlaying" | "muted" | "source"
>;
export type BoolProperty = "isPlaying" | "muted" | "isAutoQuality";
@@ -29,6 +29,9 @@ export interface OmniEventMap extends HybridObject<{ android: "kotlin" }> {
addCastStatusListener(cb: (value: CastStatus) => void): void;
removeCastStatusListener(cb: (value: CastStatus) => void): void;
addSourceListener(cb: (value?: Source) => void): void;
removeSourceListener(cb: (value?: Source) => void): void;
addOnEndListener(cb: OmniEvents["end"]): void;
removeOnEndListener(cb: OmniEvents["end"]): void;