Check out the code from this [Release] Hypnonema - a Cinema Resource (Update: now with Twitch Support!) [C#]