Commit 7eda9335 authored by Xiaowu Zhang's avatar Xiaowu Zhang

avoid Infinity affection

parent edc7fb26
......@@ -131,7 +131,7 @@
canvasCtx.clearRect(0, 0, cwidth, cheight);
step = Math.round(array.length / meterNum);
bar_context.value = that.audio.currentTime;
if (that.audio.duration) {
if (that.audio.duration !== Infinity) {
bar_context.max = that.audio.duration;
}
time_context.innerHTML = timeFormat(that.audio.duration - that.audio.currentTime);
......
......@@ -167,7 +167,7 @@
canvasCtx.clearRect(0, 0, cwidth, cheight);
step = Math.round(array.length / meterNum);
bar_context.value = that.audio.currentTime;
if (that.audio.duration) {
if (that.audio.duration !== Infinity) {
bar_context.max = that.audio.duration;
}
time_context.innerHTML = timeFormat(that.audio.duration -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment