3 Replies Latest reply on Nov 28, 2011 5:48 AM by Silviu Vergoti

    Playback of Audio Stream in OSMF

    Stefan Dosch

      How do you play back an audio stream in OSMF?


      Apparently this is not working... the steam is loading, but CanPlay = false is fired. It's silent.


      protected function initMediaPlayer():void


           var mediaPlayer:MediaPlayerSprite = new MediaPlayerSprite();

           mediaPlayer.mediaPlayer.autoPlay = true;



           var audioElement:AudioElement = new AudioElement(new URLResource("http://listen.to.techno4ever.net/dsl/mp3"))


           mediaPlayer.media = audioElement;



      Not using OSMF this is working:


      protected function initSound():void


           var sound:Sound = new Sound();

           sound.load(new URLRequest("http://listen.to.techno4ever.net/dsl/mp3"));




      Thanks for any input on this...