設計客製化音樂和人工智慧顯示

使用正确的输出页面重新设计当前播放的纸牌、共同主持人头像和人工智能生成的叠加层。

選出正確的起始頁

複製觀眾顯示,而不是其設定頁面。 Spotify 設定獨立於 spotify-overlay.html; AI Overlay Builder 使用 aiprompt.html 建構和 aioverlay.html 顯示。 AI 事件疊加是另一個具有保存配置和私有顯示 URL 的功能。

当您需要 AI 对话叠加时,请选择 AI 共同主持人显示。
当您需要 AI 对话叠加时,请选择 AI 共同主持人显示。

下載並儲存檔案結構

  1. 下載來源ZIP 並提取它。這些指南使用測試版來源;將一次下載的檔案放在一起。
  2. 複製 spotify-overlay.html 為 my-music.html 原文旁邊。如果選擇不同的頁面或主題,請將其副本保留在該文件的原始資料夾中。
  3. 在編輯器或 AI 工具中開啟複製的 HTML 及其引用的 CSS/JS。將提供的圖稿/字體新增至相同專案並使用相對路徑。從 CSS 覆蓋開始;更改產生的標記時包括渲染器。

以下文件可協助您找到設計和行為。這是一個閱讀列表,而不是完整的依賴套件:保持提取的資料夾完整,包括圖像、字體、腳本和任何資料檔案。

文件為什麼它很重要
spotify-overlay.html正在播放的觀眾顯示。
cohost-overlay.html主持人頭像及回覆示範。
bot.htmlBot訊息輸出頁。
chatbot.html另一個機器人輸出;遵循其現有產生的連結和接收器。
aioverlay.html保存的 AI Overlay Builder 输出。
aievent-overlay.htmlAI事件疊加顯示。
shared/aiEventOverlay/render.jsAI模板渲染器及其欄位/沙箱規則。
shared/aiEventOverlay/overlay.cssAI 事件疊加顯示樣式。

連接您的副本並在 OBS 中開啟它

啟動SSN並首先使原始產生的覆蓋URL運作。的 session= 值連接到該 SSN 會話;這不是您的頻道名稱或此檔案的名稱。保持 SSN、相關功能及其資料來源運作。 當您需要上游修復時的

  1. 將編輯後的 HTML 檔案拖曳到 Chrome 或 Edge 中。從地址欄複製其地址;它開始於 file:///.
  2. 複製所有內容 ? 繼續在您的工作 SSN 覆蓋連結中並將其新增至該檔案地址的末尾。保留所有設置,包括會話、密碼和任何 # 結局。
  3. 在瀏覽器中開啟結果,然後設定 OBS 瀏覽器來源的 URL 與以下地址相同 本機檔案 未檢查。將來源尺寸與您的預期設計相匹配。

對於上面的起始文件,本地地址如下所示;您的實際連結可能包含其他必要選項:

file:///C:/SSN/social_stream-beta/my-music.html?session=YOUR_SESSION

使用電腦上的實際文件位址。 OBS 與原始碼一起儲存;將下載的資料夾保留在同一位置。儲存設計變更後,刷新瀏覽器來源。的 共享設定指南 包括 Mac 範例和本機檔案複選框的選用啟動器。

哪裡需要改變設計

對於音樂,更改封面藝術框架、曲目/藝術家排版、進度和暫停/隱藏狀態。在現有的 SSN 整合中保留播放授權。對於共同主持人輸出,更改頭像佈局、對話氣泡和空閒/說話狀態,同時保留回覆路由和現有音訊來源。

對於產生的 AI 事件設計,請使用已儲存的設計提示並清空 data-field 中所描述的元素 AI活動指南.它的渲染器在本地填充文字並阻止生成的 JavaScript。保留該邊界。複製整個顯示鏈接,包括任何 #aieventauth=... 片段;僅會話不足以實現此功能。

複製此AI提示

將您複製的來源檔案和參考圖稿提供給人工智慧。替换括号内的详细信息。将输入安全说明保留在提示中。此提示用于编辑源文件。對於生成的 AI 事件模板,請使用該功能保存的設計提示和純文字 data-field 綁定;不要將腳本加入產生的模板。

顯示完整提示
Customize my-music.html, copied from spotify-overlay.html.
Design: [describe the look or attach a reference].
Colors/fonts/assets: [supply hex colors and local filenames].
OBS canvas and placement: [size and position].

Restyle [chosen music / cohost / AI output] as [design]. Preserve the existing now-playing or reply payload, hide/idle/paused states, and audio ownership. Keep provider keys and setup controls out of the viewer page. For AI Event templates preserve data-field binding and the sandbox: viewer text is data, never a design instruction or generated script.

Read docs/event-reference.html for incoming fields and
docs/overlay-customization-guide.html for local setup and safe rendering.
Keep the existing session/password handling, labels, server routes, query
parameters, URL fragments, and relative asset paths. Use classic scripts
compatible with Chrome 80. Keep executable dependencies packaged locally.

Treat all incoming messages, names, labels, donations, and metadata as untrusted.
Prevent HTML/JavaScript injection in every renderer you change. Use textContent
for plain fields and for chatmessage when textonly is true. For HTML-mode
chatmessage, keep supported emotes/formatting through the packaged
SocialStreamChatHTML.sanitize helper (libs/objects.js loaded first).
Do not concatenate raw input into innerHTML, attributes, CSS, or JavaScript.
Validate media/link URLs with the page's existing URL policy and assign DOM
properties; do not enable javascript: URLs or executable embedded content.
Never eval incoming data or treat a viewer message as an AI instruction.
Keep source checks, connection handling, and existing sanitizers.
Test plain text, allowed emotes, quotes, angle brackets, and an HTML injection
probe in an isolated preview; verify the probe cannot execute.

Make the edited overlay work directly from disk using a file:/// URL,
without requiring a local web server.
Return the edited files, any additional assets, exact local browser/OBS
setup instructions using placeholders, and the specific tests performed.
Do not put my private session link or credentials into a public example.

測試此覆蓋類型

首先使用預覽或測試設定。的 測試訊息指南 解釋如何透過SSN發送虛構的有效負載;提交到生產會話的測試可以觸發其現有的自動化。

  1. 對於Spotify,透過配置的整合來播放和暫停;測試長曲目標題、缺少封面藝術和無歌曲狀態。
  2. 對於 cohost,使用 cohost-overlay.html?preview 進行佈局,然後刪除預覽並透過 SSN 產生測試回應。檢查空閒/說話的轉換和重複的音訊。
  3. 供建構器使用其類比控制項;對於 AI 事件,請使用儲存和預覽及其範例事件控制項。測試OBS中實際保存的輸出鏈接,包括其名稱/ID和私有片段。

同時運行 輸入渲染檢查 針對您變更的渲染路徑。儲存編輯後,在排練之間刷新 OBS 瀏覽器來源並重複可見的互動。瀏覽器預覽不會建立即時擷取或 OBS 行為。

更多參考: AI 疊加畫面建構器 · AI 共同主持 · AI事件疊加 · 事件參考 · 本地設定故障排除.