Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Handle async state change of player
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Aug 17, 2021
1 parent f71863e commit cccbe6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/AudioTrack/AudioTrack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ export default {
this.updateTime()
}
},
setPlayerState(isPlaying) {
async setPlayerState(isPlaying) {
if (isPlaying) {
this.player.play()
await this.player.play()
window.requestAnimationFrame(this.syncTime)
} else {
this.player.pause()
await this.player.pause()
}
},
Expand Down

0 comments on commit cccbe6c

Please sign in to comment.