[SOLVED] Viewer.html/js Communicate with PubSub

So I’m currently detecting if the broadcaster is watching the video to send PubSub messages from the viewer.html/JS.

But really I should be using the extension backend to broadcast PubSub messages. That way the broadcaster won’t have to worry about keeping the video browser tab in focus to push the Chroma data.

It might be nice to also make an OBS plugin so that when “Start Streaming” is enabled that it immediately starts sending Chroma data.

In the meantime when streaming starts, I’ll make it so the broadcaster only has to open the viewer browser tab once to authorize the backend.

Otherwise, the extension backend would need a front-end to enter the user streaming key. And I’d have to use the API to check if the user is streaming, authorize, and broadcast PubSub messages.

I’m on the fence about making an OBS plugin to broadcast the Chroma data on PubSub…

As per the diagram, I’ll make it so the Front-end JavaScript HTML triggers the Extension Backend Service to broadcast the Chroma data over PubSub.

Ideally, it will be the broadcast software that triggers the Extension Backend Service to broadcast the Chroma data over PubSub.

Solved via - [SOLVED] Backend Service: Broadcast to PubSub from Backend using Auth.Token JWT - Extensions - Twitch Developer Forums