mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 20:44:52 +08:00
支持设置是否最小化时暂停播放
This commit is contained in:
@@ -1570,7 +1570,7 @@ export default {
|
||||
},
|
||||
minMaxEvent () {
|
||||
win.on('minimize', () => {
|
||||
if (this.xg && this.xg.hasStart) {
|
||||
if (this.xg && this.xg.hasStart && this.setting.pauseWhenMinimize) {
|
||||
this.xg.pause()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -111,10 +111,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="site">
|
||||
<div class="title">窗口</div>
|
||||
<div class="title">窗口及播放</div>
|
||||
<div class="site-box">
|
||||
<div class="zy-input">
|
||||
<input type="checkbox" v-model = "d.restoreWindowPositionAndSize" @change="updateSettingEvent"> 恢复上次窗口位置和大小
|
||||
<input type="checkbox" v-model = "d.restoreWindowPositionAndSize" @change="updateSettingEvent"> 记录并恢复窗口位置和大小
|
||||
<input type="checkbox" v-model = "d.pauseWhenMinimize" @change="updateSettingEvent"> 最小化时暂停播放
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +75,7 @@ db.version(10).stores({
|
||||
|
||||
db.version(11).stores({
|
||||
setting: 'id, theme, shortcut, view, volume, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode,' +
|
||||
'searchViewMode, password, proxy, allowPassWhenIptvCheck, autocleanWhenIptvCheck, rootClassFilter, r18ClassFilter, classFilter, restoreWindowPositionAndSize, windowPositionAndSize'
|
||||
'searchViewMode, password, proxy, allowPassWhenIptvCheck, autocleanWhenIptvCheck, rootClassFilter, r18ClassFilter, classFilter, restoreWindowPositionAndSize, windowPositionAndSize, pauseWhenMinimize'
|
||||
}).upgrade(trans => {
|
||||
trans.setting.toCollection().modify(setting => {
|
||||
setting.restoreWindowPositionAndSize = false
|
||||
@@ -85,6 +85,7 @@ db.version(11).stores({
|
||||
width: 1080,
|
||||
height: 720
|
||||
}
|
||||
setting.pauseWhenMinimize = false
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -71,5 +71,12 @@
|
||||
"里番",
|
||||
"VIP"
|
||||
],
|
||||
"restoreWindowSize": false
|
||||
"restoreWindowPositionAndSize": false,
|
||||
"windowPositionAndSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1080,
|
||||
"height": 720
|
||||
},
|
||||
"pauseWhenMinimize": false
|
||||
}]
|
||||
Reference in New Issue
Block a user