修复手动定位播放进度条时存在偏差的问题
parent
5d74a78bb7
commit
13c64a95fa
|
@ -1,3 +1,5 @@
|
|||
### 修复
|
||||
|
||||
- 修复设置界面更新出错时仍然显示更新下载中的问题
|
||||
- 修复手动定位播放进度条时存在偏差的问题
|
||||
- 屏蔽播放器中没有歌曲时对进度条的点击
|
||||
|
|
|
@ -111,8 +111,10 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.setProgessWidth()
|
||||
this.init()
|
||||
this.$nextTick(() => {
|
||||
this.setProgessWidth()
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
changePlay(n) {
|
||||
|
@ -168,6 +170,7 @@ export default {
|
|||
this.volume = this.audio.volume = this.setting.player.volume
|
||||
this.audio.controls = false
|
||||
this.audio.autoplay = true
|
||||
this.audio.preload = 'auto'
|
||||
this.audio.loop = this.setting.player.togglePlayMethod === 'singleLoop'
|
||||
|
||||
this.audio.addEventListener('playing', () => {
|
||||
|
@ -360,6 +363,7 @@ export default {
|
|||
this.clearAppTitle()
|
||||
},
|
||||
setProgess(e) {
|
||||
if (!this.audio.src) return
|
||||
this.audio.currentTime =
|
||||
(e.offsetX / this.pregessWidth) * this.maxPlayTime
|
||||
if (!this.isPlay) this.audio.play()
|
||||
|
|
Loading…
Reference in New Issue