mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 16:03:29 +08:00
保存音量
This commit is contained in:
@@ -1246,6 +1246,11 @@ export default {
|
||||
if (this.miniMode) this.xg.getCssFullscreen()
|
||||
})
|
||||
|
||||
this.xg.on('volumechange', () => {
|
||||
this.config.volume = this.xg.volume.toFixed(2)
|
||||
setting.find().then(res => { res.volume = this.config.volume; setting.update(res) })
|
||||
})
|
||||
|
||||
this.xg.on('playNextOne', () => {
|
||||
this.nextEvent()
|
||||
})
|
||||
@@ -1363,8 +1368,10 @@ export default {
|
||||
this.getAllhistory()
|
||||
this.mtEvent()
|
||||
},
|
||||
mounted () {
|
||||
async mounted () {
|
||||
const db = await setting.find()
|
||||
this.playerInstall()
|
||||
this.config.volume = db.volume
|
||||
this.xg = new HlsJsPlayer(this.config)
|
||||
this.bindEvent()
|
||||
this.minMaxEvent()
|
||||
|
||||
@@ -6,7 +6,7 @@ const db = new Dexie('zy')
|
||||
db.version(4).stores({
|
||||
search: '++id, keywords',
|
||||
iptvSearch: '++id, keywords',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode, searchViewMode, password, proxy',
|
||||
setting: 'id, theme, site, shortcut, view, volume, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode, searchViewMode, password, proxy',
|
||||
shortcut: 'name, key, desc',
|
||||
star: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
|
||||
Reference in New Issue
Block a user