This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
appcat
/
sonist
Archived
1
0
Fork 0

修复记忆播放

2.x
宇天 2018-12-29 20:43:49 +08:00
parent 6f72645313
commit de24de6d58
2 changed files with 12 additions and 11 deletions

View File

@ -348,11 +348,20 @@ Anot({
this.isPlaying = true this.isPlaying = true
} else { } else {
if (SONIST.stat === 'ready') { if (SONIST.stat === 'ready') {
if (this.curr.id) {
if (this.isPlaying) { if (this.isPlaying) {
SONIST.pause() SONIST.pause()
} else { } else {
SONIST.play() SONIST.play()
} }
} else {
let lastPlay = Anot.ls('last-play') || 0
SONIST.play(lastPlay).then(it => {
it.time = 0
this.updateCurr(it)
this.draw()
})
}
this.isPlaying = !this.isPlaying this.isPlaying = !this.isPlaying
} }
} }

View File

@ -44,17 +44,9 @@ export default Anot({
dbCache = null dbCache = null
this.__APP__ = Anot.vmodels.app this.__APP__ = Anot.vmodels.app
this.list = LS.getAll() this.list = LS.getAll()
let lastPlay = Anot.ls('last-play') || 0
SONIST.clear() SONIST.clear()
SONIST.push(LS.getAll()) SONIST.push(LS.getAll())
// if (appInit.autoPlay) {
// SONIST.play(lastPlay).then(it => {
// this.__APP__.play(it)
// this.curr = it.id
// })
// }
}, },
watch: { watch: {
'props.curr'(v) { 'props.curr'(v) {