Stream notifications via pubsub pls

Hiya. That’s a nice pubsub API you have there… https://dev.twitch.tv/docs/v5/guides/PubSub/ How about providing stream online notifications through it or something similar? It would reduce the load on your API from polling by apps that need to know when streams go live, as well as potentially providing those apps with the information faster!

You can listen to the video-playback.CHANNEL_NAME topic to receive this information. Just keep in mind that it is not supported, as far as I can tell anyway.

{
	"type": "LISTEN",
	"data": { 
	 	"topics": ["video-playback.CHANNEL_NAME"], 
	 	"auth_token": ".."
	}
}

You’ll receive a message similar to this once the channel goes online. When the channel is offline no information is sent.

{
  	"type": "MESSAGE",
  	"data": {
    	"topic": "video-playback.lirik",
    	"message": "{\"type\":\"viewcount\",\"server_time\":1499721302.779628,\"viewers\":31846}"
  	}
}

Hope this helps!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.