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

View File

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