Architecture between broadcaster and viewers


#1

Am confused about the architecture of developing on twitch, all i need to do is interface for the broadcast that allows for settings and other stuff and it sends texts to ALL viewers, where each viewer can disable/enable/customizes few options, a lot like tobi tracker, except its text.
My question is do I really need to make a dedicated server running a EBS where the broadcaster sends data to that dedicated server then to twitch then viewers?
Or simply the broadcaster sends data to twitch then to viewers?

How would i go about this?

Thank you!


#2

You could have a config panel on the Twitch dashboard for you extension would could directly post to the Twitch PubSub.

That might work I’d have to test it myself

That using the JWT from onAuthorised inside a config panel might work.


#3

Here’s the confusion I got, i read the pubsub, but it says for the EBS to communicate with both the broadcaster and viewers, by what i understand the ebs MUST be in a dedicated server, could I put an “ebs” with the broadcaster?


#4
### Authentication

Signed JWT (Twitch or EBS JWTs are allowed)

You can use the the Twitch JWT from onAuthorised

You are right than an EBS is a web accessible “dedicated server”, and it has to remain under your control, you cannot give it to the broadcaster to keep on their side, as in order to generate an “EBS JWT” you need the Extension Secret.

And as per the Developer Agreement/TOS you need to keep your secrets, secret. And they are not secret if they live in an application on someone elses computer as apposed to an EBS you control.

Additionally instead of going straight to the “Send Extensions Pubsub Message” you can use the Javascript Helper send function

send

twitch.ext.send: function(target: String, contentType: String, message: Object)twitch.ext.send: function(target: String, contentType: String, message: String)

This function can be called by the front end to send directly to PubSub. It uses the Twitch-provided JWT for broadcasters, to allow broadcasters to send a broadcast (channel) or whisper message. Broadcasters cannot send to global.

Scroll to send


#5

Very interesting, totally missed that, so to clear up i must host a ebs to keep the developer secret secret but i can make the broadcast application use the pubsub to broadcast the messages to his channel/viewers correct?


#6

Correct. The broadcaster JWT from the config panel should suffice

For Pubsub broadcasting pretty much. if needing to ding from the broadcasters actual computer not the Twitch dashboard/other extension panel


#7

Alright, thanks a lot for sharing your knowledge, i will give it a whirl!