Inspiration
Research suggests that background music, or music that is played while the listener is primarily focused on another activity, can improve performance on cognitive tasks in older adults. One study found that playing more upbeat music led to improvements in processing speed, while both upbeat and downbeat music led to benefits in memory
What it does
It's a browser extension, where you can choose/select your mood, and on that basis, it will play a music in the background.
This might sound a small and simple thing, but music has a big impact on one's mental health as proved by researchers and studies
How we built it
This was built using mainly JavaScript and included HTML and CSS
Challenges we ran into
This was our first time building an extension so went into a lot of problems implementing that
- We had first planned to integrate the extension with a backend by making a fetch requests from the extension, to the server in the backend. This way, we could play the user's defined songs instead of the predefined songs which we have hardcoded in the extension. We were able to successfully make an API which returned a JSON response of the user's defined songs, but accessing it, via a fetch request from the extension, required the user's login, which we found could be achieved via web tokens/ autoO. While we were able to figure out all this, a lot of time had already passed, and we dropped the idea of integrating with a backend, and instead just hardcoded predefined songs, and put the idea of integrating with backend as a future feature.
- Then, we included a YouTube video's embed in the extension's html page, which played the song successfully, however stopped when the extension's window(or tab) was closed. After learning more about it, we included the song in the
background.js
script which runs in the background irrespective of the extensions window(or tab) being open or not.
Accomplishments that we're proud of
- We were able to understand about Extensions in chrome and how to develop them
- Apart from developing, we got to learn about the features of extensions which are/could be possible, which we were unaware of
- Being able to make a new thing which we learnt for the first time
What we learned
- Learn about how to develop extensions
- Additional features of extensions
- Making API calls from an extension to a backend server in django
What's next for Moodify
- Integrating it with a backend.
- User will be able to add their own songs which they wish to play for each mood
- An auto popup after a fixed interval of time so that users can choose their mood automatically
Log in or sign up for Devpost to join the conversation.