-
Notifications
You must be signed in to change notification settings - Fork 0
Web Item ‐ Item UUID Listener
Web Items are just websites running in a browser, so they themselves could be VTS plugins and interact with VTube Studio directly. To interact with the VTS API (or at least with the item-related endpoints), the Web Item will need to know its own item instance UUID used to identify it inside of VTS.
For more general information about Web Items, check this page.
To get that ID, you can use the following javascript. You have to send the message vts_web_item_request_item_id
to VTube Studio like this:
window.vuplex.postMessage('vts_web_item_request_item_id');
VTube Studio will then pass you the item UUID. You can use that ID to do stuff like move the item around, pin/unpin it, delete it (thus also closing the API connection since the browser process is shutting down) and more.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VTS Web Item ID Listener Example</title>
</head>
<body>
<h1>VTS Web Item ID Listener Example</h1>
<p id="messageDisplay">Waiting for message...</p>
<p id="itemID">Waiting for item ID...</p>
<script>
if (window.vuplex)
{
addMessageListener();
}
else
{
window.addEventListener('vuplexready', addMessageListener);
}
function addMessageListener()
{
window.vuplex.addEventListener('message', function(event)
{
let json = event.data;
let jsonParsed = JSON.parse(json);
// {"apiName": "VTubeStudioWebItemAPI", "messageType": "ItemID", "value": "129b5746777b4d5390ba8b36f4b4a515"}
document.getElementById('messageDisplay').textContent = 'Received JSON: ' + json;
document.getElementById('itemID').textContent = 'Item ID: ' + jsonParsed.value;
});
window.vuplex.postMessage('vts_web_item_request_item_id');
}
</script>
</body>
</html>
如果本使用手冊沒有回答到您的問題,請在 VTube Studio Discord
伺服器中詢問!
- 介紹&需求
- 已知問題
- 在哪裡可以取得模型?
- Android vs. iPhone vs. 網路攝影機
- 開始使用
- 載入您自己的模型
- 載入您自己的背景
- VTube Studio 設定
- 顯示器光源
- 視覺效果
- Spout2 背景
- VTS 模型設定
- 表情(貼圖/表情符號)
- 動畫
- 動畫、追蹤、物理等之間的互動
- 串流到 Mac/電腦
- 使用 OBS 錄製/串流
- 不使用 Steam 啟動
- 以系統管理員身分啟動
- 復原舊版本的 VTS
- NVIDIA Broadcast 人臉追蹤器
- Google Mediapipe 人臉追蹤器
- Tobii 眼動追蹤器
- 手部追蹤
- 唇音同步
- 使用單一網路攝影機或 iPhone/Android 裝置控制多個模型
- 連線問題&故障排除
- 拍攝/分享螢幕截圖
- 物品系統
- Live2D 物品
- 重新著色模型和物品
- 錄製動畫
- 多人遊戲
- VNet 安全性
- Twitch 互動
- 新增特殊圖形網格功能
- 物品場景&物品快速鍵
- 外掛程式(YouTube、Twitch 等等)
- VTube Studio 模型檔案
- 在模型間複製設定
- 傳送資料至 VSeeFace
- Steam 工作坊
- 如何解決延遲問題
- 如何解決網路攝影機問題
- Live2D Cubism Editor 溝通
- 常見問答
- 隱私權政策、授權條款和其它條款