add
This commit is contained in:
parent
510b75b206
commit
8e28fbf909
|
@ -14,6 +14,7 @@ export const VideoDisplay: React.FC<VideoDisplayProps> = ({
|
||||||
onError,
|
onError,
|
||||||
videoRef,
|
videoRef,
|
||||||
setIsReady,
|
setIsReady,
|
||||||
|
isPlaying,
|
||||||
setIsPlaying,
|
setIsPlaying,
|
||||||
setError,
|
setError,
|
||||||
setBufferingState,
|
setBufferingState,
|
||||||
|
@ -204,19 +205,21 @@ export const VideoDisplay: React.FC<VideoDisplayProps> = ({
|
||||||
}, [src, onError, autoPlay]);
|
}, [src, onError, autoPlay]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<video
|
<div className="relative w-full h-full">
|
||||||
ref={videoRef}
|
<video
|
||||||
className="w-full h-full"
|
ref={videoRef}
|
||||||
poster={poster}
|
className="w-full h-full"
|
||||||
controls={false}
|
poster={poster}
|
||||||
playsInline
|
controls={false}
|
||||||
muted={isMuted}
|
playsInline
|
||||||
style={{ filter: `brightness(${brightness})` }}
|
muted={isMuted}
|
||||||
onTimeUpdate={() => {
|
style={{ filter: `brightness(${brightness})` }}
|
||||||
if (videoRef.current) {
|
onTimeUpdate={() => {
|
||||||
setCurrentTime(videoRef.current.currentTime);
|
if (videoRef.current) {
|
||||||
}
|
setCurrentTime(videoRef.current.currentTime);
|
||||||
}}
|
}
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue