修复音频输出设备设置在重启软件后被重置的问题(#1568)

pull/1583/head
lyswhut 2023-09-17 13:56:10 +08:00
parent 0b125e29b5
commit f5165d517c
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,10 @@
- 新增Scheme URL对播放器的控制操作新增的操作包含 播放、暂停、下一首、上一首等详情看Scheme URL文档
### 修复
- 修复音频输出设备设置在重启软件后被重置的问题(#1568
### 其他
- 更新 electron 到 v22.3.24

View File

@ -1,4 +1,4 @@
import { BrowserWindow, dialog } from 'electron'
import { BrowserWindow, dialog, session } from 'electron'
import path from 'node:path'
import { createTaskBarButtons, getWindowSizeInfo } from './utils'
import { isLinux, isWin } from '@common/utils'
@ -65,6 +65,7 @@ export const createWindow = () => {
const windowSizeInfo = getWindowSizeInfo(global.lx.appSetting['common.windowSizeId'])
const { shouldUseDarkColors, theme } = global.lx.theme
const ses = session.fromPartition('persist:win-main')
/**
* Initial window options
@ -82,6 +83,7 @@ export const createWindow = () => {
fullscreenable: true,
show: false,
webPreferences: {
session: ses,
nodeIntegrationInWorker: true,
contextIsolation: false,
webSecurity: false,