Add a readme, make it easier to install

This commit is contained in:
2026-07-13 13:10:10 +02:00
parent 3c9e850f31
commit 14dca7405e
8 changed files with 406 additions and 78 deletions
+15
View File
@@ -1,4 +1,19 @@
export { useEvent, usePlayerState } from "./events";
export { OmniProvider, usePlayer } from "./provider";
export type { OmniEvents } from "./types/events";
export type {
OmniPlayer,
OmniPlayerState,
PlayerStatus,
Rendition,
Track,
} from "./types/player";
export type {
Metadata,
MixAudioMode,
Source,
Subtitle,
VideoSrc,
} from "./types/source";
export type { SubtitleAssets } from "./types/subtitles";
export { OmniView } from "./view";
+3 -1
View File
@@ -72,7 +72,9 @@ const SubtitleOverlay = ({
const instance = new PgsRenderer({
video: el,
subUrl: subtitle.link,
...(pgs?.workerUrl && { workerUrl: pgs.workerUrl }),
workerUrl:
pgs?.workerUrl ??
new URL("libpgs/dist/libpgs.worker.js", import.meta.url).href,
});
attach({ destroy: () => instance.dispose() });
});