Dimpal Singh
Dimpal Singh

Reputation: 157

How to publish the stream to a particular subscriber only

I am using tokbox JavaScript api in order to implement video confrencing. I have a session in which my stream is published. I have multiple subscribers to my stream. Is to possible to publish my stream to only one or few subscribers out of all the subscribers so that only one or few can see my video rather than all.

I want something like this:

subscriber.publishVideo(true/false);

Upvotes: 1

Views: 112

Answers (1)

Dave Mun
Dave Mun

Reputation: 156

There is no way to do this authoritatively from the publisher side - once a video is published to a session, anyone is free to subscribe to it. You may implement this from your application layer by using the Signaling API to send a message from the publisher to a potential subscriber, telling them to subscribe to a video stream with their specific streamId, in combination with a catch-all policy where subscribers don't subscribe to streams unless specifically told to do so.

If security is your concern, and you want secure break-out sessions, it would be better to just create another session and have both parties connect to the new session concurrently.

Upvotes: 0

Related Questions