Project Report Full On Music Palyer Angular
Project Report Full On Music Palyer Angular
Project Report Full On Music Palyer Angular
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE ENIGNEERING
MAU16UCS026
I hereby declare that the project work entitled “Web Based Music Player in AngularJs with
NodeJs” is an authentic record of my own work carried out at Maharaja Agrasen Institute of
Technology, MAU, HP during my VIIth Semester as a part of Project Submission for the award of the
degree B.Tech in Computer Science & Engineering by Maharaja Agrasen Institute of Technology,
Maharaja Agrasen University, Himachal Pradesh, under the guidance of Er. Amit Verma, during
July 2019 to November, 2019.
Certified that the above statement made by the student is correct to the best of our knowledge and
belief.
i
ACKNOWLEDGEMENT
I take this opportunity to express my sincere gratitude to my parents and people who have been
helpful in the successful completion of industrial training and this project. I would like to show my
greatest appreciation to the highly esteemed and devoted technical staff, supervisors of the
Maharaja Agrasen University, MAU, HP. I am highly indebted to them for their tremendous
support and help during the completion of my training and project.
I am grateful to Er. Amit Verma of CSE Department.and Er. Sushil Bansal, HOD of CSE
Department of Maharaja Agrasen Institute of Technology who granted me the permission for
industrial training. I would like to thank to all those people who directly or indirectly helped and
guided me to complete my project, including the instructors and technical officers of Maharaja
Agrasen University and various sections.
MAU16UCS026
ii
LIST OF CONTENTS
List of Contents…………………………………………………………………………...iii
List of Figures………………………………………………………………………….….v
1.0. Summary………………………………………………………………………….…..1
2.0. Work………………………………………………………………….…….………....3
3.0. Introduction…………………………………………………………………….……..4
6.1. AngularJs……………………………………………………………….…....8
6.2. NodeJs................................................................................................…...10
iii
7.0. System Design …….……………………………………….………………………..24
12.0. Screenshots.…………………………………………………….………………….45
13.0. Conclusion…………………...………………………………….…………………49
14.0. Bibliography………………………………………………….…….……………...51
iv
LIST OF FIGURES
v
1.0 SUMMARY
This is a project named Web Based Music Player. This project is done using HTML, CSS,
JAVASCRIPT, ANGULARJS AND NODEJS.
In this we introduce Web Based Music Player in which we can listen various types of
songs according to our Mood, Artist, Album and Language. Here we can also put any song
in our favorite list and further listening.
➢Work
The work that had been done in VIIth Semester of my B.Tech Degree.
In this section we have discussed about the configuration of software and hardware we
had used in making this project.
In this we discuss about System Requirement and System development i.e. a process of
developing software and hardware on the basis of the requirement of the end user to develop
efficient and good quality product. It is necessary to follow a procedure.
➢Technology Overview
In this we discuss about the technology used for building up the project.
1
➢System Design
➢Technical Feasibility
This is concerned with specifying equipment and software that will successfully satisfy the
user requirement.
➢System Testing
System testing is very critical element of software quality assurance and represents the
ultimate reviews of specification, design and coding.
➢Source Code
➢Screenshots
Images of the output screen which shows working of every module of the system
➢
Conclusion
➢
Bibliography
2
2.0 WORK
I had done my B.Tech in CSE from Maharaja Agrasen Institute of Technology, MAU, HP. During the
period of VIIth Semester, I have learnt AngularJs and NodeJs and their implementation in various
field of Web designing and Web development.
In this period, I got the knowledge about how to design and develop programs in Angular Java script
and its connectivity. Under the guidance of the industry experts I also got to know a brief
introduction of how to embed java script code for different purposes and using this knowledge I
gained and under their guidance I made this Web Based music Player project. I have done this
project using AngularJs and NodeJs.
3
3.0 INTRODUCTION
This is a project named Web Based Music Player which is submitted for the Summer Training,
2019.This project is done using HTML, CSS, JAVASCRIPT, ANGULARJS AND NODEJS.
If you are searching for a simple and lightweight solution to enable music on your website,
regardless of the user's internet browser, the best solution is to use a media player that is
compatible with Flash as it is normally found on most browsers.
Be careful of breaching copyright law if you are playing commercial tracks that you do not have
the rights to, as it can result in a costly lawsuit. It is possible to obtain broadcasting rights,
allowing you to play copyrighted music.
There are, however, copyright-free songs that you can use on your site without fear of legal action.
You can find out more about the free music that is available here. And if this project can help
people become more aware of their surroundings then it’d be a blessing for me.
A music player made with SoundManager 2 API for AngularJs to play music files.
Features
* Playlist support
* Soundcloud support
4
4.0 HARDWARE & SOFTWARE REQUIREMENT
In this step we analyzed the processing capabilities of the system and hardware requirement on
which the proposed system would be developed.
2 GB RAM or higher
2 GB RAM or higher
AngularJS 1.2+
AngularJs SoundManager2
4.3 Operating Systems:
Microsoft Windows
Linux
4.4 Technologies Used:
AngularJs
NodeJs
5
5.0 SYSTEM REQUIREMENT ANALYSIS
The System Requirement Specification provides a narrative description of each subsystem and
a definition of all data that flow between subsystems. The System Requirement Specification
forms the foundation for all engineering work that follows. These specifications analyse the
behaviour of the system with the external events and the functionality of the system elements.
This phase comes into picture while developing project when analysis phase is over. This step
takes care that whatever problem has been recognized is correct because the user requirements
keeps changing and for creation of successful product it’s necessary that the software deliver goods
at every level of work. For this the requirements and the problem to be solved must be thoroughly
known and then they must be worked upon.
It specifies the goals and objectives of the project, describing its context with system as a whole.
System requirement analysis bridges the gap between system level requirements engineering a
find software design. Requirement engineering activities result in the specification of software’s
operational characteristics, indicate software’s interface with other system elements, and establish
constraints that software must meet. Requirement analysis allows the software engineer to refine the
software allocation and build models of data, functional and behavioral domains that will be treated
by software.
6
Software testing is an integral and important phase of the software development process.
This part of the process ensures that defects are recognized as soon as possible.
Documenting the internal design of software for the purpose of future maintenance and
enhancement is done throughout development. This may also include the writing of an API,
be it external or internal
7
6.0 TECHNOLOGY
OVERVIEW
The technology selected for implementing the project is AngularJs and NodeJs. The development
was done in a “windows” environment using visual studio code IDE and Node with pre-installed
and some newly installed libraries like angular-soundmanager2.
AngularJs
NodeJs
Node Server
➢ 6.1 AnguarJs
AngularJS is a very powerful JavaScript Framework. It is used in Single Page Application (SPA)
projects. It extends HTML DOM with additional attributes and makes it more responsive to user
actions. AngularJS is open source, completely free, and used by thousands of developers around
the world. It is licensed under the Apache license version 2.0.
AngularJS is a structural framework for dynamic web applications. It lets you use HTML as your
template language and lets you extend HTML's syntax to express your application components
clearly and succinctly. Its data binding and dependency injection eliminate much of the code you
currently have to write. And it all happens within the browser, making it an ideal partner with any
server technology.
The general features of AngularJS are as follows −
AngularJS is an efficient framework that can create Rich Internet Applications (RIA).
AngularJS provides developers an options to write client side applications using JavaScript
in a clean Model View Controller (MVC) way.
8
AngularJS is open source, completely free, and used by thousands of developers around the
world. It is licensed under the Apache license version 2.0.
Overall, AngularJS is a framework to build large scale, high-performance, and easy to-maintain
web applications.
CORE FEATURES: -
Scope − These are objects that refer to the model. They act as a glue between controller and
view.
9
Controller − These are JavaScript functions bound to a particular scope.
Services − AngularJS comes with several built-in services such as $http to make a XML
Http Requests. These are singleton objects which are instantiated only once in app.
Filters − These select a subset of items from an array and returns a new array.
Directives − Directives are markers on DOM elements such as elements, attributes, css,
and more. These can be used to create custom HTML tags that serve as new, custom widgets.
AngularJS has built-in directives such as ngBind, ngModel, etc.
Templates − These are the rendered view with information from the controller and model.
These can be a single file (such as index.html) or multiple views in one page using partials.
Model View Whatever − MVW is a design pattern for dividing an application into
different parts called Model, View, and Controller, each with distinct responsibilities.
AngularJS does not implement MVC in the traditional sense, but rather something closer to
MVVM (Model-View-ViewModel). The Angular JS team refers it humorously as Model
View Whatever.
Deep Linking − Deep linking allows to encode the state of application in the URL so that
it can be bookmarked. The application can then be restored from the URL to the same state.
➢6.2 NodeJs
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable
network applications. Node.js uses an event-driven, non-blocking I/O model that makes it
lightweight and efficient, perfect for data-intensive real-time applications that run across distributed
devices. Node.js is an open source, cross-platform runtime environment for developing server-side
10
and networking applications. Node.js applications are written in JavaScript, and can be run within
the Node.js runtime on OS X, Microsoft Windows, and Linux.
Node.js also provides a rich library of various JavaScript modules which simplifies the development
of web applications using Node.js to a great extent.
FEATURES: -
Following are some of the important features that make Node.js the first choice of software
architects.
Asynchronous and Event Driven − All APIs of Node.js library are asynchronous, that
is, non-blocking. It essentially means a Node.js based server never waits for an API to return
data. The server moves to the next API after calling it and a notification mechanism of
Events of Node.js helps the server to get a response from the previous API call.
Very Fast − Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very
fast in code execution.
Single Threaded but Highly Scalable − Node.js uses a single threaded model with
event looping. Event mechanism helps the server to respond in a non-blocking way and
makes the server highly scalable as opposed to traditional servers which create limited
threads to handle requests. Node.js uses a single threaded program and the same program
can provide service to a much larger number of requests than traditional servers like Apache
HTTP Server.
No Buffering − Node.js applications never buffer any data. These applications simply
output the data in chunks.
11
Fig 6.2: NodeJs CONCEPT
Following are the areas where Node.js is proving itself as a perfect technology partner.
12
6.3 AngularJs SoundManager2
INSTALLATION: -
6.4 Directives
<sound-manager></sound-manager>
<a play-from-playlist="song">{song.title}</a>
21
Remove from playlist:
<button play-music>Play</button>
Play All Track:
<button pause-music>Pause</button>
Stop track:
<button stop-music>Stop</button>
Previous track:
Next Track:
Mute:
Repeat Track:
22
<button repeat-music>Repeat ({ repeat })</button>
Clear Playlist:
23
7.0 SYSTEM DESIGN
Description: User Interface & sub module describe the module information with name &
character wise display.
24
7.2 Flow chart
This is the blueprint of our project and the logic behind flow chat is something like that –
25
8.0 HOW THE PROJECT WORKS
MUSIC PLALYER -
This is the main module; users can play their favorite uploaded music from this page. First, by
default, we will display the albums with album name and image. User can click on any of their
favorite albums to play the music. When user clicks on the album image, we will play the first
song of that album, by default. Users can add any number of songs to their albums to play.
After the user selects the album, we will check for the songs to be added in the album. If there
are no songs for the selected album, then we display the message as "No Songs has been added
in this Album". If album has songs, then we display our Shanu Music Player. From this page,
the user can change and play any songs from the list as per his/her choice. In the player, we will
display the album image and the title along with the current playing song file name. In the list,
we will also display singer name, music file name, and description of the file. User can play,
pause, and play next and previous songs of the list.
ALBUM DETAIL –
In this module, we will manage album and music information. User can add albums with
images and song details and upload songs in the album.
CRUD OPRATION -
Here, user can add album details with image. Albums are nothing but it's a favorite or play list.
First, user can create albums and add all his/her favorite songs in that album. In the database,
we have created two tables. One is Album table (as master) and another is music table (as
details).
CODE PART-
This is our main part as we will be adding all our music files to be played in this detail table.
Here, we select our album from combobox and add music details and upload to our root
26
directory to play our songs. Users can add new songs, edit, and delete the songs. We will see
more detail in code part.
Select Controller and add an Empty Web API 2 Controller. Provide your name to the Web API
controller and click OK. Here, for our Web API Controller, we have given the name
"MusicAPIController".
As we have created Web API controller, we can see that our controller has been inherited with
ApiController. As we all know, Web API is a simple and easy way to build HTTP Services for
Browsers and Mobiles.
Web API has the following four methods as Get/Post/Put and Delete where:
27
• 9.0 FEASIBILITY of PROJECT
A computerized system will be technically more effective than the existing manual
system. Technical feasibility deals with some facts such as: -
This is concerned with specifying equipment and software that will successfully satisfy
the user requirement. The technical needs of the system may include:
Front-end selection:
1. It must open with some selected touch panel button or switch.
3. Flexibility.
4. Robustness.
28
6. Must provide excellent reporting features
Back-end Selection:
1. Easily programmable.
2. Light Weighted.
3. Easy to install.
4. Efficient maintenance.
• What new techniques will be required? Do the existing device have technique?
The system is operationally feasible as it very easy for the End users to operate it. It only
needs basic information about operating platform. Since the system will be
computerized, it will help user him/her from getting distracted or sleepy while driving.
The system will also be user friendly. Hence, the new system is operationally feasible.
29
9.3 Economical Feasibility
Cost-benefit analysis is a frequently used method for evaluating the effectiveness of the
proposed system. It is important because management must authorize the budget of the
project. It determines how the aims of the project can be achieved with limited
resources.
1. Manpower Cost
Taking care that there is not much manpower cost as such, the development of the
project is done. In fact, manpower is saved, as a single programmer can create the full
product on his own. Establishment of product in a car is also easy which can be done
during the assembly phase.
3. Behavioral Feasibility
The implementation of the proposed system in the vehicles doesn’t negatively affect the
current working atmosphere of the software consultants. In fact, it proves to be very
beneficial. The organization unit remains intact and the system is conflict-free! Hence
the proposed system is also economically feasible. As a whole, it has been concluded
that this system will help to have a safer level of journey. Hence the system is feasible.
30
10.0 Web Application Testing
Web application testing, a software testing technique exclusively adopted to test the applications
that are hosted on web in which the application interfaces and other functionalities are tested.
10.1 Functionality Testing - The below are some of the checks that are performed but not
limited to the below list:
Verify there is no dead page or invalid redirects.
10.2 Usability testing - To verify how the application is easy to use with.
Test the navigation and controls.
Content checking.
10.3 Interface testing - Performed to verify the interface and the dataflow from one system to
other.
10.4 Compatibility testing- Compatibility testing is performed based on the context of the
application.
Browser compatibility
31
Operating system compatibility
10.5 Performance testing - Performed to verify the server response time and throughput
under various load conditions.
Load testing - It is the simplest form of testing conducted to understand the behaviour of
the system under a specific load. Load testing will result in measuring important business
critical transactions and load on the database, application server, etc. are also monitored.
Stress testing - It is performed to find the upper limit capacity of the system and also to
determine how the system performs if the current load goes well above the expected
maximum.
Soak testing - Soak Testing also known as endurance testing, is performed to determine
the system parameters under continuous expected load. During soak tests the parameters
such as memory utilization is monitored to detect memory leaks or other performance
issues. The main aim is to discover the system's performance under sustained use.
Spike testing - Spike testing is performed by increasing the number of users suddenly by
a very large amount and measuring the performance of the system. The main aim is to
determine whether the system will be able to sustain the work load.
10.6 Security testing - Performed to verify if the application is secured on web as data theft
and unauthorized access are more common issues and below are some of the techniques to verify
the security level of the system.
Injection
Security Misconfiguration
32
11.0 SOURCE CODE
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gaana</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="../bootstrap.min.css" />
<link rel="stylesheet" href="../css/style.css" />
<script src="../angular.js"></script>
<script src="../angular-ui-route.js"></script>
<script src="../angular-soundmanager2.js"></script>
<script src="../app.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css">
</head>
<body ng-controller="MainCtrl">
<div id="main1">
<div class="whole">
<div class="main">
<div id="mySidenav1" class="sidenav1">
33
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">
<small>Close</small>
<img src="../image/switch.png" width="60" height="40" /> </a>
<div class="dropdown">
<button class="expand" style="color:black">Discover</button>
<div class="dropdown-content">
<a ui-sref="home"> Home</a>
<a ui-sref="hindi"> Hindi</a>
<a ui-sref="punjabi">Punjabi</a>
<a ui-sref="english">English</a>
<a ui-sref="bhojpuri">Bhojpuri</a>
<a ui-sref="gazal">Gazal</a>
<a href="#">Latest realese</a>
<a href="#">Romance</a>
<a href="#">Bhakti</a>
<a href="#">Party Special</a>
<a href="#">90s Song</a>
<a href="#">Wedding</a>
</div>
</div>
<a href="#about">About</a>
<a href="#services">Services</a>
<a href="#clients">Clients</a>
<a href="#contact">Contact</a>
<div class="dropdown1">
<button onclick="myFunction1()" class="dropbtn1"
style="left:10px">Message</button>
<div id="myDropdown1" class="dropdown-content1">
34
<p>Hi, I'm Shivam, Founder of Gaana . I have published many Songs
here. Thanks for listning....
Have a great day ;)</p>
</div>
</div>
</div>
<div id="mySidenav22" class="sidenav22">
<a href="javascript:void(0)" class="closebtn22" onclick="closeNav22()">
<small>Close</small>
<img src="../image/switch.png" width="60" height="40" />
</a>
</div>
35
<div class="header">
<div class="headerlogo">
</div>
</div>
<div class="headerinfo">
</div>
<div class="headerinf">
<div class="headerwebsite"> www.iamskm.com</div>
<div class="headermail">[email protected]</div>
</div>
36
</div>
<br>
37
<div class="menu" style="text-align:center">
<div class="dropdown">
<div class="menuhome">
<a ui-sref="register">
Register
</a>
</div>
<div class="menuhome">
<a ui-sref="home"> Home</a>
</div>
<div class="menuhome">
<a ui-sref="hindi"> Hindi</a>
</div>
<div class="menuhome">
<a ui-sref="punjabi">Punjabi</a>
</div>
<div class="menuhome">
<a ui-sref="english">English</a>
</div>
<div class="menuhome">
<a ui-sref="bhojpuri">Bhojpuri</a>
</div>
<div class="menuhome">
38
<a ui-sref="gazal">Gazal</a>
</div>
</div>
</div>
</br>
</br>
<div class="about">
<h2>Demo Songs</h2>
<br>
<ul>
<li ng-repeat="song in songs" style="padding: 2px">
<div class="button1">
<button music-player="play" add-song="song">{{ song.title }}
</button>
</div>
</li>
</ul>
</div>
<div class="playlist">
<span style="font-size:30px;text-align: right ;cursor:pointer"
onclick="openNav22()"> Playlist
<img src="../image/playlist.png" width="60" height="60" />
39
</span>
</div>
<div class="about222">
<sound-manager></sound-manager>
<h2 style="text-align: center;color:darkorange;text-decoration-style:
solid">My_Player</h2>
<p style="color: tomato">
Currently Playing: {{ currentPlaying.title }} ({{ currentPostion }} / {{
currentDuration }})
<br>
<p style="text-align: center"> {{
<img id="myImage" onclick="changeImage()"
src="../image/smile1.png" width="40" height="40">}}</p>
</p>
<div class="seekBase" seek-track>
<div class="seekLoad" ng-style="{width : ( progress + '%' ) }"></div>
</div>
<br>
<div class="button1">
   
