-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudioVisualizer.html
More file actions
108 lines (103 loc) · 4.81 KB
/
audioVisualizer.html
File metadata and controls
108 lines (103 loc) · 4.81 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!doctype html>
<html lang="en">
<head>
<!-- Meta Tags -->
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<title id="pagetitle">Audio Visualizer</title>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="CSS/audio-visualizer.css"/>
<script src="https://kit.fontawesome.com/1951006a4b.js" SameSite="None" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body onload="initCanvas_Audio()">
<!-- Canvas -->
<div class="canvas-wrap">
<canvas id="visualizer_render">
</canvas>
<div class="navControl">
<div class="navContainer">
<!-- Logo and Search -->
<form id="searchForm" class="searchWrapper" onsubmit="event.preventDefault(); handleSubmit_Button();">
<div class="wavyLogo">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-waveform"><path d="M2 12h2"/><path d="M20 12h2"/><path d="M6 12v4"/><path d="M10 12v8"/><path d="M14 12v-6"/><path d="M18 12v-2"/><path d="M6 12v-2"/><path d="M10 12v-4"/><path d="M14 12v6"/><path d="M18 12v2"/></svg>
</div>
<input
id="user_URL"
type="text"
class="form-control textbox"
name="URL"
placeholder="Search for songs or artists..."
onclick="textboxAuto_Highlight()"
/>
<button type="submit" class="searchBtn" id="submitButton">
<i class="fas fa-search"></i>
</button>
</form>
<!-- Playback Controls -->
<div class="playbackControls">
<button type="button" class="playBtn" id="toggle" onclick="togglePlay()">
⏵
</button>
<div class="sliderWrapper">
<input onmouseover="mouseOver = true" onmouseout="mouseOver = false" onclick="sliderTime()" type="range" id="audioSlider"/>
</div>
<span id="audioTimer">0:00</span>
<!-- Volume Control -->
<div class="volumeWrapper">
<i class="fas fa-volume-down" id="volumeIcon"></i>
<input type="range" id="volumeSlider" min="0" max="1" step="0.01" value="0.2" oninput="handleVolumeChange(this.value)"/>
</div>
</div>
</div>
</div>
</div>
<!-- Logo for circle -->
<div class="logoFor_Canvas">
<img id="logo" width="100" height="100" src="MISC/logo.png" alt="">
</div>
<!-- Track Info -->
<div class="trackInfo">
<img id="artwork" width="150" height="150">
<h1 id="artistname"></h1>
<h1 id="songname"></h1>
</div>
<!-- Search results -->
<div class="resultsContainer">
<ul>
<!-- Results will appear here -->
</ul>
</div>
<!-- Bootstrap modal notification (Popup tutorial on page load for how to use audio reaction) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Quick tutorial</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<strong>Welcome to the Audio Visualizer!</strong><br><br>
We are now using the <strong>Audius API</strong> for music search. You can search for any track or artist in the search bar.
<br><br>
<strong>Finding a song:</strong><br>
Use the search bar to search for a song with a keyword search and hit "Find Track".
<br><br>
<strong>Play:</strong><br>
Select a song from the search results to play it.
You can pause and resume the music with the play/pause button.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script type="text/javascript" src="JS/audio-visualizer.js"></script>
</body>
</html>