π Welcome to the Music Player project! π This dynamic web application πΆ is built using React βοΈ, offering users π§ an interface π₯οΈ to play π΅, pause βΈοΈ, and manage ποΈ their music collection πΆ. With its responsive design π±, users π₯ can effortlessly enjoy π§ their songs π΅. Plus, it has a separate data file π allowing users π₯ to add β their own songs πΆ to the list ποΈ and listen π to their personalized playlist π΅.
The Music Player πΆ is an engaging web application π₯οΈ that provides a user-friendly interface π§βπ» for music enjoyment π΅. It features functionalities π οΈ to play π΅, pause βΈοΈ, and manage ποΈ the music library πΆ. Users π₯ can track β³ song progress π and adjust ποΈ volume levels π. The design π¨ is responsive π±, ensuring smooth operation π₯οΈ on both desktop π» and mobile π± devices.
- Node.js π₯οΈ: JavaScript runtime π.
- React βοΈ: JavaScript library π for building user interfaces π₯οΈ.
- JavaScript π»: Programming language π₯οΈ.
- HTML/CSS π: For structuring π and styling π¨ the application.
The Music Player πΆ incorporates the following functionalities π οΈ and approaches π§©:
- User-Friendly Interface π§βπ»: Features controls ποΈ for playing π΅, pausing βΈοΈ, adjusting volume π, and tracking progress β³.
- Music Library Management ποΈ: Allows users π₯ to add β or remove β songs πΆ and select π±οΈ tracks to play π΅.
- Audio Controls ποΈ: Options to play π΅, pause βΈοΈ, and control volume π levels.
- Track Progress Display π: Easily track β³ the progress of the playing song π΅.
The design π¨ of the project π οΈ is responsive π±, working effectively π₯οΈ on both desktop π» and mobile π± devices.
To clone the repository, follow these steps:
-
Clone π₯ the repository using the following command π₯οΈ:
git clone https://github.com/nidhiupman568/MusicPlayer-Using-React.JS.git π₯
-
Navigate πΆββοΈ to the project directory π:
cd music-player π
-
Create π οΈ a new React JS project π₯οΈ using the following command π₯οΈ:
npx create-react-app <<Project_Name>> π
-
Change πΆββοΈ to the project directory π:
cd <<Project_Name>> π
-
Install π₯ some npm packages π¦ required for this project π οΈ using the following command π₯οΈ:
npm install --save @fortawesome/react-fontawesome π¨ npm install --save @fortawesome/free-solid-svg-icons π¨ npm install sass π¨
-
Project Structure ποΈ:
The updated dependencies π¦ in
package.json
will look like this:"dependencies": { "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "sass": "^1.68.0", "web-vitals": "^2.1.4" }
-
Example Code π§©:
App.js
π₯οΈ: This component 𧩠is responsible π§ for rendering π₯οΈ the layout π of the application.data.js
π: This file π contains data used for the music library πΆ.Library.js
π: Manages the music library πΆ and displays the list π of songs π΅.LibrarySong.js
π΅: Displays each song πΆ in the library π.PlayerSong.js
πΆ: Controls the playback π΅, including play π΅, pause βΈοΈ, and volume π.Navb.js
π₯οΈ: Provides navigation π§ within the application π₯οΈ.Song.js
π΅: Displays individual song πΆ details.
These five files π (
library.scss
,app.scss
,nav.scss
,player.scss
, andsong.scss
) will be in thestyles
π¨ folder of thesrc
directory π.
-
Start π the project by typing π₯οΈ the following command π₯οΈ in the terminal:
npm start π
-
Open π your web browser π and type π₯οΈ the following URL π:
http://localhost:3000/ π
Hereβs a sneak peek πΌοΈ of the Music Player πΆ in action β³:
π Enjoy using the Music Player! π Feel free to share π£οΈ your feedback π or contribute π€ to the project by making a pull request π. Happy listening! π΅π§
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify