Skip to content

Commit 633a05a

Browse files
committed
fix bug
the title not upgraded when sounds end
1 parent 72d060e commit 633a05a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

audio_visualizer_single_page_version.html

Lines changed: 3 additions & 2 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">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!
@@ -224,7 +224,8 @@
224224
requestAnimationFrame(drawMeter);
225225
},
226226
_audioEnd: function(instance) {
227-
if (this.forceStop = true) {
227+
if (this.forceStop) {
228+
this.forceStop=false;
228229
return;
229230
};
230231
console.log('audio ended');

js/html5_audio_visualizer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ Visualizer.prototype = {
179179
requestAnimationFrame(drawMeter);
180180
},
181181
_audioEnd: function(instance) {
182-
if (this.forceStop = true) {
182+
if (this.forceStop) {
183+
this.forceStop=false;
183184
return;
184185
};
185186
console.log('audio ended');

0 commit comments

Comments
 (0)