feat(player): add mpv cache and buffer configuration

This commit is contained in:
Fredrik Burmester
2026-01-26 20:46:42 +01:00
parent 21f2ceefc3
commit 1cbb46f0ca
10 changed files with 299 additions and 9 deletions

View File

@@ -43,6 +43,17 @@ export type VideoSource = {
initialSubtitleId?: number;
/** MPV audio track ID to select on start (1-based) */
initialAudioId?: number;
/** MPV cache/buffer configuration */
cacheConfig?: {
/** Whether caching is enabled: "auto" (default), "yes", or "no" */
enabled?: "auto" | "yes" | "no";
/** Seconds of video to buffer (default: 10, range: 5-120) */
cacheSeconds?: number;
/** Maximum cache size in MB (default: 150, range: 50-500) */
maxBytes?: number;
/** Maximum backward cache size in MB (default: 50, range: 25-200) */
maxBackBytes?: number;
};
};
export type MpvPlayerViewProps = {