2023-01-08 15:37:16 +01:00
|
|
|
// import { useCallback, useContext } from "react";
|
|
|
|
// import {
|
|
|
|
// VideoPlayerContext,
|
|
|
|
// VideoPlayerDispatchContext,
|
|
|
|
// } from "../VideoContext";
|
2023-01-08 13:15:32 +01:00
|
|
|
|
|
|
|
export function FullscreenControl() {
|
2023-01-08 15:37:16 +01:00
|
|
|
return <p>Hello world</p>;
|
|
|
|
// const dispatch = useContext(VideoPlayerDispatchContext);
|
|
|
|
// const video = useContext(VideoPlayerContext);
|
2023-01-08 13:15:32 +01:00
|
|
|
|
2023-01-08 15:37:16 +01:00
|
|
|
// const handleClick = useCallback(() => {
|
|
|
|
// dispatch({
|
|
|
|
// type: "FULLSCREEN",
|
|
|
|
// do: video.fullscreen ? "EXIT" : "ENTER",
|
|
|
|
// });
|
|
|
|
// }, [video, dispatch]);
|
2023-01-08 13:15:32 +01:00
|
|
|
|
2023-01-08 15:37:16 +01:00
|
|
|
// let text = "not fullscreen";
|
|
|
|
// if (video.fullscreen) text = "in fullscreen";
|
2023-01-08 13:15:32 +01:00
|
|
|
|
2023-01-08 15:37:16 +01:00
|
|
|
// return (
|
|
|
|
// <button type="button" onClick={handleClick}>
|
|
|
|
// {text}
|
|
|
|
// </button>
|
|
|
|
// );
|
2023-01-08 13:15:32 +01:00
|
|
|
}
|