<button play-music>Play
<img src="../image/play.png" width="30" height="30" />
</button>
    
  
<button pause-music>Pause
40
<img src="../image/pause.png" width="30" height="30" />
</button>
    
<button stop-music>Stop
<img src="../image/stop.png" width="30" height="30" />
</button>
    
  
<button repeat-music>Repeat
<img src="../image/repeat.png" width="30" height="30" />
</button>
<br>
<br/>   &NonBreakingS
pace;  
<button> Volume: {{ volume }} % </button>
   
    
  
<button next-track>
Next
<img src="../image/next1.png" width="30" height="30" />
</button>
    
  
<button clear-playlist>Clear Playlist
<img src="../image/clr.png" width="30" height="30" />
</button>
</div>
<br/>
<br/>
<br>
<br>
</div>
42
<div class="footer">
<div class="footermiddle">
<div class="footerdetail"><a href="index.html">Home</a> | <a
href="aboutus.html">About Us</a> | <a href="enquiry.html">Enquiry</a> | <a
href="contact.html">Contact Us</a>
</div>
</div>
</div>
</div>
</div>
<ui-view></ui-view>
</body>
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
</html>
44
12.0 SCREENSHOTS
45
Fig 12.2: PLAYER AND CONTROLS OF PLAYER
46
Fig 12.3: PLAY LIST AND OTHER FUNCTIONS
47
Fig 12.4: NODE SERVER START AND RUN
48
13.0 CONCLUSION
The project named Web Based Music Player has been studied successfully above. All the
requirements as well as working of the project along with the technology stack used has been
explained carefully keeping each and every detail in mind.
The project works completely fine and we may conclude that the project is still in its developing
stage. The project can be made better with time but right now too it works satisfactorily.
Dependencies:
Strengths:
49
Limitations:
Future Scope:
50
14.0 BIBLIOGRAPY
Book References:
Learning How to Design Web Pages: “HTML AND CSS” - DESIGN AND
BUILD WEBSITES, BY JON DUCKETT”
Website References:
Github-
https://perminder-klair.github.io/angular-soundmanager2/dev/contributing.html
https://github.com/scottschiller/SoundManager2
AngularJs- https://www.angularjs4u.com/demos/5-angularjs-music-player-
demos/
NodeJs-
https://nodejs.org
Stack OverFlow-
https://stackoverflow.com
Other Resources
https:/www.tutorialspoint.com/
CCN-
https://ccm.net/faq/705-playing-music-on-your-website
51