[Video] 🫧 Move logic around by platform (#5003)

This commit is contained in:
Hailey 2024-08-28 08:46:47 -07:00 committed by GitHub
parent 9aa2b2d14e
commit 5ae0d40a14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 77 additions and 95 deletions

View file

@ -8,14 +8,14 @@ import {
} from 'view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerWeb'
import {atoms as a, useTheme} from '#/alf'
import {ErrorBoundary} from '../ErrorBoundary'
import {useActiveVideoView} from './ActiveVideoContext'
import {useActiveVideoWeb} from './ActiveVideoWebContext'
import * as VideoFallback from './VideoEmbedInner/VideoFallback'
export function VideoEmbed({source}: {source: string}) {
const t = useTheme()
const ref = useRef<HTMLDivElement>(null)
const {active, setActive, sendPosition, currentActiveView} =
useActiveVideoView({source})
useActiveVideoWeb()
const [onScreen, setOnScreen] = useState(false)
useEffect(() => {