Skip to content

Commit

Permalink
Created a music player
Browse files Browse the repository at this point in the history
  • Loading branch information
RachitSahu26 committed Jun 17, 2023
0 parents commit 6ce08e1
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 0 deletions.
Binary file added IMG-20221204-WA0010-01.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions music.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
*{
margin: 0;padding: 0;
}
body{
background-color: rgb(131, 130, 129);
}
.container{
background-color:white;
width:333px;
text-align: center;
margin-left: 550px;
margin-top:133px;
box-shadow: 0,0,0.3px rgba(0,0,0.8px);
padding: 20px;
/* padding-top: 10px; */
height: 550px;
border-radius: 20px;
}
.img-area {
margin-top: 33px;
/* object-fit: cover; */
background-color: yellow;
border-radius: 50%;
width: 250px;
margin-left: 40px;
height: 250px;
}
.img-area img{
border-radius: 50%;
object-fit: cover;
width: 100%;
height: 100%;
}

.music-control{
margin-top: 29px;
height: 73px;width: 300px;
/* background-color: greenyellow; */
padding: 20px;
align-items: center;
justify-content: space-between;
display: flex;
}
.music-control img{
width: 53px;
height: 53px;
justify-content: space-between;

}

#pause-button{
position: absolute;
right: 711px;
display: none;
}
#play-button:hover{
background-color:red;
border-radius: 30px;
box-shadow: 0 0.3rem 2rem 0.2rem rgba(0,0,0,0.4);
cursor: pointer;
}
#right-button:hover,#left-button:hover{
box-shadow: 0 0.3rem 2rem 0.2rem rgba(0,0,0,0.4);
cursor: pointer;
border-radius: 30px;

}





/* .............animation part....................... */


.anime{
animation:imageRotate 3s linear infinite ;
}

@keyframes imageRotate{
from{
transform: rotate(0deg);
}

to{
transform: rotate(360deg);

}
}

48 changes: 48 additions & 0 deletions music.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Music player app</title>
<link rel="stylesheet" href="./music.css">
</head>
<body>
<div class="container">
<div class="music-main">
<h1>VRS</h1>
<div class="music-details">
<h2 class="song-name">
Never let you go
</h2>
<span class="singer-name">
Justin Beiber

</span>
<audio src="./X2Download.app - ZAYN - Let Me (Official Video) (128 kbps).mp3" class="audio"></audio>
<!-- </h3> -->
<div class="img-area">

<img src="./IMG-20221204-WA0010-01.jpeg" class="rotate-image">
</div>
<div class="music-control">

<img src="./left.png" id="left-button">
<img src="./pause.png" id="pause-button">

<img src="./play-button.png" id="play-button">

<img src="./right.png" id="right-button">

</div>

</div>

</div>




</div>
<script src="./music.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions music.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const Music=document.querySelector('.audio');
const Img=document.querySelector('.rotate-image');

const Play=document.querySelector('#play-button');
Play.addEventListener("click", ()=>{
Music.play();
Play.classList.remove("#play-button");
Img.classList.add('anime');


})
Binary file added pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added play-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added right-chevron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ce08e1

Please sign in to comment.