import { Fragment, lazy, Suspense, useCallback, useEffect, useRef, useState, type ReactNode } from "react"; import { useTranslation } from "react-i18next"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import Hls from "hls.js"; import { ArrowLeft, Clock, Download, Info, Keyboard, Maximize, Minimize, Pause, Play, RotateCcw, Settings, SkipBack, SkipForward, Square, Volume2, VolumeX, X, } from "lucide-react"; import { api, type PlexMarker } from "../lib/api"; // The rich info overlay (poster/cast/ratings) reuses the same component as the card's info page. const PlexInfo = lazy(() => import("./PlexInfo")); // The Plex module's rich, full-page player. Plays the LOCAL file: direct-playable files stream raw // (native