···11import {type RefObject, useCallback, useEffect, useRef, useState} from 'react'
2233import {isSafari} from '#/lib/browser'
44+import {logger} from '#/logger'
45import {useVideoVolumeState} from '#/components/Post/Embed/VideoEmbed/VideoVolumeContext'
5667export function useVideoElement(ref: RefObject<HTMLVideoElement>) {
···7980 await ref.current.play()
8081 } catch (e: any) {
8182 if (
8282- !e.message?.includes(`The request is not allowed by the user agent`)
8383+ !e.message?.includes(
8484+ `The request is not allowed by the user agent`,
8585+ ) &&
8686+ !e.message?.includes(
8787+ `The play() request was interrupted by a call to pause()`,
8888+ )
8389 ) {
8490 throw e
8591 }
···176182 } else {
177183 const promise = ref.current.play()
178184 if (promise !== undefined) {
179179- promise.catch(err => {
180180- console.error('Error playing video:', err)
185185+ promise.catch((err: any) => {
186186+ if (
187187+ // ignore this common error. it's fine
188188+ !err.message?.includes(
189189+ `The play() request was interrupted by a call to pause()`,
190190+ )
191191+ ) {
192192+ logger.error('Error playing video:', {message: err})
193193+ }
181194 })
182195 }
183196 }