mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-13 12:31:57 +01:00
feat: KSPlayer as an option for iOS + other improvements (#1266)
This commit is contained in:
committed by
GitHub
parent
d1795c9df8
commit
74d86b5d12
19
modules/mpv-player/src/MpvPlayerModule.web.ts
Normal file
19
modules/mpv-player/src/MpvPlayerModule.web.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { NativeModule, registerWebModule } from "expo";
|
||||
|
||||
import { ChangeEventPayload } from "./MpvPlayer.types";
|
||||
|
||||
type MpvPlayerModuleEvents = {
|
||||
onChange: (params: ChangeEventPayload) => void;
|
||||
};
|
||||
|
||||
class MpvPlayerModule extends NativeModule<MpvPlayerModuleEvents> {
|
||||
PI = Math.PI;
|
||||
async setValueAsync(value: string): Promise<void> {
|
||||
this.emit("onChange", { value });
|
||||
}
|
||||
hello() {
|
||||
return "Hello world! 👋";
|
||||
}
|
||||
}
|
||||
|
||||
export default registerWebModule(MpvPlayerModule, "MpvPlayerModule");
|
||||
Reference in New Issue
Block a user