Expand my Community achievements bar.

SharedWhiteboard permissions

Avatar

Level 2
I am trying to use the SharedWhiteboard. I have the toolbar
up and am selecting to draw on the board. However when I draw on
the board I get this exception thrown



throw new Error("SharedWhiteBoard - insufficient permissions
to draw");



My question is how do I set the permission to draw? I am
using a SharedProperty, have subscribed to the SharedWhiteboard,
and set the connectSession. Here is the declaration code:



<session:ConnectSessionContainer id="cSession"
authenticator="{auth}"

roomURL="
http://connectnow.acrobat.com/myurl"

backgroundColor="#404040"

width="100%" height="100%">



<pods:SharedWhiteBoard id="whiteboard"
connectSession="{cSession}" sharedID="webcamShare2"

width="400" height="400" popupShapesToolBar="true"

horizontalCenter="0" verticalCenter="0"/>



In my createComplete code I have this:

private function onCreationComplete():void

{



if( whiteboard.shapesToolBar == null)

{



}

else

{

whiteboard.shapesToolBar.visible = true;

}





progress.label = "Registration Complete";

progress.setProgress(100,100);



currentState = "";



cSession.roomManager.autoPromote = true ;

cSession.roomManager.guestsHaveToKnock = false ;

sharedProperty = new SharedProperty();

sharedProperty.isSessionDependent = true ;

sharedProperty.sharedID = "webcamShare2" ;

sharedProperty.connectSession = cSession ;

sharedProperty.subscribe();

sharedProperty.addEventListener(SharedPropertyEvent.CHANGE,
onChange);



whiteboard.connectSession = cSession;

whiteboard.subscribe();



18 Replies

Avatar

Former Community Member
Hi,



Looking at your code, I can see you are entering as guest and
promoting the user to a publisher role i.e. role =50. But for the
first time, you need to go in once as a host to create the
underlying model and the collectionNode . Once you run this code as
a host the first time, this code will start working for any guests
that come in afterwords.



Also, if you are putting SharedWhiteBoard already under
connectsessioncontainer tag, you don't need to call subscribe and
assign connectsession to it again in the code, as the container
subscribes all its child afcs components.



Hope this helps.



Thanks

Hironmay Basu

Avatar

Level 2
I found this post
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1419793&e...



But it is not helping. I am using the online account manager.
Not developing against a local server. I am logging in with my
adobe id and password yet the whiteboard collection node seems to
not be getting installed.



Any ideas on what to do?



Thanks.

Avatar

Level 2
OK. I was just trying different things with the code. I
logged in as the host like you said but keep getting the same
error.

Avatar

Former Community Member
Hi,



Can you paste the Debug console log in flex builder right
from beginning when you enter as host?



Thanks

Hironmay Basu

Avatar

Former Community Member
Hi dhavrda,



The issue you seem to be hitting is that you're not *really*
coming in as a host - can you try clearing your browser session
(restarting a browser usually does this) and logging in again?



One question I have is why you're manually toggling the
visibility of the shapesToolBar? The whiteboard should be able to
do this by itself. Here, you're exposing the toolbar to guests who
shouldn't have access to it (it's always there, just invisible to
guests).



nigel

Avatar

Level 2
I am toggling the visibility of the toolbar because I do not
see one at all. I also don't see a way to show it. As you said,
most likely the reason is because I don't have the permission to
write on the board for some reason. I imagine once that's resolved
I should not have to toggle it.

Avatar

Level 2
So exactly what do you mean by logging in as host? If you
mean using my adobe id and password for my cocomo dev account and
room, I am doing that. It doesn't seem to be making any difference.
I just can't get to the point to where I can see the toolbars or
rights to draw. Here are my debug prints: I have replaced myroomurl
and displayname to keep the real ones anonymous.



AFCS Beta Build # : 0.91

authentication complete

requestInfo
http://connectnow.acrobat.com/myroom?guk=ZzpoYXZyZGFAeWFob28uY29tOg==&mode=xml&x=0.23298097401857376

start our progress indicator

getMeetingInfo: status=0

Getting FMS at
https://na2.connectnow.acrobat.com/fms?ticket=fsm4falxilmk, attempt
#1/3

result: <fms>

<origin>fms4.acrobat.com</origin>

<proto_ports>rtmps:443</proto_ports>

<retry_attempts>2</retry_attempts>

</fms>

#FMSConnector# Tue Mar 3 15:07:08 GMT-0600 2009 protocols:
[object ProtocolPortPair]

#FMSConnector# Tue Mar 3 15:07:08 GMT-0600 2009 [attempt 1 of
2] Connecting to 0/0:
rtmps://fms4.acrobat.com/cocomo/na2-sdk-acc0fd8e-4536-439a-8e23-c272f03cfa27/dave
#startProtosConnect#

