Bluesky app fork with some witchin' additions 💫

Revert "[Video] Revert safari hackfix (#5367)" (#7001)

This reverts commit 94e7bfbe40ba6766361caaba99feff74a187613a.

authored by danabra.mov and committed by

GitHub ea6ac256 296aab47

+7
+7
src/view/com/util/post-embeds/VideoEmbedInner/web-controls/utils.tsx
··· 1 1 import React, {useCallback, useEffect, useRef, useState} from 'react' 2 2 3 + import {isSafari} from '#/lib/browser' 3 4 import {useVideoVolumeState} from '../../VideoVolumeContext' 4 5 5 6 export function useVideoElement(ref: React.RefObject<HTMLVideoElement>) { ··· 37 38 const handleTimeUpdate = () => { 38 39 if (!ref.current) return 39 40 setCurrentTime(round(ref.current.currentTime) || 0) 41 + // HACK: Safari randomly fires `stalled` events when changing between segments 42 + // let's just clear the buffering state if the video is still progressing -sfn 43 + if (isSafari) { 44 + if (bufferingTimeout) clearTimeout(bufferingTimeout) 45 + setBuffering(false) 46 + } 40 47 } 41 48 42 49 const handleDurationChange = () => {