mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-11 00:20:20 +00:00
fix(player): add a setSource
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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" }> {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user