diff --git a/app/electron/main.js b/app/electron/main.js index c0961c868..c1b2bcbff 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -192,6 +192,7 @@ const boot = () => { webviewTag: true, webSecurity: false, contextIsolation: false, + autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587 }, frame: "darwin" === process.platform, titleBarStyle: "hidden", @@ -751,6 +752,7 @@ app.whenReady().then(() => { nodeIntegration: true, webviewTag: true, webSecurity: false, + autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587 }, }); win.loadURL(data.url); diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 1bba90468..1c13d91d6 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -468,6 +468,7 @@ const renderPDF = (id: string) => { nodeIntegration: true, webviewTag: true, webSecurity: false, + autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587 }, }); ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id);