feat: adding exoplayer for HDR playback

Currently MPV doesn't support HDR via external displays. giving people
the choice of HDR/limited ass sub support/SDR full sub support

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
Lance Chant
2026-07-01 13:07:35 +02:00
parent 28a75a2b8c
commit faa250bfdd
19 changed files with 1735 additions and 82 deletions

View File

@@ -7,7 +7,7 @@ import type React from "react";
import { createContext, useCallback, useContext, useState } from "react";
import { Platform } from "react-native";
import type { Bitrate } from "@/components/BitrateSelector";
import { settingsAtom } from "@/utils/atoms/settings";
import { getActivePlayerType, settingsAtom } from "@/utils/atoms/settings";
import { getStreamUrl } from "@/utils/jellyfin/media/getStreamUrl";
import { generateDeviceProfile } from "../utils/profiles/native";
import { apiAtom, userAtom } from "./JellyfinProvider";
@@ -78,10 +78,11 @@ export const PlaySettingsProvider: React.FC<{ children: React.ReactNode }> = ({
}
try {
// Generate device profile for MPV player
// Match the device profile to the actually-active player so the
// server picks codecs/containers the player can decode.
const native = generateDeviceProfile({
platform: Platform.OS as "ios" | "android",
player: "mpv",
player: getActivePlayerType(settings),
audioMode: settings.audioTranscodeMode,
});
const data = await getStreamUrl({