#FMSConnector# Tue Mar 3 15:07:08 GMT-0600 2009
tempNetStatusHandler 0/1,NetConnection.Connect.Success

#FMSConnector# Tue Mar 3 15:07:08 GMT-0600 2009 isTunneling?
false

#FMSConnector# Tue Mar 3 15:07:08 GMT-0600 2009 is using
RTMPS? true

RECEIVED LOGIN AT SESSION

.user descriptor from server [object]

\\

.userID [string]= GUEST-3A5220C7-EBCD-4AA4-9BB2-CBD2258C84E7

.affiliation [number]= 5

.displayName [string]= myemailaddresswashere

.role [number]= 50

RECEIVENODES UserManager

receiveAllSynchData UserManager

RECEIVENODES FileManager

receiveAllSynchData FileManager

checkManagerSync:[object FileManager]

RECEIVENODES AVManager

receiveAllSynchData AVManager

checkManagerSync:[object StreamManager]

RECEIVENODES RoomManager

receiveAllSynchData RoomManager

checkManagerSync:[object RoomManager]

checkManagerSync:[object UserManager]

onCreateComplete start

RECEIVENODES webcamShare2

receiveAllSynchData webcamShare2

RECEIVENODES webcamShare2

receiveAllSynchData webcamShare2

warning: unable to bind to property 'userID' on class
'com.adobe.rtc.sharedManagers.descriptors::UserDescriptor' (class
is not an IEventDispatcher)

null

Avatar

Former Community Member
Hi dhavrda,



Sorry, you're right, when I said "as host", I meant "with
your dev account credentials". From what I'm seeing here, you're
being logged in as a guest, but are coming in with role of 50 (your
autoPromote is true, so this makes sense).



Based on the fact that (I think) you saw your email address
as the userName, it seems as though you're not entering a password?
I'm a little hazy as to what's happening here.



Try this :



1) close your browser (exit it completely).

2) Make sure your account username and password are in the
authenticator

3) Run.



Let us know how it goes.

nigel

Avatar

Level 2
OK A step in the right direction. Clearing the cache between
each attempt was definitely critical. So I log in and get a
permission of 100. I suppose that is better than the 50 before.
However I still have no drawing toolbar. Shouldn't I now be seeing
the toolbar by default? Here is my new debug output:



AFCS Beta Build # : 0.91

requestInfo
http://connectnow.acrobat.com/myroomurl?mode=xml&x=0.5913949408568442

start our progress indicator

getMeetingInfo: status=0

authentication status: 0

authentication request complete

authentication complete

requestInfo
http://connectnow.acrobat.com/myroomurl?gak=c2Vzc2lvbklEKklmcDdaU3NCaERiV1JpMWhnM3NCcWcqYXBwTnVtKjYz...

getMeetingInfo: status=0

Getting FMS at
https://na2.connectnow.acrobat.com/fms?ticket=1gtqun701571s,
attempt #1/3

result: <fms>

<origin>fms4.acrobat.com</origin>

<proto_ports>rtmps:443</proto_ports>

<retry_attempts>2</retry_attempts>

</fms>

#FMSConnector# Tue Mar 3 15:37:21 GMT-0600 2009 protocols:
[object ProtocolPortPair]

