add
This commit is contained in:
parent
8e28fbf909
commit
22f58bce16
|
@ -55,6 +55,7 @@ export function VideoPlayer({
|
|||
src,
|
||||
poster,
|
||||
onError,
|
||||
|
||||
}: {
|
||||
src: string;
|
||||
poster?: string;
|
||||
|
@ -82,6 +83,10 @@ export function VideoPlayer({
|
|||
const progressRef = useRef<HTMLDivElement>(null);
|
||||
const [isSpeedOpen, setIsSpeedOpen] = useState(false);
|
||||
const [isBrightnessOpen, setIsBrightnessOpen] = useState(false);
|
||||
|
||||
const handleClick = (event: React.MouseEvent) => {
|
||||
event.stopPropagation(); // 阻止事件向上传递
|
||||
};
|
||||
return (
|
||||
<VideoPlayerContext.Provider
|
||||
value={{
|
||||
|
@ -129,7 +134,9 @@ export function VideoPlayer({
|
|||
resolutions,
|
||||
setResolutions,
|
||||
}}>
|
||||
<VideoPlayerLayout></VideoPlayerLayout>
|
||||
<div onClick={handleClick}>
|
||||
<VideoPlayerLayout></VideoPlayerLayout>
|
||||
</div>
|
||||
</VideoPlayerContext.Provider>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue