Expand my Community achievements bar.

sending request to start webcam

Avatar

Former Community Member

Hello experts,

i want to implement a functionality by which if a user A wants to see other user B's webcam then A can sent a request to B to allow him to view his/her webcam and if B accepts the request then A can see the webcam.

Any ideas will be appreciated.

Regards

Amit

6 Replies

Avatar

Former Community Member

You can create a shared object to set to true/false. Then you can check it to see if the user has requested permission to publish his/her web camera, and enable or disable your publish button accordingly.

Avatar

Former Community Member

hi barisyesilcicek,

thanks for your reply. from your reply i used the sharedproperty in place of shared object. now my ques is will it work in the scenario when multiple users try to change this property at the same time.

Regards

Amit

Avatar

Former Community Member

Hi Amit,

It's now up to you to implement the necessary logic to support multiple users.

For instance, you can store an array object which, for example, contains currently permission requesting users' IDs. I think you can achieve what you want by maintaining that array. Again, this is just an idea.

Good luck,

Baris

Avatar

Former Community Member

Hi baris,

can you give me a small example of using shared object. the example should be like Client A should set some values for client B and when the value changes Client B recieves a notification that "client A has something for you".

Regards

Amit

Avatar

Former Community Member

Hi Amit,

I'm kind of busy nowadays but I will post a snippet as soon as I can. But it's not that difficult really, just look at the examples shipping along with LCCS, and refer to the documentation.

Baris