diff --git a/src/components/VideoPlayer.tsx b/src/components/VideoPlayer.tsx index 49574c2..e6c768b 100644 --- a/src/components/VideoPlayer.tsx +++ b/src/components/VideoPlayer.tsx @@ -1,6 +1,14 @@ +import { useState } from "react"; import ReactPlayer from "react-player"; function VideoPlayer(props: { url: string }) { + const [errored, setErrored] = useState(false); + if (errored) { + return
+
Offline - Video Not Available
+ +
; + } return
-
; + onError={() => setErrored(true)} + /> + + } export default VideoPlayer; \ No newline at end of file