Exempt gifs from active video system (#9824)
This commit is contained in:
@@ -130,13 +130,14 @@ export function Controls({
|
||||
const autoplayDisabled = useAutoplayDisabled() || isWithinMessage
|
||||
useEffect(() => {
|
||||
if (active) {
|
||||
if (onScreen) {
|
||||
// GIFs play immediately, videos wait until onScreen
|
||||
if (onScreen || isGif) {
|
||||
if (!autoplayDisabled) play()
|
||||
} else {
|
||||
pause()
|
||||
}
|
||||
}
|
||||
}, [onScreen, pause, active, play, autoplayDisabled])
|
||||
}, [onScreen, pause, active, play, autoplayDisabled, isGif])
|
||||
|
||||
// use minimal quality when not focused
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user