Hi every one
i am workinf in an lccs based application and i am using the Knocking for user roles amd permission.my app has audio and video publishing functionality.the users with the role viewer are not allowed to publish their audio.only they are allowed by the user when asking for permission.for examle when a user want to ask question he rases hand ,i am doing this throuhg knocking que,user que. i inserted a user que item on raising hand of a user of role viewer.but the problem is that user que is not updating on pushing that item in the knocking que.i am making use of the example as given in the sdk.if any one understand my problem ,please guide me.here is my code.
userQueItem=new UserQueueItem();
userQueItem.userID=lccsConnectSession.userManager.myUserID;
userQueItem.dealtBy="Owner";
userQueItem.descriptor=lccsConnectSession.userManager.getUserDescriptor(lccsConnectSession.userManager.myUserID);
userQueItem.message=raiseHand;
userQueItem.status=UserQueueItem.STATUS_PENDING;
userQueItem.response="NAN";
lccsConnectSession.roomManager.knockingQueue.pendingQueue.push(userQueItem);
//userQueItem.createValueObject();
lccsConnectSession.roomManager.knockingQueue.queue.push(userQueItem);
lccsConnectSession.roomManager.knockingQueue.addEventListener(UserQueueEvent.ITEM_UPDATE,knockingQueueUpdate_Handler);
--------------
private function queItemUpdate_Handler(event:UserQueueEvent):void
{
Alert.show("item Update");
}
//knocking Que update handler
private function knockingQueueUpdate_Handler(event:UserQueueEvent):void
{
//Alert.show("knocking que update");
var pendingArray:Array = new Array();
// For the pending list you can directly use the pendingQueue property in UserQueue. For details,
// see the onCreationComplete documentation in the LCCS API Reference.
var acceptedArray:Array = new Array();
var deniedArray:Array = new Array();
var queue:Array = lccsConnectSession.roomManager.knockingQueue.queue ;
for ( var i:int = 0 ; i < queue.length ; i++ )
{
var item:UserQueueItem = queue[i] as UserQueueItem ;
tempUserID=item.descriptor.userID;
if( item.status == UserQueueItem.STATUS_PENDING )
{
pendingArray.push(item);
}
//still we are not using the accepted and denied arrays
if ( item.status == UserQueueItem.STATUS_ACCEPTED )
{
acceptedArray.push({label:item.descriptor.displayName,descriptor:item.descriptor});
}
if( item.status == UserQueueItem.STATUS_DENIED )
{
deniedArray.push({label:item.descriptor.displayName,descriptor:item.descriptor});
}
}
if(pendingArray.length>=0)
{
if(lccsConnectSession.userManager.myUserRole==UserRoles.OWNER)
{
for ( var j:int = 0 ; j < pendingArray.length ; j++ )
{
//var conAlert:Alert;
tempUserID=pendingArray[j].descriptor.userID.toString();
conAlert=Alert.show(pendingArray[j].descriptor.displayName.toString()+":"+" want to Attend Meeting \n","Meeting Entry Permission",Alert.YES|Alert.NO,this,alertClose_Hanlder);
conAlert.width=300;
conAlert.height=150;
conAlert.setStyle("backgroundColor","#FFFFFF");
conAlert.setStyle("borderColor","#000000");
conAlert.setStyle("barColor","#FFFFFF");
conAlert.setStyle("color","#7b9df2");
conAlert.setStyle("fontWeight","bold");
conAlert.setStyle("fontSize","14");
}
}
}
}
thanks
Regards
Xaibaan
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I ran through your code and its not working because
a) You are not using the "request" API of UserQueue. Its the request API that adds the user to the queue by sending a message which is received by all OWNERS ( since the accessModel of the request node is 100 ) . Every Owner when he gets the message , adds the user to the pending queue and can later accept/deny the user
b) The pendingQueue and queue APIs of UserQueue class only returns the current pendingQueue and Queue( includes accept/deny/cancelled) and doesn't modify the queue as such. Thats why you are not seeing any change in the pendingQueue of the owners.
c) When you are dealing with such custom UserQueue problems, instead of using RoomManager's KnockingQueue, you should ideally use UserQueue( which is a model by itself) and UserQueueItem classes directly .
Hope this helps
Thanks
Regards
Hironmay Basu
Views
Replies
Total Likes
Hi,
I ran through your code and its not working because
a) You are not using the "request" API of UserQueue. Its the request API that adds the user to the queue by sending a message which is received by all OWNERS ( since the accessModel of the request node is 100 ) . Every Owner when he gets the message , adds the user to the pending queue and can later accept/deny the user
b) The pendingQueue and queue APIs of UserQueue class only returns the current pendingQueue and Queue( includes accept/deny/cancelled) and doesn't modify the queue as such. Thats why you are not seeing any change in the pendingQueue of the owners.
c) When you are dealing with such custom UserQueue problems, instead of using RoomManager's KnockingQueue, you should ideally use UserQueue( which is a model by itself) and UserQueueItem classes directly .
Hope this helps
Thanks
Regards
Hironmay Basu
Views
Replies
Total Likes
Hi
1)thanks Hironmay for your response .this was helful for me but tell me if i dont use the knocking que and pending que and directly use the userQue then how can i push the userQue item of the pending user in the UserQue because we can not push the userQue item to the userQue.
Or you means to say that i should call only the UserQue.Request()method to add request to the Que.
if you have any code snipet then send me beacuse i am still stuck in the same problem.i have edit my code like this in the below code
//lccsConnectSession is connect session container
userQue:UserQueue=new UserQueue();
userQue.connectSession=lccsConnectSession;
//userQue.collectionNode=callsSharedCollection;
userQue.roleForRequesting=UserRoles.VIEWER;
userQue.roleForManaging=UserRoles.OWNER;
userQue.subscribe();
userQue.request("Allow for speak",lccsConnectSession.userManager.getUserDescriptor(lccsConnectSession.userManager.myUserID));
2)i have another question,is it possible for me to record screen share session and get the .flv file of my screen share session.if i am using the screen share publisher and subscriber to publish and subscribe to screen.
i know audio and video recording is not possilble because it is not yet relesed publicaly.but iam not sure about the screen share.
Thanks &Regards
Xaibaan
Views
Replies
Total Likes
Hi ,
a) Yes the request method adds it to the queue. Take a look at the code and you will realize in request function, the user requesting publishes an item which is received by the owner and the owners update their pendingQueue.
I don't have a code snippet as such but when you call request what is happening, try out this linking to the source files. Open two instances , one and owner and another as viewer and let the viewer call the request method, see if the owner gets it or not. And if he gets , whether he updates his queue or not. The code suggests it should. Build a simple example using UserQueue and UserQueueItem for this and try out. And link to our sources for debugging.
b) you can record everything but then you need to have permission for recording and for that you need to get access to our recording feature since its still in private beta with access on request.
Thanks
Hironmay Basu
Views
Replies
Total Likes