Skip to content

Commit

Permalink
fix button click function
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhendong committed Jan 13, 2025
1 parent 02049e3 commit 371bcee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wavesurfer/js/pcm-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
this.pause()
this.button.innerHTML = '播放 <i class="fas fa-play"></i>'
} else {
this.continue()
this.play()
this.button.innerHTML = '暂停 <i class="fas fa-pause"></i>'
}
})
}.bind(this))

this.option = Object.assign({}, {channels: 1, sampleRate: 16000, flushTime: 100}, option)
// 每隔 flushTime 毫秒调用一次 flush 函数
Expand Down Expand Up @@ -76,7 +76,7 @@
this.samples = new Int16Array()
}

async continue() {
async play() {
await this.audioCtx.resume()
}

Expand Down

0 comments on commit 371bcee

Please sign in to comment.