import { 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, Download, Maximize, Minimize, Pause, Play, RotateCcw, SkipBack, SkipForward, Volume2, VolumeX, } from "lucide-react"; import { api, type PlexMarker } from "../lib/api"; // The Plex module's rich, full-page player. Plays the LOCAL file: direct-playable files stream raw // (native