-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
73 lines (62 loc) · 2.57 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html ng-app="player">
<head>
<meta charset="UTF-8" />
<meta id="meta" name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Audio Player</title>
<!-- Bootstrap and Angular -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<!-- IPFS API -->
<script src="https://unpkg.com/[email protected]/dist/index.min.js"
integrity="sha384-CLaXheXlllrTppt5CyXAKSe6yjmdeXi2IkxbvzAzOwJN3F4zp/Thc2uBHaipvaMl" crossorigin="anonymous"></script>
<!-- Local Scripts -->
<script src="./upload.js"></script>
<script src="./player.js"></script>
</head>
<body>
<!-- Audio Player -->
<div class = "col-md-8 col-s-12 col-xs-12">
<div ng-controller="audioplayer">
<div class = "col-md-6 col-s-12 col-xs-12">
<!--Dropdown Selection-->
<h2>Select Song: </h2>
<select ng-model="list_model" ng-init="list_model = list[1]"
ng-options="track.name group by track.artist for track in list">
<option value=""> -- Select -- </option>
</select>
<button ng-click="shuffle_song()">Shuffle song</button>
<p>Total Songs: {{ list.length }} </p><br />
<!--Player-->
<audio autoplay controls="controls" src="{{prefix}}{{list_model.src}}">
Your browser does not support the <a href="http://caniuse.com/#search=audio"><code>audio</code></a> element.
</audio>
<h4>{{list_model.artist}} - {{list_model.name}}</h4>
</div>
<!--Playlist Selection
<div class = "col-md-6 col-s-12 col-xs-12">
<h2>Playlist</h2>
<ul id="playlist">
<li ng-repeat="track in list">
<a ng-model="list_model">{{track.artist}} - {{track.name}}</a>
</li>
</ul>
</div>
-->
</div>
</div>
<!-- Uploader -->
<div class = "col-md-4 col-s-12 col-xs-12">
<h2>Upload</h2>
<h5>Doesn't upload yet</h5>
<form onsubmit="return validateFormOnSubmit(this);">
<input id="fileuploader" type="file" name="audio" accept="audio/*"> <br /><br />
Track Name: <br /> <input type="text" name="name" /> <br />
Artist:<br /> <input type="text" name="artist" /> <br />
<input type="submit">
</form>
<audio >
</div>
</body>
</html>