#FMSConnector# Tue Mar 3 15:37:21 GMT-0600 2009 [attempt 1 of
2] Connecting to 0/0:
rtmps://fms4.acrobat.com/cocomo/na2-sdk-acc0fd8e-4536-439a-8e23-c272f03cfa27/dave
#startProtosConnect#

#FMSConnector# Tue Mar 3 15:37:21 GMT-0600 2009
tempNetStatusHandler 0/1,NetConnection.Connect.Success

#FMSConnector# Tue Mar 3 15:37:21 GMT-0600 2009 isTunneling?
false

#FMSConnector# Tue Mar 3 15:37:21 GMT-0600 2009 is using
RTMPS? true

RECEIVED LOGIN AT SESSION

.user descriptor from server [object]

\\

.userID [string]= WCD-52032F054527ADC0992015C3

.affiliation [number]= 100

.displayName [string]= Robert Havrda

.role [number]= 100

RECEIVENODES UserManager

receiveAllSynchData UserManager

RECEIVENODES FileManager

receiveAllSynchData FileManager

checkManagerSync:[object FileManager]

RECEIVENODES AVManager

receiveAllSynchData AVManager

checkManagerSync:[object StreamManager]

RECEIVENODES RoomManager

receiveAllSynchData RoomManager

Creating:roomAccess

checkManagerSync:[object RoomManager]

checkManagerSync:[object UserManager]

onCreateComplete start

RECEIVENODES webcamShare2

receiveAllSynchData webcamShare2

RECEIVENODES webcamShare2

receiveAllSynchData webcamShare2

Avatar

Former Community Member


You shouldn't need to manually subscribe the whiteboard -
try removing that line - All UIComponent-based components do this
automatically themselves. Could you send all of your MXML (no need
for authenticator)?

Avatar

Former Community Member


HI Dhavrda,



This is pretty baffling - I see nothing obviously wrong. I
finally got the chance to run your code, and once I came in as an
OWNER, everything worked for me (in my room, obviously). My sense
here is that you haven't run all code as an OWNER, in order to
install the necessary facilities in your room.



nigel

Avatar

Level 2
OK So how do I do that? I am logging in with the same
credentials that I use to log in to the application here
https://cocomo.acrobat.com/. That is the one where you can create
rooms. I guess I don't understand where I am supposed to log in as
the owner other than what I am doing in the code. I don't have any
other user. The user I use is the owner as far as I know.



Also in a previous debug I posted I am indeed the owner as
the role is 100. UserRoles.OWNER = 100. Seems very odd that I could
be the owner and this still not work. Is there some other step I
have to do that I am unaware of?



Are you running against a local server or against the hosted
one?

Avatar

Former Community Member
Hi,



I also ran your code and I could also run the entire code
when I log in as Owner and everything looks fine to me and I run
using my account against the same production server as you are
running.



I will suggest one thing. Go to afcs.acrobat.com and log in
to your account in dev portal. Then create a new room and use the
new room url along with your userName and password to see if it
works for you. And of course, close and clear the browser cache
before running again.



Hope this helps.



Thanks

Hironmay Basu

Avatar

Level 2
OK Did everything as you said. Here is my output from my
login



RECEIVED LOGIN AT SESSION

.user descriptor from server [object]

\\

.userID [string]= WCD-52032F054527ADC0992015C3

.affiliation [number]= 100

.displayName [string]= Robert Havrda

.role [number]= 100

RECEIVENODES UserManager

receiveAllSynchData UserManager



As you can see the 100 shows I am the owner. Yet no
whiteboard toolbar.

Avatar

Former Community Member


Hi Robert,



Aha, I think I just figured out what's wrong here - you've
given both the sharedProperty and the sharedWhiteboard the same
sharedID, "webcamShare2". You should make all your sharedIDs
different for different parts of the app, just as you would for
ids.



Maybe we should throw a runtime exception for this case, to
make it easier to detect.



nigel

Avatar

Level 2
OK yes I will try that and see how it goes.

Avatar

Level 2
That was it. Works now! Thanks. And yes maybe there should be
an exception thrown in this case. It did take a long time to figure
out with no indications that that was the problem.

Appreciate it.