diff --git a/src/containers/collectibles/components/CollectiblesPage.tsx b/src/containers/collectibles/components/CollectiblesPage.tsx index b9554aeb67..4e15ce3c53 100644 --- a/src/containers/collectibles/components/CollectiblesPage.tsx +++ b/src/containers/collectibles/components/CollectiblesPage.tsx @@ -111,6 +111,26 @@ const CollectibleDetails: React.FC<{ setIsMuted(!isMuted) }, [isMuted, setIsMuted]) + const videoRef = useRef(null) + + useEffect(() => { + if (videoRef?.current) { + const videoElement = videoRef.current + const listener = () => { + videoElement.pause() + } + ;['loadeddata', 'timeupdate'].forEach(event => { + videoElement.addEventListener(event, listener) + }) + + return () => { + ;['loadeddata', 'timeupdate'].forEach(event => { + videoElement.removeEventListener(event, listener) + }) + } + } + }, [videoRef]) + return (