Sam Shaikh
Sam Shaikh

Reputation: 1646

How to check Pusher Channel is available?

I am using Pusher for channels and live streaming.

I create channel. Can I check status of a particular channel that if it is created or is streaming or not.

Thanks.

Upvotes: 0

Views: 2854

Answers (1)

leggetter
leggetter

Reputation: 15467

There's no action to create a channel; you can publish data to a channel and subscribe to one. When a a channel is subscribed to it is occupied and when there are no subscribers it is vacant.

You can check whether a channel has any subscribers (is occupied) by querying the HTTP API for channel information: https://pusher.com/docs/server_api_guide/interact_rest_api#channel-information

Some libraries have helper functions for this e.g. the PHP library: https://github.com/pusher/pusher-http-php#get-information-about-a-channel

Upvotes: 3

Related Questions