Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Liang Ding6b54f1493c2a
diff --git a/app/electron/main.js b/app/electron/main.js
index c0961c8687..c1b2bcbffc 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 1bba904687..1c13d91d6f 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);