Professional Documents
Culture Documents
DOC-20230508-WA000.pdf
DOC-20230508-WA000.pdf
DOC-20230508-WA000.pdf
SPOTIFY CLONE
BACHELOR OF ENGINEERING
In
COMPUTER ENGINEERING
Of
SAVITRIBAI PHULE PUNE UNIVERSITY
By
2021-22
Sinhgad Technical Education Society,
Sinhgad College of Engineering , Pune -41
Department of Computer Engineering
DATE :
CERTIFICATE
This is to certify that the project report entitled
“SPOTIFY CLONE”
Submitted by
is a bonafide work carried out by him under the supervision of Prof. P.P. GAIKWAD and it is approved for the
partial fulfilment of the requirements of Savitribai Phule Pune University, Pune for the award of the degree of
Bachelor of Engineering (Computer Engineering) during the year 2021-22.
DATE :
CERTIFICATE
This is to certify that the project report entitled
“SPOTIFY CLONE”
Submitted by
VAISHNAVI DHINGE Exam Seat No: S190234241
is a bonafide work carried out by her under the supervision of Prof. P.P. GAIKWAD and it is approved for the
partial fulfilment of the requirements of Savitribai Phule Pune University, Pune for the award of the degree of
Bachelor of Engineering (Computer Engineering) during the year 2021-22
DATE :
Sinhgad Technical Education Society,
Sinhgad College of Engineering , Pune -41
Department of Computer Engineering
CERTIFICATE
This is to certify that the project report entitled
“SPOTIFY CLONE”
Submitted by
is a bonafide work carried out by him under the supervision of Prof. P.P. GAIKWAD and it is approved for the
partial fulfilment of the requirements of Savitribai Phule Pune University, Pune for the award of the degree of
Bachelor of Engineering (Computer Engineering) during the year 2021-22
CERTIFICATE
This is to certify that the project report entitled
“SPOTIFY CLONE”
Submitted by
is a bonafide work carried out by her under the supervision of Prof. P.P. GAIKWAD and it is approved for the
partial fulfilment of the requirements of Savitribai Phule Pune University, Pune for the award of the degree of
Bachelor of Engineering (Computer Engineering) during the year 2021-22
DATE :
CERTIFICATE
This is to certify that the project report entitled
Sinhgad Technical Education Society,
Sinhgad College of Engineering , Pune -41
Department of Computer Engineering
“SPOTIFY CLONE”
Submitted by
is a bonafide work carried out by him/her under the supervision of Prof. P.P. GAIKWAD and it is approved for
the partial fulfilment of the requirements of Savitribai Phule Pune University , Pune for the award of the degree
of Bachelor of Engineering (Computer Engineering) during the year 2021-22
JAVASCRIPT:
JavaScript is a cross-platform, object-oriented scripting language used to make webpages interactive (e.g.,
having complex animations, clickable buttons, popup menus, etc.). There are also more advanced server-
side versions of JavaScript such as Node.js, which allow you to add more functionality to a website than
downloading files (such as real time collaboration between multiple computers). Inside a host environment
(for example, a web browser), JavaScript can be connected to the objects of its environment to provide
programmatic control over them.
JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language
elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety
of purposes by supplementing it with additional objects.
CSS:
CSS stands for Cascading Style Sheets. This programming language dictates how the HTML elements of a
website should actually appear on the frontend of the page.
Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document
written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes
how elements should be rendered on screen, on paper, in speech, or on other media.
There are three types of CSS which are given below:
Inline CSS.
External CSS.
FEATURES
Spotify provides users with recommendations to find new artists, songs, and albums through ready made and
personalized playlists. Spotify operates through Spotify Free, which is based on free ad revenue.
The geographic scope of this analysis is to reach global music streaming market.
Listen Offline:
Users will use the offline option to stream the album and listen without using the internet. In the sector, this is
the most common element.
Easy To Use:
The software is user-friendly from login to listening to music. With the various features, users can enjoy
listening to their favorite songs with ease.
Large Music Catalogue:
Users would be spoilt for options of millions of songs from diverse genres. The advanced software provides
diverse music options for the consumers.
Audio Quality:
Spotify has a variety of audio quality choices to suit your computer, schedule, and tastes. The "normal" default
Spotify streaming quality on your device is 160 kbps (kilobits per second), with each "bit" effectively being a
"piece" of the music. It typically sounds good, and lets you enjoy the song with decent music. Stream Music
List:
Users can explore their favourite playlist on any of mobile platforms, i.e. Android or iOS as per their
convenience.
Users can easily shuffle their favourite songs list to enjoy any of the songs randomly.
Access of playlist/songs:
It gives you instant access to its vast online library of music and podcasts, allowing you to listen to any content
of your choice at any time. Audio Quality:
Spotify has a variety of audio quality choices to suit your computer, schedule, and tastes. The "normal" default
Spotify streaming quality on your device is 160 kbps (kilobits per second), with each "bit" effectively being a
"piece" of the music. It typically sounds good, and lets you enjoy the song with decent music.
WORK CARRIED OUT
Spotify
Clone
HTML CSS JS
Program Code: -
HTML Code: -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spotify - Your favourite music is here</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav>
<ul>
<li class="brand"><img src="logo.png" alt="Spotify"> Spotify</li>
<li>Home</li>
<li>About</li>
</ul>
</nav>
<div class="container">
<div class="songList">
<h1>Best of NCS - No Copyright Sounds</h1>
<div class="songItemContainer">
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="0" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="1" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="2" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="3" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="4" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="5" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="6" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="7" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="8" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
<div class="songItem">
<img alt="1">
<span class="songName">Let me Love You</span>
<span class="songlistplay"><span class="timestamp">05:34 <i id="9" class="far songItemPlay
fa-play-circle"></i> </span></span>
</div>
</div>
</div>
<div class="songBanner"></div>
</div>
<div class="bottom">
<input type="range" name="range" id="myProgressBar" min="0" value="0" max="100">
<div class="icons">
<!-- fontawesome icons -->
<i class="fas fa-3x fa-step-backward" id="previous"></i>
<i class="far fa-3x fa-play-circle" id="masterPlay"></i>
<i class="fas fa-3x fa-step-forward" id="next"></i>
</div>
<div class="songInfo">
<img src="playing.gif" width="42px" alt="" id="gif"> <span id="masterSongName">Warriyo -
Mortals [NCS Release]</span>
</div>
</div>
<script src="script.js"></script>
<script src="https://kit.fontawesome.com/26504e4a1f.js" crossorigin="anonymous"></script>
</body>
</html>
JS Code:-
console.log("Welcome to Spotify");
let songs = [
{songName: "Warriyo - Mortals [NCS Release]", filePath: "songs/1.mp3", coverPath: "covers/1.jpg"},
{songName: "Cielo - Huma-Huma", filePath: "songs/2.mp3", coverPath: "covers/2.jpg"},
{songName: "DEAF KEV - Invincible [NCS Release]-320k", filePath: "songs/3.mp3", coverPath:
"covers/3.jpg"},
{songName: "Different Heaven & EH!DE - My Heart [NCS Release]", filePath: "songs/4.mp3", coverPath:
"covers/4.jpg"},
{songName: "Janji-Heroes-Tonight-feat-Johnning-NCS-Release", filePath: "songs/5.mp3", coverPath:
"covers/5.jpg"},
{songName: "Rabba - Salam-e-Ishq", filePath: "songs/2.mp3", coverPath: "covers/6.jpg"},
{songName: "Sakhiyaan - Salam-e-Ishq", filePath: "songs/2.mp3", coverPath: "covers/7.jpg"},
{songName: "Bhula Dena - Salam-e-Ishq", filePath: "songs/2.mp3", coverPath: "covers/8.jpg"},
{songName: "Tumhari Kasam - Salam-e-Ishq", filePath: "songs/2.mp3", coverPath: "covers/9.jpg"},
{songName: "Na Jaana - Salam-e-Ishq", filePath: "songs/4.mp3", coverPath: "covers/10.jpg"},
]
songItems.forEach((element, i)=>{
element.getElementsByTagName("img")[0].src = songs[i].coverPath;
element.getElementsByClassName("songName")[0].innerText = songs[i].songName;
})
myProgressBar.addEventListener('change', ()=>{
audioElement.currentTime = myProgressBar.value * audioElement.duration/100;
})
Array.from(document.getElementsByClassName('songItemPlay')).forEach((element)=>{
element.addEventListener('click', (e)=>{
makeAllPlays();
songIndex = parseInt(e.target.id);
e.target.classList.remove('fa-play-circle');
e.target.classList.add('fa-pause-circle');
audioElement.src = `songs/${songIndex+1}.mp3`;
masterSongName.innerText = songs[songIndex].songName;
audioElement.currentTime = 0;
audioElement.play();
gif.style.opacity = 1;
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
})
document.getElementById('next').addEventListener('click', ()=>{
if(songIndex>=9){
songIndex = 0
}
else{
songIndex += 1;
}
audioElement.src = `songs/${songIndex+1}.mp3`;
masterSongName.innerText = songs[songIndex].songName;
audioElement.currentTime = 0;
audioElement.play();
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
document.getElementById('previous').addEventListener('click', ()=>{
if(songIndex<=0){
songIndex = 0
}
else{
songIndex -= 1;
}
audioElement.src = `songs/${songIndex+1}.mp3`;
masterSongName.innerText = songs[songIndex].songName;
audioElement.currentTime = 0;
audioElement.play();
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
CSS Code:-
@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
body{
background-color: antiquewhite;
}
*{
margin: 0;
padding: 0;
}
nav{
font-family: 'Ubuntu', sans-serif;
}
nav ul{
display: flex;
align-items: center;
list-style-type: none;
height: 65px;
background-color: black;
color: white;
}
nav ul li{
padding: 0 12px;
}
.brand img{
width: 44px;
padding: 0 8px;
}
.brand {
display: flex;
align-items: center;
font-weight: bolder;
font-size: 1.3rem;
}
.container{
min-height: 72vh;
background-color: black;
color: white;
font-family: 'Varela Round', sans-serif;
display: flex;
margin: 23px auto;
width: 70%;
border-radius: 12px;
padding: 34px;
background-image: url('bg.jpg');
}
.bottom{
position: sticky;
bottom: 0;
height: 130px;
background-color: black;
color: white;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.icons{
margin-top: 14px;
}
.icons i{
cursor: pointer;
}
#myProgressBar{
width: 80vw;
cursor: pointer;
}
.songItemContainer{
margin-top: 74px;
}
.songItem{
height: 50px;
display: flex;
background-color: white;
color: black;
margin: 12px 0;
justify-content: space-between;
align-items: center;
border-radius: 34px;
}
.songItem img{
width: 43px;
margin: 0 23px;
border-radius: 34px;
}
.timestamp{
margin: 0 23px;
}
.timestamp i{
cursor: pointer;
}
.songInfo{
position: absolute;
left: 10vw;
font-family: 'Varela Round', sans-serif;
}
.songInfo img{
opacity: 0;
transition: opacity 0.4s ease-in;
}
OUTPUT: -
CONCLUSION
This project was created by us mainly to teach ourself Web development. Since the point of this project was not
to make great UI/UX design choices, we chose to create a clone of a well-established product as to shorten our
learning time and not to focus on the wrong thing. Since we all are, already a heavy Spotify user and therefore
we thought it would be an interesting challenge to tackle.
The majority of the react components and logic was written from scratch by us. We chose not to use existing
component libraries because that forces us to both get a really deep understanding of Web and get as much
practice as we could with Web.
REFERENCE
Research papers: -
Spotify Teardown: Inside the Black Box of Streaming Music
Eriksson, M., Fleischer, R., Johansson, A., Snickars, P., Vonderau, P.
MIT Press
Fleischer, Rasmus & Pelle Snickars: “Discovering Spotify—A Thematic Introduction”, Culture Unbound,
Volume 9, issue 2, 2017: 130–145. Published by Linköping
University Electronic Press: http://www.cultureunbound.ep.liu.se