fix(player): add a setSource

This commit is contained in:
2026-07-21 19:54:24 +02:00
parent 6eb02d32cb
commit a2d5ede547
7 changed files with 14 additions and 8 deletions
+4
View File
@@ -74,6 +74,10 @@ export class WebOmniPlayer implements OmniPlayer {
return this._source;
}
setSource(source?: Source): void {
this.source = source ?? null;
}
set source(source: Source | null) {
this._source = source;
// Drop the overlay subtitle if it is not part of the new source.
-2
View File
@@ -56,8 +56,6 @@ export interface OmniPlayer
extends HybridObject<{ android: "kotlin" }>,
OmniPlayerT {
readonly eventMap: OmniEventMap;
setSource(src?: Source): void;
}
export interface OmniPlayerFactory extends HybridObject<{ android: "kotlin" }> {
+4
View File
@@ -1,6 +1,10 @@
import type { Source } from "./source";
export interface OmniPlayer extends OmniPlayerState {
showNotification?: boolean;
setSource(source?: Source): void;
play(): void;
pause(): void;
seekBy(offset: number): void;