Expand my Community achievements bar.

SOLVED

PHP - create room and decorate it

Avatar

Level 2

Hi!

I am working with groups in rooms.

Each user in my application has own room and can create as many separate sessions as he wants. Each session creates own group and decorates it with needed collections and nodes. Currenly this can be done inside client(Flex) application, but before release i need to place all management code to server to protect private info(login/pass/secret). And now i am looknig a way to decorate room via PHP backend.

With Flex app that was easy -- i just need to call whiteboard model, for example, and it will create all needed nodes. For PHP i have not found any shortcuts and looks like I need to create collections and nodes by my own for each pod that i will use.

1. Am i correct?

2. How I can create all needed streams to support webcam and microphone?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi,

Yes your are correct that you need to use backend management in php/java/ruby etc for creating rooms dynamically and putting users inside that.

Now, you don't need to create all collectionNodes from the server.

Let's say you want a room that has audio and camera. So, you run your flex app that has audio/camera and pointing to a room X as an owner. Once you have done this, you can save your room X as template/application Y from either devconsole or devportal. Now, you can always create any room on the server using template Y with accountManager.createRoom server2server API. You can use any of php/ruby/java. I mentioned this API in an earlier reply. All your new rooms will then automatically have everything required for camera/audio since they have been created from a similar template.

Lastly, you need to go through sections on Room Provisioning and External Authentication in Developer Guide to know the details.

Thanks

Hironmay Basu

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

Hi,

Yes your are correct that you need to use backend management in php/java/ruby etc for creating rooms dynamically and putting users inside that.

Now, you don't need to create all collectionNodes from the server.

Let's say you want a room that has audio and camera. So, you run your flex app that has audio/camera and pointing to a room X as an owner. Once you have done this, you can save your room X as template/application Y from either devconsole or devportal. Now, you can always create any room on the server using template Y with accountManager.createRoom server2server API. You can use any of php/ruby/java. I mentioned this API in an earlier reply. All your new rooms will then automatically have everything required for camera/audio since they have been created from a similar template.

Lastly, you need to go through sections on Room Provisioning and External Authentication in Developer Guide to know the details.

Thanks

Hironmay Basu

Avatar

Level 2

Hi!

Thanks for the reply! I am looking for way that will allow me to completely decorate room programmatically, from server script. All users that will use created room/group will have PUBLISHER rights. Now i wrote PHP script that creates the room inside specific application and decorates it for chat and whiteboard, but I don't know how to enable webcam/mic for users. What i need to do for webcam/mic support, or this is enough and webcam/mic will work without additional collections and nodes?

I can't use templating because of groups support -- every time the names will be different.

Avatar

Former Community Member

How did you decorate it for chat and whiteboard ? Similarly, for webcam, all you need is to create the cameraModel collectionNode and its nodes in that room. Rest of the stuff is taken care automatically by streamManager which is created by default when you create any room

Thanks

Hironmay Basu

Avatar

Level 2

Great! Thanks for the answer! I thought that i need to define streams somehow.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----