Skip to content

Commit 9b28fb6

Browse files
committed
enhance the title
1 parent e44d161 commit 9b28fb6

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

audio_visualizer_single_page_version.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<small>Star me on <a href="https://github.com/Wayou/HTML5_Audio_Visualizer" target="_blank">GitHub</a></small>
4444
</footer>
4545
<script type="text/javascript">
46-
/*
46+
/*
4747
*An audio spectrum visualizer built with HTML5 Audio API
4848
*Author:Wayou
4949
*License:feel free to use but keep this info please!
@@ -98,12 +98,12 @@
9898
that.fileName = that.file.name;
9999
if (that.status === 1) {
100100
//the sound is still playing but we upload another file, so set the forceStop flag to true
101-
document.getElementById('fileWrapper').style.opacity = 1;
102101
that.forceStop = true;
103102
};
103+
document.getElementById('fileWrapper').style.opacity = 1;
104+
that._updateInfo('Uploading', true);
104105
//once the file is ready,start the visualizer
105106
that._start();
106-
that._updateInfo('Uploading', true);
107107
};
108108
};
109109
//listen the drag & drop
@@ -122,6 +122,7 @@
122122
dropContainer.addEventListener("drop", function(e) {
123123
e.stopPropagation();
124124
e.preventDefault();
125+
document.getElementById('fileWrapper').style.opacity = 1;
125126
that._updateInfo('Uploading', true);
126127
//get the dropped file
127128
that.file = e.dataTransfer.files[0];
@@ -276,12 +277,12 @@
276277
}
277278
</script>
278279
<script>
279-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
280+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
280281
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
281282
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
282-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
283-
ga('create', 'UA-46794744-5', 'duapp.com');
284-
ga('send', 'pageview');
283+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
284+
ga('create', 'UA-46794744-5', 'duapp.com');
285+
ga('send', 'pageview');
285286
</script>
286287
</body>
287288
</html>

js/html5_audio_visualizer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ Visualizer.prototype = {
5353
that.fileName = that.file.name;
5454
if (that.status === 1) {
5555
//the sound is still playing but we upload another file, so set the forceStop flag to true
56-
document.getElementById('fileWrapper').style.opacity = 1;
5756
that.forceStop = true;
5857
};
58+
document.getElementById('fileWrapper').style.opacity = 1;
59+
that._updateInfo('Uploading', true);
5960
//once the file is ready,start the visualizer
6061
that._start();
61-
that._updateInfo('Uploading', true);
6262
};
6363
};
6464
//listen the drag & drop
@@ -77,6 +77,7 @@ Visualizer.prototype = {
7777
dropContainer.addEventListener("drop", function(e) {
7878
e.stopPropagation();
7979
e.preventDefault();
80+
document.getElementById('fileWrapper').style.opacity = 1;
8081
that._updateInfo('Uploading', true);
8182
//get the dropped file
8283
that.file = e.dataTransfer.files[0];

0 commit comments

Comments
 (0)