Twitch Extension Development Process¶
In This Section
Open your Twitch Developer Account.
Click Create Extension.
Choose a name for your extension. (It can be anything.)
Under Create an Extension Version select .
Enter something in Summary.
Click Create Extension Version.
We use the Twitch Extension Configuration Service, so you need to activate it.
Select the Capabilities tab.
Under Select how you will configure your extension select Extension Configuration Service.
Click Save Changes.
Open your Twitch Developer Rig.
Log in using your Twitch Account Credentials, if necessary.
Click Add Project?.
Note: If this is the first project you’ve created, click Create Your First Project and skip the next step.
Click Create Project.
In the first drop-down menu under Select Existing or Create New Extension, select the Twitch Extension you just created.
Note: If you don’t see it, click the Refresh button.
Select the folder for your Twitch Extension project.
Note: In this case, it is
samplestwitch. In general, it has to be the parent of the folder where your files are served.
Select None - I’ll use my own code as your template.
Click Get Started.
This creates a JSON file in your project folder with all information related to the dev rig and project.
Twitch files (assets) that are served locally are sent by a web server on a random port.
Update your configurations using the Configuration Service Panel. Configurations changed through the extension views don’t seem to work.
Although you won’t get a CSP error in the Developer Rig, you still must make sure you comply to the Twitch Guidelines and Policies before going into hosted test or production.
Twitch Context is triggered once per second. In our Genvid Client, we need the hlsLatencyBroadcaster to calculate the latency between the Genvid stack and Twitch platform.
The Twitch onContext callback must be bound to the Genvid Client to retrieve hlsLatencyBroadcaster. To do this, use an event listener on the twitchoncontext property of the Genvid Client video_player object.
On the Twitch website, the hlsLatencyBroadcaster value is generally 2 seconds or less. However, the Twitch Developer Rig default setting is 5 seconds. To simulate the correct latency in your Twitch Developer Rig, lower that value with the Edit Context button.
Other things to be aware of:
Keyboard event listeners ARE NOT ALLOWED in a Twitch Extension.