Skip to content

Commit

Permalink
prevent error thrown when audio failed to load
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed May 13, 2018
1 parent be084c3 commit b4f58c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/components/aplayer-thumbnail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@
}
}
.aplayer-hide {
display: none;
}
.aplayer-play {
width: 26px;
height: 26px;
Expand Down
5 changes: 4 additions & 1 deletion src/vue-aplayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,10 @@
this.pause()
this.isSeeking = true
this.audio.currentTime = this.audio.duration * val
// handle load failures
if (!isNaN(this.audio.duration)) {
this.audio.currentTime = this.audio.duration * val
}
},
onProgressDragging (val) {
if (isNaN(this.audio.duration)) {
Expand Down

0 comments on commit b4f58c4

Please sign in to comment.