🎨 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587

This commit is contained in:
Liang Ding 2023-03-07 10:54:09 +08:00
parent 2cc8b860c2
commit 6b54f1493c
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
2 changed files with 3 additions and 0 deletions

View File

@ -192,6 +192,7 @@ const boot = () => {
webviewTag: true, webviewTag: true,
webSecurity: false, webSecurity: false,
contextIsolation: false, contextIsolation: false,
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
}, },
frame: "darwin" === process.platform, frame: "darwin" === process.platform,
titleBarStyle: "hidden", titleBarStyle: "hidden",
@ -751,6 +752,7 @@ app.whenReady().then(() => {
nodeIntegration: true, nodeIntegration: true,
webviewTag: true, webviewTag: true,
webSecurity: false, webSecurity: false,
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
}, },
}); });
win.loadURL(data.url); win.loadURL(data.url);

View File

@ -468,6 +468,7 @@ const renderPDF = (id: string) => {
nodeIntegration: true, nodeIntegration: true,
webviewTag: true, webviewTag: true,
webSecurity: false, webSecurity: false,
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
}, },
}); });
ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id); ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id);