Commit 7cd3821b authored by hewenhao's avatar hewenhao

feat: update

parent 2ac8d260
import { useStoreState } from '@/store/hooks'
import { useFocus } from '@/hooks'
import { useEffect } from 'react'
export function LazyPlayer () {
const player = useStoreState(state => state.mainModel.player)
const isFocus = useFocus()
useEffect(() => {
if (isFocus) {
player.play()
} else {
player.pause()
}
}, [player, isFocus])
return null
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment