import React, { useContext, useEffect, useRef, useState } from "react"; import Hls from "hls.js"; import { motion, AnimatePresence } from "framer-motion"; import "plyr/dist/plyr.css"; import { VideoPlayerContext } from "./VideoPlayer"; export const LoadingOverlay = () => { const { loadingProgress } = useContext(VideoPlayerContext); return (

{loadingProgress > 0 ? `加载中... ${loadingProgress}%` : "准备中..."}

); }; export default LoadingOverlay;