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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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
Level 10

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

0 Replies

Avatar

Correct answer by
Level 10

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

Level 10

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.