Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Audio is not playing. #5

Closed
saswatsamal opened this issue Apr 20, 2021 · 1 comment
Closed

Audio is not playing. #5

saswatsamal opened this issue Apr 20, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@saswatsamal
Copy link
Member

I've added the audio dir to main ./audio/tech-house.mp3 and according to me it was working in my Local but when it been deployed the console is throwing an error at line number 59 of index.html. (Link)

Error Message:
Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.

@saswatsamal saswatsamal added the bug Something isn't working label Apr 20, 2021
@RahulAnand442001
Copy link
Contributor

RahulAnand442001 commented Apr 21, 2021

instead of writing document.querySeector("audio") change that to document.getElementById("audio")
also add an id attribute to the tag like this

saswatsamal added a commit that referenced this issue Apr 27, 2021
Merge pull request #11 from saswatsamal/main
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants