import React from 'react' import BLOG from '@/blog.config' const Player = () => { const [player, setPlayer] = React.useState() const ref = React.useRef(null) const showLrc = JSON.parse(BLOG.MUSIC_PLAYER_SHOW_LRC) const playerVisible = JSON.parse(BLOG.MUSIC_PLAYER_VISIBLE) const autoPlay = JSON.parse(BLOG.MUSIC_PLAYER_AUTO_PLAY) const meting = JSON.parse(BLOG.MUSIC_PLAYER_METING) React.useEffect(() => { if (!meting && window.APlayer) { setPlayer(new window.APlayer({ container: ref.current, fixed: true, showlrc: showLrc, autoplay: autoPlay, order: BLOG.MUSIC_PLAYER_ORDER, audio: BLOG.MUSIC_PLAYER_AUDIO_LIST })) } return () => { setPlayer(undefined) } }, []) return (