-
Notifications
You must be signed in to change notification settings - Fork 0
/
audioVisualizer.html
107 lines (104 loc) · 4.99 KB
/
audioVisualizer.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
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
<!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>
<!-- Audio Controls -->
<div class="navControl">
<div clas="navContainer">
<div class="form-group">
<label for="textbox"><a href="https://soundcloud.com/discover" target="_blank"><i class="fab fa-soundcloud soundcloud"></i></a></label>
<h2>Search tracks here:</h2>
<input
id="user_URL"
type="textbox"
class="form-control textbox"
name="URL"
value="https://soundcloud.com/mattmaeson/cringe"
onclick="textboxAuto_Highlight()"
/>
</div>
<div class="middleLine"></div>
<input onmouseover="mouseOver = true" onmouseout="mouseOver = false" onclick="sliderTime()" type="range" id="audioSlider"/>
<div class="controlsContainer">
<button type="button" class="button" id="toggle" onclick="togglePlay()">
⏵
</button>
<button type="button" class="button" id="submitButton" onclick="handleSubmit_Button()">
Find Track
</button>
<h1 id="audioTimer"></h1>
</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>
<h3>No Search Results</h3>
</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> Important Note: </strong>Unfortunately, the SoundCloud API is undergoing some changes and I no longer have access.
Until I can get approval for an API key, I have stored a base-64 encoded song locally so that you can still enjoy the audio visualizer :).
To use it, just select the 'Find Track' button below and then you can play and pause the music like normal.
<br><br>
Additionally, please ignore the song name,
album cover, search results, and any other features tied to the SoundCloud API. Sorry for the inconvenience.
<!-- <strong>Finding a song: </strong>
Use the search bar below to <b>1.</b> Enter a URL
<b>2.</b> Search for a song with a keyword search <b>3.</b> Use the pre-selected URL and hit "Find Track".
<br><br>
<strong>Play: </strong>
Press the "Find Track" button to search and play songs.
You can pause and resume the music with the play/pause button.
<br><br>
<strong>Note: </strong>
Any artists that require a SoundCloud Go+ subscription to listen to thier music
do not allow their songs to be played through the API. -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary"><a href="https://soundcloud.com/discover" target="_blank"><i class="fab fa-soundcloud soundcloud"></i></a></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>