Professional Documents
Culture Documents
Minor Project Report
Minor Project Report
Minor Project Report
SPOTIFY CLONE
SUBMITTED BY:
SIDHARTH KUMAR(03355202719)
KUMAR ASHUTOSH MANGALAM(02055202719)
DEEPAK KUMAR(04355202719)
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING
CERTIFICATE
Certified that this project report “SPOTIFY CLONE “ is the work of Sidharth
Kumar,Deepak Kumar and Kumar Ashutosh manglam who carried out the
minor project work under my supervision.
Shruti Ahuza
Assistant Professor
CSE, BMCEM
We would like to express our deep gratitude to our guide Ms. SHRUTI MAM for her valuable guidance,
faculty of computer science and engineering, MVSIT and timely suggestions during the entire duration
of our dissertation work, without which this work would not have been possible. We would also like to
convey our deep regards to all other faculty members of MVSIT, who have best. owed their great effort
and guidance at appropriate times without which it would have been very difficult on our part to finish
this work. Finally, we would also like to thank our friends for their advice and pointing out our
mistakes, parents, and classmates for their encouragement throughout our project period. At last but
not the least, we thank everyone for supporting us directly or indirectly in completing this project
successfully
ABSTRACT
The objective of this project is to design online Music web application with user interface which will
enable them to browse, search, get song recommendations and download the song items of their
choice. The motivation of this project comes from my desire to learn the increasingly growing field of
PHP(Hypertext Preprocessor) database designing, website designing and their growing
popularity by taking up this project.
If the site is hard to use and easy to forget, it just doesn’t matter what technologies was used to create
it. Unfortunately, this truth makes many inexperienced programmers underestimate the importantce
of the way the invisible part of a site is implemented-the code, the database,and so on. The visual part
of the site gets visitors interested to begin with, but its functionality makes them come back. A web
site can sometimes be implemented very quickly based on certain initial requirements, but if not
properly architected, it can become difficult, if not impossible, to change.
Media Usage growing Day-by-day rapidly and people are easily accessing the internet for various
purposes. Performance is also a major thrust area in the web application which is one of the main
reasons why users get attracted to it. Growing user needs should be taken in to concern with new
features to be included.
CONTENTS
Declaration
Acknowledgement
Abstract
CHAPTERS
CHAPTERS 1. -INTRODUCTION
1.1 Background
1.2 Objective
1.3 Purpose, Scope and Applicability
1.3.1 Purpose
1.3.2 Scope
1.3.3 Applicability
1.4 Achievements
1.5 Organization of Reports
Chapter 7: Reference
CHAPTER 1 INTRODUCTION
With increasing daemand of imformation and data. Computer Technology is the field which is
developing rapidly. Technology which is in demand today might get redundant in future. So, it
necessary to provide the latest and most modern IT solutions to various businesses and other
institutions.
The objective of this project is to implement online Music web application with user interface. The
motivation of this project comes from my desire to learn the increasingly growing field of php server
database designing, website designing and their growing popularity by taking up this project.
The word design in the context of a web Application can mean many things. Its most popular usage
probably refers to the visual and user interface(UI) design of website.
This project covers the following implementation:
1) An online product catalog that can be brosed: The work starts with adding many new product
catalog features which includes displaying categories, product details.
2) Searching the Catalog: For the visual part, a text box is used in which the visitor can enter one
or more words to search through the product catalog. In Online music website, the words
entered by visitors are searched for in the songs named and descriptions.
3) Handling customer Accounts: in customer account system, details such as credit card numbers
are stored in a database so that customers don’t have to retype this information each time they
place an order. Customers can log in via a login page or dialog box to get access to secured
areas of the website. Once logged in the web Application remembers the customer logs
out(either manually via a Log out button or automatically, if the session times out or a server
error occurs).
All secures pages in a web application need to check whether customer is logged in before
allowing access.
4) Making Song Recommendations: One of the most important advantages of an online Music
Website is the capability to customize the web site for each visitor based on his or her
preferences, or based on data gathered from other visitors with similar preferences. In Song
recommendations system, additional songs are suggested to an individual visitor in a clever
way.
1.1 Background
I did some literature review of the previous website that were in the market and the major
drawback of those systems were that there was unencrypted user data password, unnormalized
database, non-responsive, full of ads and so on.
So the new website will be fully responsive and proper recommendations for user to feel right way and
visit the website again and again. It will also be simple, fast and dynamic on go website for better
listening and downloading of the songs. No unwanted popups and ad will disturb the user during
listening.
1.1 Objective
The objective of the project is to implement the online music website that will allow user to
browser, search, listen and download all the songs that they want. The user interface will have all the
necessary songs, language and user settings for betterment of the user. User can create playlist , add
songs to it and remove when they need and sorting it on their own. The main aim will be implemented
a whole user friendly UI for the user.
1.2 Purpose,Scope,Applicability
1.2.1 Purpose:
The purpose of this project is to provide an automated PHP web application and to explore the
capabilities and provide a convenient website to user.
1.3.2 SCOPE
The scope of the project is as follows:
◼ The main scope is to provide the right platform to music listener out in the digital market.
◼ In future if the website is successful and user are increasing and system administrator is been
done properly we can develop the app for the user and the betterment of music listener.
1.2.2 Applicability:
◼ This project is used to listen the music .
◼ It is also used to download it
1.3 Achievements
This project has helped me in learning more similar projects and how to make the project more
creative. The more I was working on my project; I gained more knowledge and learned more
interesting features and how to design my web page more creatively. This project has helped me to
improve my programming skills and how to manage my time and consume time.
It helped me to explore more similar projects and gain more information and knowledge about
them. I’m Keen to learn more about different programming language and to work on other projects.
The report divide into 4 main chapters. It gives a brief introduction of the project covered.
Chapter 1 gives the information about the background and objectives of the project. It also specifies
the future scope of the project.
Chapter 2 gives us a brief knowledge of the existing system and the proposed system. It also provide us
with information of the software requirements. Justification of the technology has also been provide.
Chapter 3 Provides us with Module diagram , ER Diagram and other UML diagrams. It also provides us
with the data dictionary of the database.
Chapter 6 gives us the conclusion of the project and the future work to be done.
Chapter 2
System Analysis
For User:
Hardware Requirements:
◼ 128 MB RAM & above
◼ 2.0 GHz & above
◼ 60 GB hard disk & above
◼ Internet connection
Software Requirements:
◼ Operating system
◼ Web browser
After creating web page using HTML coding, we need to style them to make them more attractive
to users. CSS(Cascading Style Sheets) is used for this work.
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document
written in a markup language such as HTML or XML (including XML dialects such
as SVG, MathML or XHTML).[1] CSS is a cornerstone technology of the World Wide Web, alongside HTML
and JavaScript.[2]
CSS is designed to enable the separation of content and presentation, including layout, colors,
and fonts.[3] This separation can improve content accessibility; provide more flexibility and control in the
specification of presentation characteristics; enable multiple web pages to share formatting by specifying the
relevant CSS in a separate .css file, which reduces complexity and repetition in the structural content; and
enable the .css file to be cached to improve the page load speed between the pages that share the file and
its formatting.
Separation of formatting and content also makes it feasible to present the same markup page in different
styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser
or screen reader), and on Braille-based tactile devices. CSS also has rules for alternate formatting if the
content is accessed on a mobile device.[4]
The name cascading comes from the specified priority scheme to determine which style rule applies if more
than one rule matches a particular element. This cascading priority scheme is predictable.
The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type
(MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998). The W3C operates a
free CSS validation service for CSS documents.[5]
In addition to HTML, other markup languages support the use of CSS including XHTML, plain XML, SVG,
and XUL.
After HTML and CSS we need JavaScript to program the behaviour of web pages.
JavaScript was initially created to “make web pages alive”.
JavaSCRIOT often abbreviated as JS, is a programming language that is one of the core technologies of
the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on
the client side for webpage behavior, often incorporating third-party libraries. All major web
browsers have a dedicated JavaScript engine to execute the code on users' devices.
JavaScript is a high-level, often just-in-time compiled language that conforms to
the ECMAScript standard.[10] It has dynamic typing, prototype-based object-orientation, and first-class
functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming
styles. It has application programming interfaces (APIs) for working with text, dates, regular
expressions, standard data structures, and the Document Object Model (DOM).
The ECMAScript standard does not include any input/output (I/O), such as networking, storage,
or graphics facilities. In practice, the web browser or other runtime system provides JavaScript APIs for
I/O.
JavaScript engines were originally used only in web browsers, but are now core components of
some servers and a variety of applications. The most popular runtime system for this usage is Node.js.
Although Java and JavaScript are similar in name, syntax, and respective standard libraries, the two
languages are distinct and differ greatly in design.
Here, we have all different modules and functionality. So, let see each and every module
and the integrity of the modules.
◼ User Module
◼ Admin Module
If we combine the entire above listed module then obly our half of the system gets ready.
User module
In this module the user can register them self to the website, users can login, users can
stream songs and user can play and listen song.
3.2 Data design
In this data design we will see the how we organize the data, managing the data, and
manipulating of the data.
E-R Diagram
3.2.2 Data Integrity and Constraints
Now we will see and discuss the structure of database and how we manage all the
data. For database we can use any server as per the developer or the client requirement.
Mostly it Depends on the developer because developer know which database server is more
feasible for the client. PHP ensure it.
3.3 Procedural Design
3.3.1 Use case Diagram
3.4. User Interface Design
Home page
welcome.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<body>
<header>
<div class="menu_side">
<div class="playlist">
<h4 class="active"><span></span><i class="bi bi-music-note-beamed"></i> Playlist</h4>
<div class="menu_song">
<li class="songItem">
<span>01</span>
</li>
<li class="songItem">
<span>02</span>
<img src="img/2.jpg" alt="">
</h5>
<i class="bi playListPlay bi-play-circle-fill" id="2"></i>
</li>
<li class="songItem">
<span>03</span>
</h5>
<li class="songItem">
<span>04</span>
<img src="img/2.jpg" alt="">
</li>
<li class="songItem">
<span>05</span>
</h5>
<li class="songItem">
<span>06</span>
<span>07</span>
<img src="img/2.jpg" alt="">
</h5>
<i class="bi playListPlay bi-play-circle-fill" id="7"></i>
</li>
</div>
</div>
<div class="song_side">
<nav>
<ul>
<li>Discover <span></span></li>
<li>MY LIBRARY</li>
<li>RADIO</li>
</ul>
<div class="search">
<div class="content">
On My Way
</div>
</div>
<div class="user">
</nav>
<div class="content">
<h1>Alen Walker-Fade</h1>
<p>You were the shadow to my light did you feel us Another start you fade <br> Away afraid our aim is
<button>FOLLOW</button>
</div>
</div>
<div class="popular_song">
<div class="h4">
<h4>Popular Song</h4>
<div class="btn_s">
</div>
</div>
<div class="pop_song">
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
</h5>
</li>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
</li>
<li class="songItem">
<div class="img_play">
<h5>On My Way<br>
</li>
<li class="songItem">
<div class="img_play">
</h5>
</li>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
<li class="songItem">
<div class="img_play">
</div>
<h5>On My Way<br>
</h5>
</li>
</div>
</div>
<div class="popular_artists">
<div class="h4">
<h4>Popular Artists</h4>
<div class="btn_s">
</div>
</li>
<li>
</li>
<li>
<img src="img/justin-bieber-lede.jpg" alt="">
</li>
<li>
<img src="img/guru.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/neha.jpg" alt="">
</li>
<li>
<img src="img/jubin Nautiyal.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/dhvani.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/akhil.jpg" alt="">
</li>
<li>
<img src="img/alan.jpg" alt="">
</li>
<li>
<img src="img/guru.jpg" alt="">
</li>
</div>
</div>
</div>
<div class="master_play">
<div class="wave1"></div>
<div class="wave1"></div>
<div class="wave1"></div>
</div>
<div class="icon">
<i class="bi shuffle bi-music-note-beamed">next</i>
</div>
<span id="currentStart">0:00</span>
<div class="bar">
<div class="dot"></div>
</div>
<span id="currentEnd">0:30</span>
<div class="vol">
<div class="vol_bar"></div>
</div>
</div>
</header>
<script src="app.js"></script>
<script>
menu_list_active_button.addEventListener('click', () => {
if (xm.matches) {
menu_side.style.transform = "unset";
menu_list_active_button.style.opacity = 0;
})
song_side.addEventListener('click', () => {
if (xm.matches) {
menu_side.style.transform = "translateX(-100%)";
menu_list_active_button.style.opacity = 1;
}
})
</script>
</body>
</html>
STYLE.CSS
/* Google Font "poppins" */
@import
url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,
400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
padding: 0;
margin: 0;
box-sizing: border-box;
body {
width: 100%;
height: 100vh;
background: #121213;
display: grid;
place-items: center;
}
header {
position: relative;
width: 85%;
height: 95%;
flex-wrap: wrap;
overflow: hidden;
}
header .menu_side,
.song_side {
width: 25%;
height: 90%;
/* border: 1px solid #fff; */
background: #111727;
box-shadow: 5px 0px 2px #090f1f;
color: #fff;
header .song_side {
width: 75%;
background: #0b1320;
header .menu_side h6 {
display: none;
header .master_play {
width: 100%;
height: 10%;
}
header .menu_side h1 {
font-size: 20px;
font-size: 14px;
font-weight: 400;
padding-bottom: 10px;
color: #4c5262;
cursor: pointer;
display: flex;
align-items: center;
transition: .3s linear;
}
header .menu_side .playlist h4:hover {
color: #fff;
margin-right: 35px;
}
header .menu_side .playlist h4 span::before {
content: '';
position: absolute;
width: 4px;
height: 4px;
top: -4px;
display: none;
}
color: #36e2ec;
}
display: none;
}
display: flex;
margin-right: 20px;
margin-top: 40px;
overflow: auto;
}
header .menu_side .menu_song::-webkit-scrollbar {
display: none;
position: relative;
padding: 5px 0px 5px 20px;
display: flex;
align-items: center;
margin-bottom: 10px;
cursor: pointer;
}
header .menu_side .menu_song li:hover {
font-size: 12px;
font-weight: 600;
color: #4c5262;
height: 32px;
margin-left: 25px;
}
font-size: 11px;
margin-left: 15px;
width: 170px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
header .menu_side .menu_song li h5 .subtitle {
font-size: 9px;
color: #4c5262;
}
right: 15px;
header .master_play {
display: flex;
align-items: center;
padding: 0px 20px;
}
height: 30px;
padding-bottom: 5px;
display: flex;
align-items: flex-end;
margin-right: 10px;
width: 3px;
height: 10px;
background: #36e2ec;
margin-right: 3px;
border-radius: 10px 10px 0px 0px;
animation: unset;
{
header .master_play .wave .wave1:nth-child(2) {
height: 13px;
margin-right: 3.5px;
animation-delay: .4s;
height: 8px;
animation-delay: .8s;
}
/* javascript classes */
header .master_play .active1 .wave1 {
}
header .master_play .active1 .wave1:nth-child(2) {
animation-delay: .4s;
}
animation-delay: .8s;
}
@keyframes wave {
0% {
height: 10px;
}
50% {
height: 15px;
100% {
height: 10px;
width: 35px;
height: 35px;
}
header .master_play h5 {
width: 130px;
/* border: 1px solid #fff; */
margin-left: 15px;
color: #fff;
line-height: 17px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-size: 11px;
color: #4c5262;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
color: #fff;
outline: none;
display: flex;
align-items: center;
}
header .master_play .icon .bi {
cursor: pointer;
outline: none;
font-size: 17px;
margin-right: 10px;
width: 17.5px;
overflow: hidden;
display: flex;
align-items: center;
}
header .master_play .icon #download_music {
text-decoration: none;
color: #fff;
font-size: 20px;
margin-left: 10px;
}
header .master_play .icon .bi:nth-child(3) {
border-radius: 50%;
padding: 1px 5px 0px 7px;
color: #fff;
width: 32px;
/* border: 1px solid #fff; */
font-size: 11px;
font-weight: 400;
}
header .master_play #currentStart {
position: relative;
width: 43%;
height: 2px;
background: #36e2ec;
width: 0%;
height: 100%;
top: 0;
transition: 1s linear;
position: absolute;
width: 5px;
height: 5px;
background: #36e2ec;
border-radius: 50%;
left: 0%;
top: -1.5px;
transition: 1s linear;
}
content: '';
position: absolute;
width: 15px;
height: 15px;
border-radius: 50%;
left: -7px;
top: -6.5px;
box-shadow: inset 0px 0px 3px #36e2ec;
width: 100%;
top: -7px;
left: 0;
cursor: pointer;
z-index: 99999999999999999999999999999999999999999;
/* transition: 3s linear; */
opacity: 0;
}
header .master_play .vol {
position: relative;
width: 100px;
height: 2px;
margin-left: 50px;
}
position: absolute;
color: #fff;
font-size: 25px;
top: -17px;
left: -30px;
width: 100%;
top: -6px;
left: 0;
cursor: pointer;
z-index: 99999999999999999999999999;
opacity: 0;
position: absolute;
background: #36e2ec;
width: 100%;
height: 100%;
top: 0;
transition: 1s linear
}
header .master_play .vol .dot {
position: absolute;
width: 5px;
height: 5px;
background: #36e2ec;
border-radius: 50%;
left: 100%;
top: -1.5px;
transition: 1s linear;
}
position: absolute;
width: 15px;
height: 15px;
border: 1px solid #36e2ec;
border-radius: 50%;
left: -7px;
top: -6.5px;
}
Header .song_side {
z-index: 2;
}
header .song_side::before {
content: '';
position: absolute;
width: 100%;
height: 300px;
background: url('bg.png');
z-index: -1;
width: 90%;
height: 10%;
align-items: center;
justify-content: space-between;
}
list-style: none;
position: relative;
font-size: 13px;
color: #4c5262;
margin-right: 25px;
cursor: pointer;
transition: .3s linear;
color: #fff;
}
color: #fff;
position: absolute;
width: 100%;
height: 2.5px;
background: #36e2ec;
bottom: -5px;
left: 0;
border-radius: 20px;
}
position: relative;
width: 40%;
border-radius: 20px;
color: gray;
}
header .song_side nav .search::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
backdrop-filter: blur(5px);
z-index: -1;
}
header .song_side nav .search .search_results {
position: absolute;
width: 100%;
height: 200px;
border-radius: 10px;
overflow: auto;
}
header .song_side nav .search .search_results::-webkit-scrollbar {
display: none;
width: 100%;
min-height: 45px;
/* border: 1px solid #fff; */
display: flex;
align-items: center;
background: rgb(184, 184, 184, .1);
margin-bottom: 5px;
text-decoration: none;
display: none;
height: 35px;
border-radius: 5px;
width: 80%;
height: 100%;
/* border: 1px solid #fff; */
padding: 0;
font-size: 13px;
font-weight: 600;
color: #fff;
}
font-size: 11px;
color: #a4a8b4;
font-weight: 500;
}
header .song_side nav .search .bi {
font-size: 13px;
background: none;
border: none;
outline: none;
padding: 0px 10px;
color: #fff;
font-size: 12px;
position: relative;
width: 30px;
height: 30px;
height: 100%;
border-radius: 50%;
box-shadow: 2px 2px 8px #121213;
width: 90%;
height: 30%;
font-weight: 600;
}
font-size: 11px;
font-weight: 400;
color: #4c5262;
margin: 5px;
}
header .song_side .content .buttons {
margin-top: 15px;}
header .song_side .content .buttons button {
width: 130px;
height: 30px;
border-radius: 20px;
background: #5adae0;
color: #fff;
cursor: pointer;
background: none;
color: #36e2ec;
color: #36e2ec;
}
header .song_side .content .buttons button:nth-child(2):hover {
background: #36e2ec;
color: #fff;
width: 90%;
height: auto;
margin: auto;
margin-top: 15px;
align-items: center;
justify-content: space-between;
}
header .song_side .popular_song .h4 .bi {
color: #a4a8b4;
cursor: pointer;
transition: .3s linear;
}
header .song_side .popular_song .h4 .bi:hover {
color: #fff;
}
header .song_side .popular_song .pop_song {
width: 100%;
height: 150px;
margin-top: 15px;
display: flex;
scroll-behavior: smooth;
}
header .song_side .popular_song .pop_song::-webkit-scrollbar {
display: none;
}
header .song_side .popular_song .pop_song li {
min-width: 100px;
height: 140px;
list-style-type: none;
margin-right: 10px;
position: relative;
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
header .song_side .popular_song .pop_song li .img_play .bi {
position: absolute;
font-size: 20px;
cursor: pointer;
opacity: 0;
}
opacity: 1;
font-size: 10px;
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
font-size: 9px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #4c5262;
margin: auto;
margin-top: 15px;
}
header .song_side .popular_artists .h4 {
display: flex;
align-items: center;
justify-content: space-between;
}
color: #fff;
}
header .song_side .popular_artists .item {
width: 100%;
height: auto;
margin-top: 15px;
display: flex;
scroll-behavior: smooth;
}
header .song_side .popular_artists .item::-webkit-scrollbar {
display: none;
}
header .song_side .popular_artists .item li {
list-style-type: none;
position: relative;
min-width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 20px;
cursor: pointer;
}
header .song_side .popular_artists .item li img {
width: 100%;
height: 100%;
border-radius: 50%;
}
/* login style */
header .left_bx1,
.right_bx1 {
position: relative;
width: 65%;
height: 100%;
align-items: center;
justify-content: center;
header .left_bx1 {
width: 35%;
background: #fff;
width: 75%;
height: auto;
border: 1px solid #000;
background: #fff;
}
width: 100%;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
margin-top: 20px;
font-size: 14px;
}
header .left_bx1 .content .card input{
width: 100%;
margin-top: 5px;
}
@import
url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,
400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
width: 100%;
height: 100vh;
background: #121213;
display: grid;
place-items: center;
header {
position: relative;
width: 85%;
height: 95%;
flex-wrap: wrap;
overflow: hidden;
}
header .menu_side,
.song_side {
width: 25%;
height: 90%;
background: #111727;
color: #fff;
}
header .song_side {
width: 75%;
background: #0b1320;
}
header .master_play {
width: 100%;
height: 10%;
background: #111727;
box-shadow: 0px 3px 8px #090f1f;
}
header .menu_side h1 {
font-size: 20px;
font-size: 14px;
font-weight: 400;
padding-bottom: 10px;
color: #4c5262;
cursor: pointer;
display: flex;
align-items: center;
transition: .3s linear;
margin-right: 35px;
content: '';
position: absolute;
width: 4px;
height: 4px;
border-radius: 50%;
top: -4px;
}
header .menu_side .playlist h4 .bi {
display: none;
}
header .menu_side .playlist .active {
color: #36e2ec;
}
display: none;
}
header .menu_side .playlist .active .bi {
display: flex;
margin-right: 20px;
width: 100%;
height: 420px;
margin-top: 40px;
overflow: auto;
position: relative;
display: flex;
align-items: center;
margin-bottom: 10px;
cursor: pointer;
transition: .3s linear;
}
header .menu_side .menu_song li span {
font-size: 12px;
font-weight: 600;
color: #4c5262;
}
margin-left: 25px;
}
font-size: 11px;
margin-left: 15px;
width: 170px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
header .menu_side .menu_song li h5 .subtitle {
font-size: 9px;
color: #4c5262;
}
position: absolute;
right: 15px;
header .master_play {
display: flex;
align-items: center;
width: 30px;
height: 30px;
/* border: 1px solid #fff; */
padding-bottom: 5px;
display: flex;
align-items: flex-end;
margin-right: 10px;
}
width: 3px;
height: 10px;
background: #36e2ec;
margin-right: 3px;
border-radius: 10px 10px 0px 0px;
animation: unset;
}
header .master_play .wave .wave1:nth-child(2) {
height: 13px;
margin-right: 3.5px;
animation-delay: .4s;
}
height: 8px;
animation-delay: .8s;
/* javascript classes */
header .master_play .active1 .wave1 {
}
header .master_play .active1 .wave1:nth-child(2) {
animation-delay: .4s;
}
header .master_play .active1 .wave1:nth-child(3) {
animation-delay: .8s;
}
@keyframes wave {
0% {
height: 10px;
50% {
height: 15px;
}
100% {
height: 10px;
}
}
height: 35px;
header .master_play h5 {
width: 130px;
line-height: 17px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
}
font-size: 11px;
color: #4c5262;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
header .master_play .icon {
font-size: 20px;
color: #fff;
margin: 0px 20px 0px 40px;
outline: none;
display: flex;
align-items: center;
cursor: pointer;
outline: none;
}
header .master_play .icon .shuffle {
font-size: 17px;
margin-right: 10px;
width: 17.5px;
overflow: hidden;
display: flex;
align-items: center;
text-decoration: none;
color: #fff;
font-size: 20px;
margin-left: 10px;
}
border-radius: 50%;
color: #fff;
width: 32px;
font-size: 11px;
font-weight: 400;
width: 43%;
height: 2px;
background: rgb(105, 105, 170, .1);
position: absolute;
background: #36e2ec;
width: 0%;
height: 100%;
top: 0;
transition: 1s linear;
}
width: 5px;
height: 5px;
background: #36e2ec;
border-radius: 50%;
left: 0%;
top: -1.5px;
transition: 1s linear;
}
header .master_play .bar .dot::before {
content: '';
position: absolute;
width: 15px;
height: 15px;
border-radius: 50%;
left: -7px;
top: -6.5px;
position: absolute;
width: 100%;
top: -7px;
left: 0;
cursor: pointer;
z-index: 99999999999999999999999999999999999999999;
/* transition: 3s linear; */
opacity: 0;
position: relative;
width: 100px;
height: 2px;
background: rgb(105, 105, 170, .1);
margin-left: 50px;
color: #fff;
font-size: 25px;
top: -17px;
left: -30px;
}
header .master_play .vol input {
position: absolute;
width: 100%;
top: -6px;
left: 0;
cursor: pointer;
z-index: 99999999999999999999999999;
opacity: 0;
}
header .master_play .vol .vol_bar {
position: absolute;
background: #36e2ec;
width: 100%;
height: 100%;
top: 0;
transition: 1s linear
width: 5px;
height: 5px;
background: #36e2ec;
border-radius: 50%;
left: 100%;
top: -1.5px;
transition: 1s linear;
content: '';
position: absolute;
width: 15px;
height: 15px;
border-radius: 50%;
left: -7px;
top: -6.5px;
box-shadow: inset 0px 0px 3px #36e2ec;
header .song_side {
z-index: 2;
}
header .song_side::before {
content: '';
position: absolute;
width: 100%;
height: 300px;
background: url('bg.png');
z-index: -1;
}
header .song_side nav {
width: 90%;
height: 10%;
margin: auto;
display: flex;
align-items: center;
justify-content: space-between;
}
header .song_side nav ul {
display: flex;
}
header .song_side nav ul li {
list-style: none;
position: relative;
font-size: 13px;
color: #4c5262;
margin-right: 25px;
cursor: pointer;
}
header .song_side nav ul li:hover {
color: #fff;
}
header .song_side nav ul li span {
position: absolute;
width: 100%;
height: 2.5px;
background: #36e2ec;
bottom: -5px;
left: 0;
border-radius: 20px;
}
header .song_side nav .search {
position: relative;
width: 40%;
color: gray;
content: '';
position: absolute;
width: 100%;
height: 100%;
background: rgb(184, 184, 184, .1);
border-radius: 20px;
backdrop-filter: blur(5px);
z-index: -1;
width: 100%;
height: 200px;
margin-top: 10px;
border-radius: 10px;
overflow: auto;
}
display: none;
}
min-height: 45px;
display: flex;
align-items: center;
display: none;}
header .song_side nav .search .search_results .card img {
width: 35px;
height: 35px;
border-radius: 5px;
}
width: 80%;
height: 100%;
padding: 0;
font-size: 13px;
font-weight: 600;
color: #fff;
}
font-size: 11px;
color: #a4a8b4;
font-weight: 500;
}
header .song_side nav .search .bi {
font-size: 13px;
background: none;
border: none;
outline: none;
color: #fff;
font-size: 12px;
}
header .song_side nav .user {
position: relative;
width: 30px;
height: 30px;
/* border: 1px solid #fff; */
border-radius: 50%;
}
header .song_side nav .user img {
width: 100%;
height: 100%;
border-radius: 50%;
}
header .song_side .content {
width: 90%;
height: 30%;
margin: auto;
padding-top: 20px;
}
font-size: 25px;
font-weight: 600;}
font-size: 11px;
font-weight: 400;
color: #4c5262;
margin: 5px;
}
margin-top: 15px;
width: 130px;
height: 30px;
border: 2px solid #36e2ec;
outline: none;
border-radius: 20px;
background: #5adae0;
color: #fff;
cursor: pointer;
color: #36e2ec;
}
header .song_side .content .buttons button:nth-child(2) {
background: none;
color: #36e2ec;
background: #36e2ec;
color: #fff;
width: 90%;
height: auto;
margin: auto;
margin-top: 15px;
}
header .song_side .popular_song .h4 {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
color: #fff;
}
header .song_side .popular_song .pop_song {
width: 100%;
height: 150px;
margin-top: 15px;
display: flex;
/* border: 1px solid #fff; */
overflow: auto;
scroll-behavior: smooth;
}
header .song_side .popular_song .pop_song::-webkit-scrollbar {
display: none;
}
header .song_side .popular_song .pop_song li {
min-width: 100px;
height: 140px;
list-style-type: none;
margin-right: 10px;
position: relative;
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
header .song_side .popular_song .pop_song li .img_play img {
width: 100%;
height: 100%;
}
position: absolute;
font-size: 20px;
cursor: pointer;
opacity: 1;
}
line-height: 15px;
font-size: 10px;
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #4c5262;
width: 90%;
height: auto;
margin-top: 15px;
}
header .song_side .popular_artists .h4 {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
color: #fff;
}
header .song_side .popular_artists .item {
width: 100%;
height: auto;
margin-top: 15px;
display: flex;
/* border: 1px solid #fff; */
overflow: auto;
scroll-behavior: smooth;
}
header .song_side .popular_artists .item::-webkit-scrollbar {
display: none;
}
header .song_side .popular_artists .item li {
list-style-type: none;
position: relative;
min-width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 20px;
cursor: pointer;
width: 100%;
height: 100%;
border-radius: 50%;
/* login style */
header .left_bx1,
.right_bx1 {
position: relative;
width: 65%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
header .left_bx1 {
width: 35%;
background: #fff;
}
header .left_bx1 .content {
width: 75%;
height: auto;
border: none;
background: #fff;
}
align-items: flex-start;
flex-direction: column;
justify-content: center;
margin-top: 20px;
}
header .left_bx1 .content .card label{
font-size: 14px;
width: 100%;
margin-top: 5px;
}
margin-top: 30px;
padding: 8px 20px;
color: #fff;
background: #111727;
width: 100%;
cursor: pointer;
display: flex;
align-items: center;
margin-top: 10px;
}
margin-left: 5px;
font-size: 13px;
}
header .left_bx1 .content p{
margin-top: 90px;
text-align: center;
font-size: 13px;
}
font-weight: bold;
}
position: absolute;
background: #5adae0;
color: #000;
right: 0;
bottom: 20px;
font-size: 13px;
}
APP.JS
const music = new Audio('audio/1.mp3');
// music.play();
const songs = [{
id: '1',
songName: ` On My Way <br>
<div class="subtitle">Alan Walker</div>`,
poster: "img/1.jpg"
},
{
id: '2',
poster: "img/2.jpg"
},
id: "3",
poster: "img/3.jpg",
},
id: "4",
songName: `Warriyo - Mortals <br><div class="subtitle">Mortals</div>`,
poster: "img/4.jpg",
},
{
id: "5",
songName: `Ertugrul Gazi <br><div class="subtitle">Ertugrul</div>`,
poster: "img/5.jpg",
},
{
id: "6",
poster: "img/6.jpg",
},
id: "7",
songName: `Agar Tum Sath Ho <br><div class="subtitle">Tamashaa</div>`,
poster: "img/7.jpg",
},
{
id: "8",
},
{
id: "9",
poster: "img/9.jpg",
},
id: "10",
songName: `Duniya <br><div class="subtitle">Luka Chuppi</div>`,
poster: "img/10.jpg",
},
{
id: "11",
},
id: "12",
songName: `Putt Jatt Da <br><div class="subtitle">Putt Jatt Da</div>`,
poster: "img/12.jpg",
},
{
id: "13",
songName: `Baarishein <br><div class="subtitle">Atif Aslam</div>`,
poster: "img/13.jpg",
},
{
id: "14",
poster: "img/14.jpg",
},
id: "15",
songName: `Lut Gaye <br><div class="subtitle">Jubin Nautiyal</div>`,
poster: "img/15.jpg",
},
{
id: "16",
},
{
id: "17",
songName: ` Batao Yaad Hai Tumko Wo Jab Dil Ko Churaya Tha <br><div class="subtitle"> Rahat Fateh Ali Khan</div>`,
poster: "img/17.jpg",
},
id: "18",
songName: `Mere Dhol Judaiyan<br><div class="subtitle">Ali Sethi Seha Gill</div>`,
poster: "img/18.jpg",
},
{
id: "19",
songName: `Eh Munde Pagal Ne Saare <br><div class="subtitle">Ap Dhillon, Gurinder Gill, Shinda Kahlon</div>`,
poster: "img/19.jpg",
},
id: "20",
songName: `Dunny 82K <br><div class="subtitle">Ap Dhillon, Gurinder Gill, Shinda Kahlon</div>`,
poster: "img/20.jpg",
}
]
Array.from(document.getElementsByClassName('songItem')).forEach((e, i) => {
e.getElementsByTagName('img')[0].src = songs[i].poster;
e.getElementsByTagName('h5')[0].innerHTML = songs[i].songName;
});
songs.forEach(element => {
// console.log(poster);
let card = document.createElement('a');
card.classList.add('card');
<div class="content">
${songName}
</div> `;
search_results.appendChild(card);
});
input.addEventListener('keyup', ()=>{
items[index].style.display = "flex";
} else {
items[index].style.display = "none";
}
if (input.value == 0) {
search_results.style.display = "none";
} else {
search_results.style.display =
}
})
// search data end
masterPlay.addEventListener('click', () => {
music.play();
wave.classList.add('active1');
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
} else {
music.pause();
wave.classList.remove('active1');
masterPlay.classList.add('bi-play-fill');
masterPlay.classList.remove('bi-pause-fill');
}
});
Array.from(document.getElementsByClassName('playListPlay')).forEach((el) => {
el.classList.add('bi-play-circle-fill');
el.classList.remove('bi-pause-circle-fill');
})
}
Array.from(document.getElementsByClassName('songItem')).forEach((el) => {
})
}
let index = 0;
let poster_master_play = document.getElementById('poster_master_play');
// console.log(index);
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
});
songTitles.forEach(elss => {
download_music.setAttribute('download', songName);
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
});
})
music.addEventListener('timeupdate', () => {
sec1 = `0${sec1}`;
}
currentEnd.innerText = `${min1}:${sec1}`;
sec2 = `0${sec2}`;
}
currentStart.innerText = `${min2}:${sec2}`;
dot.style.left = `${seekbar}%`;
});
seek.addEventListener('change', () => {
music.currentTime = seek.value * music.duration / 100;
});
if (vol.value == 0) {
vol_icon.classList.remove('bi-volume-up-fill');
vol_icon.classList.remove('bi-volume-down-fill');
vol_icon.classList.add('bi-volume-off-fill');
}
if (vol.value > 0) {
vol_icon.classList.remove('bi-volume-up-fill');
vol_icon.classList.add('bi-volume-down-fill');
vol_icon.classList.remove('bi-volume-off-fill');
vol_icon.classList.add('bi-volume-up-fill');
vol_icon.classList.remove('bi-volume-down-fill');
vol_icon.classList.remove('bi-volume-off-fill');
}
let vol_a = vol.value;
vol_bar.style.width = `${vol_a}%`;
vol_dot.style.left = `${vol_a}%`;
music.volume = vol_a / 100;
});
let back = document.getElementById('back');
back.addEventListener('click', () => {
index -= 1;
if (index < 1) {
index = Array.from(document.getElementsByClassName('songItem')).length;
}
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
});
songTitles.forEach(elss => {
title.innerHTML = songName;
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
})
next.addEventListener('click', () => {
index++;
if (index > Array.from(document.getElementsByClassName('songItem')).length) {
index = 1;
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
songTitles.forEach(elss => {
let { songName } = elss;
title.innerHTML = songName;
});
makeAllBackground();
Array.from(document.getElementsByClassName('songItem'))[index - 1].style.background = "rgb(105, 105, 105, .1)";
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
});
pop_song.scrollLeft += 330;
});
pop_song_left.addEventListener('click', () => {
pop_song.scrollLeft -= 330;
});
let pop_art_left = document.getElementById('pop_art_left');
Artists_bx.scrollLeft += 330;
});
pop_art_left.addEventListener('click', () => {
Artists_bx.scrollLeft -= 330;
});
let shuffle = document.getElementsByClassName('shuffle')[0];
shuffle.addEventListener('click', ()=>{
let a = shuffle.innerHTML;
switch (a) {
case "next":
shuffle.classList.add('bi-arrow-repeat');
shuffle.classList.remove('bi-music-note-beamed');
shuffle.classList.remove('bi-shuffle');
shuffle.innerHTML = 'repeat';
break
case "repeat":
shuffle.classList.remove('bi-arrow-repeat');
shuffle.classList.remove('bi-music-note-beamed');
shuffle.classList.add('bi-shuffle');
shuffle.innerHTML = 'random';
break;
case "random":
shuffle.classList.remove('bi-arrow-repeat');
shuffle.classList.add('bi-music-note-beamed');
shuffle.classList.remove('bi-shuffle');
shuffle.innerHTML = 'next';
break;
});
const next_music = () => {
if (index == songs.length) {
index = 1
} else {
index++;
}
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
let songTitles = songs.filter((els) => {
});
songTitles.forEach(elss => {
title.innerHTML = songName;
download_music.setAttribute('download', songName);
});
makeAllBackground();
Array.from(document.getElementsByClassName('songItem'))[index - 1].style.background = "rgb(105, 105, 105, .1)";
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
const repeat_music = () => {
index;
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
});
songTitles.forEach(elss => {
download_music.setAttribute('download', songName);
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
if (index == songs.length) {
index = 1
} else {
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
let songTitles = songs.filter((els) => {
});
songTitles.forEach(elss => {
download_music.setAttribute('download', songName);
});
makeAllBackground();
Array.from(document.getElementsByClassName('songItem'))[index - 1].style.background = "rgb(105, 105, 105, .1)";
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
music.addEventListener('ended', ()=>{
let b = shuffle.innerHTML;
switch (b) {
case 'repeat':
repeat_music();
break;
case 'next':
next_music();
break;
case 'random':
random_music();
break;
})
Signup.php
<?php
session_start();
include('db_connect.php');
$msg = false;
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$user_name = $_POST['user_name'];
$user_email = $_POST['user_email'];
$user_password = $_POST['user_password'];
$user_re_password = $_POST['user_re_password'];
if (!empty($user_name) && !empty($user_email) && !empty($user_password) && !is_numeric($user_name)) {
$query = "insert into user (user, email, password) VALUES ('$user_name', '$user_email', '$user_password')";
mysqli_query($con, $query);
header("Location: index.php");
} else {
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<header>
<div class="left_bx1">
<div class="content">
<form method="post">
<h3>Sign Up</h3>
<div class="card">
<label for="name">Name</label>
<input type="text" name="user_name" placeholder="Enter Your Username..." required>
</div>
<div class="card">
<label for="email">Email</label>
</div>
<div class="card">
<label for="password">Password</label>
<label for="re-password">Re-Password</label>
</div>
</div>
</div>
<div class="right_bx1">
<?php
echo ('<h3>'.$msg.'</h3>');
?>
</div>
</header>
</body>
</html>
MEDIA.CSS
@media screen and (max-width: 1200px) {
header {
width: 95%;
header .menu_side,
.song_side {
width: 30%;
}
header .song_side {
width: 70%;
}
height: 18%;
}
header .menu_side h6 {
display: none;
header .menu_side {
z-index: 999;
width: 40%;
position: absolute;
transition: 1s linear;
transform: translateX(-100%);
}
header .song_side {
width: 100%;
}
header .master_play {
position: absolute;
bottom: 0;
}
header .menu_side h6 {
position: absolute;
right: -40px;
bottom: 10px;
width: 40px;
height: 40px;
background: #111727;
align-items: center;
justify-content: center;
font-size: 18px;
cursor: pointer;
transition: 1s linear;
z-index: 999999999999;
color: #fff;
header {
width: 100%;
height: 100vh;
margin-right: 10px;
}
width: auto;
}
header .menu_side {
width: 60%;
}
header .master_play {
z-index: 999999999999999999999999999;
}
position: absolute;
top: -46px;
right: 30%;
content: '';
position: absolute;
width: 200px;
height: 180px;
background: #111727;
z-index: -1;
border-radius: 50% 50% 0% 0%;
left: -20%;
position: absolute;
top: -90px;
width: 40px;
height: 40px;
right: 40%;
display: flex;
width: 150px;
margin-right: 5px;
}
header .menu_side {
width: 70%;
}
header .song_side .popular_song {
margin-top: 40px;
}
@media screen and (max-width: 412px) {
font-size: 10px;
margin-right: 7px;
header .menu_side {
width: 80%;
INDEX.PHP
<?php
session_start();
include('db_connect.php');
$msg = false;
if (isset($_POST['user_name'])) {
$user_name = $_POST['user_name'];
$user_password = $_POST['user_password'];
$query = "select * from user where user = '".$user_name."' AND password = '".$user_password."' limit 1";
header('Location: welcome.php');
} else {
$msg = "Inccorect Password";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<header>
<div class="left_bx1">
<div class="content">
<form method="post">
<h3>Login</h3>
<div class="card">
<label for="name">Name</label>
</div>
<div class="card">
<label for="password">Password</label>
<div class="check">
</div>
</div>
<div class="right_bx1">
<img src="login_png.jpg" alt="">
?>
</div>
</header>
</body>
</html>
DB COONECT PHP
<?php
$server_name = "localhost";
$user_name = 'root';
$user_pass = '';
$database_name = "music_user";
$con = mysqli_connect($server_name, $user_name, $user_pass, $database_name);
if (!$con) {
// else {
// echo ('Database Succesfully Connected');
// }
?>
Arjit.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Music Website</title>
<style>
header .song_side::before {
background: url('arjit_bg.png');
</style>
</head>
<body>
<header>
<div class="menu_side">
<h1>Playlist</h1>
<div class="playlist">
</div>
<div class="menu_song">
<li class="songItem">
<span>01</span>
</h5>
<i class="bi playListPlay bi-play-circle-fill" id="1"></i>
</li>
<li class="songItem">
<span>02</span>
</h5>
<span>03</span>
</li>
<li class="songItem">
<span>04</span>
</h5>
<i class="bi playListPlay bi-play-circle-fill" id="4"></i>
</li>
<li class="songItem">
<span>05</span>
<img src="img/2.jpg" alt="">
</h5>
</li>
<li class="songItem">
<span>06</span>
</h5>
<i class="bi playListPlay bi-play-circle-fill" id="6"></i>
</li>
<li class="songItem">
<span>07</span>
</h5>
<span>08</span>
</li>
</div>
</div>
<div class="song_side">
<nav>
<ul>
<li>Discover <span></span></li>
<li>MY LIBRARY</li>
<li>RADIO</li>
</ul>
<div class="search">
<i class="bi bi-search"></i>
</div>
<div class="user">
</div>
</nav>
<div class="content">
<h1>Arjit Singh</h1>
<p>You were the shadow to my light did you feel us Another start you fade <br> Away afraid our aim is out of sight Wanna see us
Alive</p>
<div class="buttons">
<button>PLAY</button>
<button>FOLLOW</button>
</div>
</div>
<div class="popular_song">
<div class="h4">
<h4>Popular Song</h4>
<div class="btn_s">
</div>
<div class="pop_song">
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
<div class="subtitle">Alan Walker</div>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
<i class="bi playListPlay bi-play-circle-fill" id="10"></i>
</div>
<h5>On My Way<br>
</li>
<li class="songItem">
<div class="img_play">
<h5>On My Way<br>
</li>
<li class="songItem">
<div class="img_play">
<h5>On My Way<br>
</h5>
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</li>
<li class="songItem">
<div class="img_play">
<img src="img/2.jpg" alt="">
</div>
<h5>On My Way<br>
</h5>
</li>
</div>
</div>
<div class="popular_artists">
<div class="h4">
<h4>Popular Artists</h4>
<div class="btn_s">
</div>
<li>
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
<li>
</li>
<li>
<img src="img/arjit.jpg" alt="">
</li>
</div>
</div>
</div>
<div class="master_play">
<div class="wave" id="wave">
<div class="wave1"></div>
<div class="wave1"></div>
<div class="wave1"></div>
</div>
<div class="icon">
</div>
<span id="currentStart">0:00</span>
<div class="bar">
<input type="range" id="seek" min="0" max="100">
<div class="dot"></div>
</div>
<span id="currentEnd">0:30</span>
<div class="vol">
<i class="bi bi-volume-up-fill" id="vol_icon"></i>
<div class="vol_bar"></div>
<div class="dot" id="vol_dot"></div>
</div>
</div>
</header>
<script src="arjit.js"></script>
</body>
</html>
arjit.js
const music = new Audio('audio/1.mp3');
// music.play();
const songs = [{
id: '1',
},
{
id: '2',
},
id: "3",
songName: `Cartoon - On & On <br><div class="subtitle"> Daniel Levi</div>`,
poster: "img/arjit/3.jpg",
},
id: "4",
},
{
id: "5",
poster: "img/arjit/5.jpg",
},
id: "6",
songName: `Electronic Music <br><div class="subtitle">Electro</div>`,
poster: "img/arjit/6.jpg",
},
id: "7",
id: "8",
songName: `Suna Hai <br><div class="subtitle">Neha Kakker</div>`,
poster: "img/arjit/8.jpg",
},
id: "9",
},
{
id: "10",
},
id: "11",
songName: `Lagdi Lahore Di <br><div class="subtitle">Street Dancer 3D</div>`,
poster: "img/arjit/11.jpg",
},
id: "12",
},
{
id: "13",
poster: "img/arjit/13.jpg",
},
id: "14",
songName: `Vaaste <br><div class="subtitle">Dhvani Bhanushali</div>`,
poster: "img/arjit/14.jpg",
},
id: "15",
Array.from(document.getElementsByClassName('songItem')).forEach((e, i) => {
e.getElementsByTagName('img')[0].src = songs[i].poster;
e.getElementsByTagName('h5')[0].innerHTML = songs[i].songName;
});
masterPlay.addEventListener('click', () => {
if (music.paused || music.currentTime <= 0) {
music.play();
wave.classList.add('active1');
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
} else {
music.pause();
wave.classList.remove('active1');
masterPlay.classList.add('bi-play-fill');
masterPlay.classList.remove('bi-pause-fill');
});
Array.from(document.getElementsByClassName('playListPlay')).forEach((el) => {
el.classList.add('bi-play-circle-fill');
el.classList.remove('bi-pause-circle-fill');
})
}
const makeAllBackground = () => {
Array.from(document.getElementsByClassName('songItem')).forEach((el) => {
let index = 0;
let poster_master_play = document.getElementById('poster_master_play');
Array.from(document.getElementsByClassName('playListPlay')).forEach((e) => {
index = el.target.id;
// console.log(index);
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/arjit/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/arjit/${index}.mp3`;
});
songTitles.forEach(elss => {
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
});
})
music.addEventListener('timeupdate', () => {
sec1 = `0${sec1}`;
currentEnd.innerText = `${min1}:${sec1}`;
sec2 = `0${sec2}`;
}
currentStart.innerText = `${min2}:${sec2}`;
let progressBar = parseInt((music_curr / music_dur) * 100);
seek.value = progressBar;
// console.log(seek.value);
dot.style.left = `${seekbar}%`;
});
seek.addEventListener('change', () => {
vol.addEventListener('change', () => {
if (vol.value == 0) {
vol_icon.classList.remove('bi-volume-up-fill');
vol_icon.classList.remove('bi-volume-down-fill');
vol_icon.classList.add('bi-volume-off-fill');
}
if (vol.value > 0) {
vol_icon.classList.remove('bi-volume-up-fill');
vol_icon.classList.add('bi-volume-down-fill');
vol_icon.classList.remove('bi-volume-off-fill');
}
if (vol.value > 50) {
vol_icon.classList.add('bi-volume-up-fill');
vol_icon.classList.remove('bi-volume-down-fill');
vol_icon.classList.remove('bi-volume-off-fill');
vol_bar.style.width = `${vol_a}%`;
vol_dot.style.left = `${vol_a}%`;
back.addEventListener('click', () => {
index -= 1;
if (index < 1) {
index = Array.from(document.getElementsByClassName('songItem')).length;
music.src = `audio/arjit/${index}.mp3`;
poster_master_play.src = `img/arjit/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
});
songTitles.forEach(elss => {
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
})
next.addEventListener('click', () => {
index++;
music.src = `audio/arjit/${index}.mp3`;
poster_master_play.src = `img/arjit/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
songTitles.forEach(elss => {
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
let pop_song_left = document.getElementById('pop_song_left');
pop_song_right.addEventListener('click', () => {
pop_song.scrollLeft += 330;
});
pop_song_left.addEventListener('click', () => {
pop_song.scrollLeft -= 330;
});
Artists_bx.scrollLeft += 330;
});
pop_art_left.addEventListener('click', () => {
Artists_bx.scrollLeft -= 330;
});
let shuffle = document.getElementsByClassName('shuffle')[0];
shuffle.addEventListener('click', ()=>{
let a = shuffle.innerHTML;
switch (a) {
case "next":
shuffle.classList.add('bi-arrow-repeat');
shuffle.classList.remove('bi-music-note-beamed');
shuffle.classList.remove('bi-shuffle');
shuffle.innerHTML = 'repeat';
break
case "repeat":
shuffle.classList.remove('bi-arrow-repeat');
shuffle.classList.remove('bi-music-note-beamed');
shuffle.classList.add('bi-shuffle');
shuffle.innerHTML = 'random';
break;
case "random":
shuffle.classList.remove('bi-arrow-repeat');
shuffle.classList.add('bi-music-note-beamed');
shuffle.classList.remove('bi-shuffle');
shuffle.innerHTML = 'next';
break;
}
});
if (index == songs.length) {
index = 1
} else {
index++;
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
let songTitles = songs.filter((els) => {
});
songTitles.forEach(elss => {
title.innerHTML = songName;
download_music.setAttribute('download', songName);
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
songTitles.forEach(elss => {
let { songName } = elss;
title.innerHTML = songName;
download_music.setAttribute('download', songName);
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
if (index == songs.length) {
index = 1
} else {
music.src = `audio/${index}.mp3`;
poster_master_play.src = `img/${index}.jpg`;
music.play();
masterPlay.classList.remove('bi-play-fill');
masterPlay.classList.add('bi-pause-fill');
download_music.href = `audio/${index}.mp3`;
title.innerHTML = songName;
download_music.setAttribute('download', songName);
});
makeAllBackground();
makeAllplays();
el.target.classList.remove('bi-play-circle-fill');
el.target.classList.add('bi-pause-circle-fill');
wave.classList.add('active1');
}
music.addEventListener('ended', ()=>{
let b = shuffle.innerHTML;
switch (b) {
case 'repeat':
repeat_music();
break;
case 'next':
next_music();
break;
case 'random':
random_music();
break;
})
The future scope of this project is very broad Few of them are:
◼ This can be implemented in application also.
◼ In future artist can created/add their songs by themselves.
◼ The user can make their own group.
◼ User can listen to other playlists
◼ Users can share their playlist with different users on the web.
◼ We can create podcasts and publish it.
◼ Two-step Verification
◼ Email Verification Security.
REFERENCE
1. https://www.w3schools.com/html/html_intro.asp
2. https://www.hindawi.com/journals/cin/2020/3062706/
3. https://en.wikipedia.org/wiki/HTML
4. https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/What_is_CSS
5. https://en.wikipedia.org/wiki/CSS
6. www.google.com
7. www.youtube.com
8. www.php
9. Various other sites.