(Initial stub save.) |
(VTI->VRChat section.) |
||
Line 5: | Line 5: | ||
== How VTI Talks to VRChat == | == How VTI Talks to VRChat == | ||
As previously mentioned, VTI uses [https://creators.vrchat.com/worlds/udon/string-loading/ Remote String Loading] in UdonSharp in order to send data to the VRChat Client. | As previously mentioned, VTI uses [https://creators.vrchat.com/worlds/udon/string-loading/ Remote String Loading] in UdonSharp in order to send data to the VRChat Client. The [[VTI Companion App]] will bundle up all the events that have been triggered through Twitch into it's Event Queue, and then compile said Queue into JSON. | ||
The [[VTI Companion App]] runs a non-internet-facing websocket on port 12011 and listens for VRChat to query for the next update, at which time it will respond with the above JSON, allowing the VRChat side to load the latest Events. This is why the [[VTI Troubleshooting]] article says that turning on ''Allow Untrusted URLs'' is required, as <syntaxhighlight inline>localhost</syntaxhighlight> is not on the URL Whitelist. | |||
== How VRChat Talks To The Companion == | |||
== How VTI Connects with Twitch == | == How VTI Connects with Twitch == |
Revision as of 06:39, 6 February 2024
This page details how the VRChat Twitch Integration prefab pack (known as the VTI World Kit) works in tandem with the VTI Companion App in order to transmit Twitch events to the VRChat Client.
Overview
The first and probably most important thing to note is that VTI is not a modification of the VRChat client, and therefore does not break the VRChat Terms of Service, nor does it cause issues with Easy Anti-Cheat. Instead, VTI utilizes Remote String Loading and watches VRChat's Debug Log. Read on for more details.
How VTI Talks to VRChat
As previously mentioned, VTI uses Remote String Loading in UdonSharp in order to send data to the VRChat Client. The VTI Companion App will bundle up all the events that have been triggered through Twitch into it's Event Queue, and then compile said Queue into JSON.
The VTI Companion App runs a non-internet-facing websocket on port 12011 and listens for VRChat to query for the next update, at which time it will respond with the above JSON, allowing the VRChat side to load the latest Events. This is why the VTI Troubleshooting article says that turning on Allow Untrusted URLs is required, as localhost
is not on the URL Whitelist.
How VRChat Talks To The Companion
How VTI Connects with Twitch
The VTI Companion App connects with the Twitch through its API. Specifically, it utilizes the Implicit Grant Flow method of authentication, which has been determined to be the safest method for both the developer and the end user. Unfortunately, this means that VTI will always pop up a browser window when beginning the Twitch connection as the credentials are not stored in the VTI Companion nor any of WaffleSlapper's or Poetica Mechanica's servers. This method also does not require the developer to use a Client Secret (required by other authentication methods) which can be used to cause harm if leaked through the VTI Companion App's source code or any external service.
The VTI Companion App utilizes a customized version of the StreamingClientLibrary by SaviorXTanren, which has been modified to enable the above Implicit Grant Flow. You can view the source code for the fork here.