Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

audio publish

Avatar

Level 2

Could somebody give some basic instruction into how to activate the audio publish/subscribe elements in flashbuilder 4 please?

Just placing them on the page doesn't do anything so what do I need to do?

<?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" minWidth="955" minHeight="600" xmlns:rtc="http://ns.adobe.com/rtc">

<fx:Declarations>

<!-- Place non-visual elements (e.g., services, value objects) here -->

<s:Move duration="500" id="moveEffect"/>

<s:Resize duration="500" id="resizeEffect"/>

</fx:Declarations>

<fx:Script>

<![CDATA[

import mx.events.FlexEvent;

Ê

Ê

Ê

protected function txtUsername_enterHandler(event:FlexEvent):void

{

// TODO Auto-generated method stub

connectRoom.login();

labelUserName.visible = false;

txtUsername.visible = false;

}

protected function btnZoomScreen_clickHandler(event:MouseEvent):void

{

// TODO Auto-generated method stub

if(btnZoomScreen.label == "Zoom In"){

moveEffect.targets = [scrshare];

moveEffect.xTo = 364;

moveEffect.yTo = 10;

moveEffect.play();

Ê

resizeEffect.target = scrshare;

resizeEffect.widthTo = 1000;

resizeEffect.heightTo = 600;

resizeEffect.play();

Ê

btnZoomScreen.label = "Zoom Out";

Ê

btnZoomScreen.y = 620;

}else{

moveEffect.targets = [scrshare];

moveEffect.xTo = 364;

moveEffect.yTo = 10;

moveEffect.play();

Ê

resizeEffect.target = scrshare;

resizeEffect.widthTo = 936;

resizeEffect.heightTo = 427;

resizeEffect.play();

Ê

btnZoomScreen.label = "Zoom In";

Ê

btnZoomScreen.y = 620;

}

}

protected function button1_clickHandler(event:MouseEvent):void

{

// TODO Auto-generated method stub

}

]]>

</fx:Script>

<rtc:ConnectSessionContainer roomURL="https://collaboration.adobelivecycle.com/publishing1/studentShare"

autoLogin="false" width="100%" height="100%" x="0" y="0"

id="connectRoom">

<rtc:authenticator>

<rtc:AdobeHSAuthenticator userName="{txtUsername.text}"/>

</rtc:authenticator>

<rtc:SimpleChat width="346" height="427" x="10" y="10">

</rtc:SimpleChat>

<rtc:Roster width="342" height="136" x="16" y="454">

</rtc:Roster>

<rtc:WebCamera height="149" width="149" x="366" y="445"/>

<rtc:ScreenShareSubscriber id="scrshare" height="427" width="936" x="364" y="10"/>

<mx:LinkButton x="1104" y="573" label="Zoom In" id="btnZoomScreen" click="btnZoomScreen_clickHandler(event)"/>

<s:Label id="labelScreen" text="Student Live Chat and Screenshare" x="1064" y="551" fontSize="14" fontWeight="bold"/>

<s:Button x="1224" y="448" label="Audio" id="audioPub" click="button1_clickHandler(event)"/>

<rtc:AudioSubscriber x="964" y="466" height="21" width="34"/>

<rtc:AudioPublisher x="1006" y="466" useEchoSuppression="false" gain="50" silenceTimeout="2000" width="31"/>

</rtc:ConnectSessionContainer>

<s:Label id="labelUserName" text="Enter a user Name" x="369" y="448"/>

<s:TextInput id="txtUsername" x="368" y="466" width="197" enter="txtUsername_enterHandler(event)"/>

</s:Application>

Thanks in advance

Ian

2 Replies

Avatar

Former Community Member

Hi Ian,

To get the components to start publishing, you have to call their

respective .publish() functions. Have a look at the sample apps and docs,

which should explain most of this.

nigel

Avatar

Level 2

Thanks Nigel,

I'll have a look at those.