Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Flex-PHP application using LCCS

rjoshicool
Level 1
Level 1

I need to create an LCCS video/audio/text chat application which will be deployed on a website with PHP as back-end. Only 2 people can comunicate with each other. There are a few questions I have related to this:

  • Do I need to create different rooms for each user chat as 2 users can chat at a time?
  • Do I need to create these rooms on the fly using the PHP classes in LCCS SDK to enable dynamic room creations?
  • How do I interact with Flex and these Rooms? Do I need to create some PHP services which after creating a room, send the data to Flex, which Flex uses to initiate the chat application?

Any help would be appreciated and it would be good if someone can share URL to similar tutorial or example.

5 Replies
Nigel_Pegg
Level 10
Level 10

Hi, and welcome

Yup, I’d have your PHP create a new room for each conversation on the fly, create authentication tokens for the 2 users, then send each user the authtoken and roomURL for connecting. (Use the third parameter of createRoom, $deleteOnExit, so that the room cleans itself up automatically afterwards).

hope that helps

nigel

nzezelj
Level 4
Level 4

Hi, and welcome as well.

You should check out 6.2. section of our online wiki docs at http://learn.adobe.com/wiki/display/lccs/6.2+Provisioning+rooms

But all of it is a great read and it would be a nice introduction to LCCS.

Nikola

rjoshicool
Level 1
Level 1

Thanks to all those links and comments were really very helpful. Regarding the Wiki link, point 6.c and 6.d mentions that

  1. For each user and from your own system, get an user ID, a username, and an assigned role.
  2. Generate an authToken by passing the required parameters to getAuthenticationToken. The token is a unique, signed string created from the your shared secret, the user's ID and username, and their assigned role.

Here we need to generate user ID and username on server side? Also how do I define roles using server side scripting?

Nigel_Pegg
Level 10
Level 10

The docs are basically saying that you get to specify those details when you create the auth token. Take a look at the PHP serverIntegration libs, and you’ll see that getAuthenticationToken accepts name, role, userID, etc, as parameters which you can supply.

nigel

nzezelj
Level 4
Level 4

Not sure if I fully follow your "roles" question, but ....   User roles are already pre-defined, you only need to assign user a role via authToken parameter. 

Please see http://learn.adobe.com/wiki/display/lccs/5.3+Managing+room+settings#5.3Managingroomsettings-Changing... for more info on user roles.

Hope this helps,

Nikola