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.

No audio: what gives?

Avatar

Level 4

'lo all

i've got this pretty simple audio app:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:rtc="AfcsNameSpace"
layout="absolute"
creationComplete="onCreationComplete()"
>
  
<mx:Script>
  <![CDATA[
   import com.adobe.rtc.events.StreamEvent;
   import com.adobe.rtc.events.CollectionNodeEvent;
   import com.adobe.rtc.events.SessionEvent;
    
   private function onCreationComplete ():void
   {
    connSesh.addEventListener(

     SessionEvent.SYNCHRONIZATION_CHANGE, onConnSeshSync);
    connSesh.login();
   }
    
   private function onConnSeshSync (event:SessionEvent):void
   {
    audPub.addEventListener(

     StreamEvent.STREAM_RECEIVE, onListen);
     
    audSub.addEventListener(

     CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onListen);
    audSub.addEventListener(

     StreamEvent.STREAM_RECEIVE, onListen);
    audSub.addEventListener(

     StreamEvent.CONNECTION_TYPE_CHANGE, onListen);
    audSub.addEventListener(

     StreamEvent.NO_STREAM_DETECTED, onListen);
     
    audPub.subscribe();
    audSub.subscribe();
     
    audPub.publish();
   }
    
   private function onListen (event:Event):void
   {
    trace('onListen');
   }
  ]]>
</mx:Script>
  
<rtc:AdobeHSAuthenticator
  id="auth"
  protocol="rtmfp"
  userName="my-adobe-account@my-website.com"
  password="my-password"
/>
   
<rtc:ConnectSession
  id="connSesh"
  roomURL="https://connectnow.acrobat.com/fbcocomo/FBCocomo001"
  authenticator="{auth}"
/>
  
<rtc:AudioPublisher
  id="audPub"
  connectSession="{connSesh}"
  codec="{SoundCodec.SPEEX}"
  useEchoSuppression="true"
/>
  
<rtc:AudioSubscriber
  id="audSub"
  connectSession="{connSesh}"
/>
  
</mx:Application>

'thing is: no audio, complete silence. any ideas why?

2 Replies

Avatar

Level 4

listening to stream receive:

audPub.addEventListener(

    StreamEvent.STREAM_RECEIVE, onListen);

indications are i'm getting one (well, the listener fires anyway) so i'm assuming something wrong with the AudioSubscriber set-up. none of the AudioSubscriber listeners are firing...

Avatar

Former Community Member

Hi,

I ran your exact same app and I was able to hear the audio. Did you have more than one instance of app running ? Remember you cant hear your own audio. You need to have at least 2 users in the room for listening to audio.

Hope this helps.

Thanks

Hironmay Basu