From 6b54f1493c2a8adaa34d2a10939dda62459b899c Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 7 Mar 2023 10:54:09 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E8=87=AA=E5=8A=A8=E6=92=AD=E6=94=BE=E5=A4=9A=E5=AA=92?= =?UTF-8?q?=E4=BD=93=20https://github.com/siyuan-note/siyuan/issues/7587?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/electron/main.js | 2 ++ app/src/protyle/export/index.ts | 1 + 2 files changed, 3 insertions(+) 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);