1.2.2 • Published 4 years ago

@rikal87/time-watch v1.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

HOW TO USE

You can use almost the same syntax as HTML5 <video> control API.

const TimeWatch = require('@rikal87/time-watch')
const tw = new TimeWatch()

let cnt = 3

tw.interval = 500
tw.duration = 3000
tw.loop = false

tw.ontick = function () {
  console.log('tick:', this.currentTime)
  if(cnt === 0) this.pause()
}
tw.onended = function () {
  console.log('done!')
  this.play()
}
tw.onplay = function () {
  --cnt
}
tw.onpause = function () {
  console.log('onpause')
}
tw.play()
1.2.2

4 years ago

1.2.1-rc4

4 years ago

1.2.1-rc3

4 years ago

1.2.1-rc2

4 years ago

1.2.1-rc1

4 years ago

1.2.1

4 years ago

1.2.0-A

4 years ago

1.2.0

4 years ago