Expand my Community achievements bar.

SOLVED

Recording to the repository

Avatar

Level 3

Thanks so much for the invite to the private beta, and the how-to e-mail.  We have started the testing and have successfully setup the repository server at repo.inmatecanteen.com… but no archives appear from LCCS.

We have tested successfully a PUT and it required a trailing ‘/’!

curl -k --anyauth -T test.txt <our url>

We ran the jar file as needed after figuring out the trailing ‘/’ was required.  No output was returned from running the command.

java -jar LCCSREPO.jar <account-name> <account-user> <password> --register-repository <our url> > output.txt

When testing with my flash application, I do not see any archives that show in the repository.  I have tried to make a button for both recording, and closing the archive manager.  Attached is my flash code for the connect session container.

Is there something I’m missing for the connect session container?  Is my repository working correctly?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:rtc="http://ns.adobe.com/rtc"
               minWidth="955" minHeight="600" currentState="logon" applicationComplete="loadComplete()">
    <s:layout>
        <s:VerticalLayout paddingBottom="6" paddingLeft="6" paddingRight="6" paddingTop="6" />
    </s:layout>
    <s:states>
        <s:State name="chooseRoom" />
        <s:State name="default" />
        <s:State name="logon" />
    </s:states>
    <fx:Script>
        <![CDATA[
            import com.adobe.rtc.events.SessionEvent;
            import com.adobe.rtc.archive.ArchiveManager;
            import com.adobe.rtc.session.managers.SessionManagerPlayback;
            import mx.utils.Base64Encoder;
           
            import mx.core.Application;
            import mx.core.FlexGlobals;
            import mx.events.FlexEvent;
           
            [Bindable] var roomName:String = "videochat";
            [Bindable] var roomURL:String = "<our Url>";
            [Bindable] var displayName:String = "Guest";
            [Bindable] var isPriviledged:Boolean = false;
           
            protected function loadComplete():void
            {
                //Read in the roomUrl from the flash vars.  If they fail, set an Error label and set
                //the room to default - videochat.
                try
                {
                    var flashVars = this.loaderInfo.parameters;
                    roomURL = "<our Url>" + flashVars.room;
                    if(flashVars.room == null)
                        roomURL = "<our Url>";
                    roomName = flashVars.room;
                }
                catch(error:Error)
                {
                    teamLabel.text = "Error: Invalid Room Specified.";
                    roomURL = "<our Url>";
                    //newRoomURL = "<our Url>";
                }
               
                //Read in the userName from the flash vars.  If failure, then name the user "Guest"
                try
                {
                    displayName = flashVars.userName;
                }
                catch(error2:Error)
                {
                    displayName = "Guest";
                }
               
                //Read in the priviledged boolean from flash vars.  If failure, set isPriviledged to false
                try
                {
                    isPriviledged = flashVars.isPriveledged;
                }
                catch(error3:Error)
                {
                    isPriviledged = false;
                }
               
                //userName.text = displayName;
                auth.userName = displayName;
                currentState = "default";
                session.login();
            }
           
            protected function session_Loaded():void
            {
                aPublish.publish();
                //Only record the conversation if the call is not priviledged
                //session.archiveManager.recordSession = isPriviledged ? false : true;
               
            }
           
            private function record():void
            {
                session.archiveManager.recordSession = recordButton.selected;
                session.archiveID = "archive1bitches";
            }
           
            private function closeArchiveManager():void
            {
                session.archiveManager.close();
            }
           
            protected function chooseRoom_click(event:MouseEvent):void
            {
                //chooseRoomCombo.selectedItem;
            }
        ]]>
    </fx:Script>
    <fx:Declarations>
        <rtc:AdobeHSAuthenticator id="auth" />
    </fx:Declarations>
   
    <s:Label id="teamLabel" fontSize="14" text="Title goes here" />
    <s:HGroup top="250" horizontalCenter="0">
        <s:ToggleButton id="recordButton" label="Record" includeIn="default" click="record()" 
                        height="50" width="150" />
        <s:Button id="closeButton" label="close" includeIn="default" click="closeArchiveManager()"
                  height="50" width="150" />   
    </s:HGroup>
   
    <rtc:ConnectSessionContainer id="session" roomURL="{roomURL}"
                                 authenticator="{auth}" autoLogin="false"
                                 height="90%" width="90%" includeIn="default" creationComplete="session_Loaded()">
        <rtc:WebCamera top="10" left="10" bottom="10" right="10"  />
        <rtc:AudioPublisher id="aPublish" />
        <rtc:AudioSubscriber id="aSubscribe" />
    </rtc:ConnectSessionContainer>
</s:Application>

1 Accepted Solution

Avatar

Correct answer by
Level 3

Yes, the ids either have to match or you can choose to not specify in both the recording and playback.

-Jamie

View solution in original post

9 Replies

Avatar

Level 3

Hi,

I tried your code and suspect there are 3 problems:

1.  You are logged in as a guest.  I believe only the host can make recordings.

2.  You stop the recording with session.archiveManager.close().  You should stop it with session.archiveManager.recordSession = false.

3.  You used session.archiveID = "archive1*******"; and set it after starting the recording.  I would stick to letters/numbers in the ID and set the archiveID before starting the recording.

After fixing these 3 issues, I was able to create a recording with your code.

Hope this helps,

Jamie

Avatar

Level 3

Thanks so much for your help.  I will get try to make a new build as soon as possible to test!

Avatar

Level 3

Ok great, I have recordings being PUT to the repository!  I'm now going to try my hand at playback.

How do I specify which video to playback?

I am following the example in SampleApps Playback.mxml.  I assume I use the host's credentials again?

I try to launch with my account/room specified, and I don't see anything but the loading bar.

Thanks again for your help.

Avatar

Employee

For playback in the current release you don't specify any user. The PlaybackAuthenticator does everything for you.

You should use the same URL you used for recording (same room) and specify the same archiveID (of course if you did multiple recording in the same room, you'll use the archiveID related to the recording you want to playback)

Avatar

Level 3

Ok, I run my updated project with an authenticator with no credentials, but end up getting:

Error: Error - insufficient permissions to create a new CollectionNode.  You must be an OWNER of the room to add new multi-user features to it.  Log in with developer credentials in order to do so.

Do I need to include the SharedWhiteBoard and Note objects like the playback sample?  My code looks like this (I am using the same roomUrl as my recording):

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:rtc="http://ns.adobe.com/rtc"
               xmlns:currentDir="*">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <rtc:PlaybackAuthenticator id="auth" />
    </fx:Declarations>
    <rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%"
                                 roomURL="-=My Room URL=-"
                                 archiveID="session">                      
        <mx:HBox top="10" right="10" left="10" bottom="10" verticalGap="6" horizontalAlign="center">
            <mx:VBox width="100%" height="100%" >
                <rtc:WebCamera id="myCamera" width="200" height="200" />
                <currentDir:PlaybackBar width="100%" height="200" />
            </mx:VBox>
        </mx:HBox>
    </rtc:ConnectSessionContainer>
</s:Application>


Avatar

Level 3

I don't see id="myCamera" in your code above. Did your webcam have that id when the recording was made? 

-Jamie

Avatar

Level 3

No it did not.  Do I need to make sure these id's match?  Or can I not specify just like my recording version of the program?

Thanks for your attention,

     -Eric

Avatar

Correct answer by
Level 3

Yes, the ids either have to match or you can choose to not specify in both the recording and playback.

-Jamie

Avatar

Level 3

Thanks so much!  It works great now.  I will put all the peices together and tweak the UI now!  Proof of concept = done.

Congratulations on the LCCS work folks.