Closed virajchandra51 closed 1 year ago
I want to work on this issue.
https://www.youtube.com/watch?v=fnNJxufg1f4
@rishabhpathak359
Try to see if you can use this. Clip it to only 10-15 sec. The music should not be larger than 1MB in size. Use this or anything like this, don't go for too spooky or horror.
i have a doubt, u have mentioned that music is initially ON but as far as i know it is not possible to autoplay an audio intill and unless user interacts with DOM right?
you can create an useEffect call to turn the state of music play button to ON initially.
@virajchandra51 sir did that but to play an audio as the component mounts user's interaction with the DOM is necessary even if the state is initially On the audio is not playing initially automatically,browser blocks it.
Okay, I think the policies for auto play have been changed. Let it be OFF initially, we will connect the state to the preloader of the website with some ENTER button like Codeutsava6.0 , so that music starts playing. Till then, we can just go with initial OFF state.
See if you can change the state of the music with a simple mouse movement check. The user is 99% bound to scroll or maybe change his mouse position by some points, maybe we can bind it to that.
@virajchandra51 yes that can work but again only if user has tapped somewhere on screen no matter where and then scroll then state of music can be changed (again that DOM interaction thing)
even if the user has not tapped, maybe we can listen to mouseMove, and bind it to that.
Open a PR, I'll see what we can do.