refactor(casting): remove AirPlay references, keep extensible architecture

- Remove AirPlay from CastProtocol type union (Chromecast only for now)
- Replace AirPlay TODOs with generic 'Future: Add X for other protocols' comments
- Remove PROTOCOL_COLORS export, use hardcoded Chromecast color (#F9AB00)
- Update all component headers to be protocol-agnostic
- Keep switch statements extensible for future protocol additions
- Maintain clean architecture for easy integration of new casting protocols

Architecture remains flexible for future protocols (AirPlay, DLNA, etc.)
This commit is contained in:
Uruk
2026-01-19 22:58:26 +01:00
committed by Gauvain
parent 515e05015f
commit 51bd8a92da
5 changed files with 26 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
/**
* Unified Casting Player Modal
* Full-screen player for both Chromecast and AirPlay
* Protocol-agnostic full-screen player for all supported casting protocols
*/
import { Ionicons } from "@expo/vector-icons";
@@ -35,7 +35,6 @@ import {
shouldShowNextEpisodeCountdown,
truncateTitle,
} from "@/utils/casting/helpers";
import { PROTOCOL_COLORS } from "@/utils/casting/types";
export default function CastingPlayerScreen() {
const insets = useSafeAreaInsets();
@@ -178,7 +177,7 @@ export default function CastingPlayerScreen() {
);
const protocolColor = useMemo(
() => (protocol ? PROTOCOL_COLORS[protocol] : "#666"),
() => (protocol === "chromecast" ? "#F9AB00" : "#666"), // Google yellow
[protocol],
);