Expand my Community achievements bar.

help with confusion about groupnames and collection nodes

Avatar

Level 1

hi, i could be totally missing something here, but im trying to make a video/text chat application and i cant for the life of me figure out how to limit who can see what.

basically what i am trying to do is take a list of users of which you can video or text chat with.  i have that part working, except for the fact that regardless of who you are talking to, everyone sees all the video feeds and texts between users.  i want it so if user 1 and user 2 are involved in a video or text chat, user 3 wont be seeing the text going back and forth in the other convo.  now i know i could make seperate rooms for different users, but this app can grow pretty quick and i can make a room for every user.

im thinking that collection nodes are the answer, im just confused by how they work, even after going through the samples.  i also have no clue about groupname as well.

any help would be greatly appreciated!!

Chris

3 Replies

Avatar

Level 1

i figured it out.  groupname gives me exactly what i want.  now i just have to figure out coldfusion authentication.  anyone have any tips on that??

Avatar

Former Community Member

Authentication is done using our server to server APIs. You can look inside Server2Server/S2SGateway_ColdFusion/ for an example on how to use ColdFusion with our powerful Server2Server APIs to do authentication and other whole lot of things.

Hope this helps

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi Chris,

In our framework, unless you set some special properties, all the messages/streams get broadcasted.

Lets take your cases one by one

a) For Camera, are you using webpublisher and webcamsubscriber or you are directly using WebCamera component? You need to ideally use webcampublisher and webcamsubscriber rather than WebCamera in order to show streams in a custom manner. Otherwise, by default, every user sees every stream that is in the room as the default WebcamSubscriber inside WebCamera component lays out every stream ina grid format.

Now, if you use WebcamPublisher and WebcamSubscribers, then you would need to set up the webcamSubscriber.publisherIDs property to only those userIDs whose streams you want to see. You need to study this API and look into details WebCamera example in sampleApps about customized stream viewing and layouts.

b) For text , are you using Note component? For Note, we don't have a property to send private texts. Though in chat component, you can send private messages. However, you can send private messages to anyone using SharedProperty or using your own collectionNode by modifying the recipientID /recipientIDs property. Every message is sent as a MessageItem and MessageItem has property called recipientID/recipientIDs that you can use to send message to any particular user/group of users respectively.

If you want to send private messages using our Note, then you would have to make changes in the underlying NoteModel file wherein when you publish a MessageItem(text), you would have to set the recipientID/recipientIDs so that it goes only to the desired user.

You can look at the SimpleChatModel class and look for recipientID inside it to see how you can see that value while sending a message.

Regarding groups, yes you can use groups so that a stream/text is sent to a particular group. But you would have to do a bunch of other things to get group working. Look at the MultipleGroups example in sampleApps for more details.

Hope this helps

Thanks

Hironmay Basu