Skip to content

Audio is not defined #17963

Answered by c0b41
MejanH asked this question in Help
Oct 17, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

because you can't run Audio api on server

const [audio, setAudio] = useState(null)

useEffect(() => {

    setAudio(new Audio(URL)) // only call client

})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jamesmosier
Comment options

@ats1999
Comment options

Answer selected by jamesmosier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants