Open GoogleCodeExporter opened 9 years ago
import fly.sound.*;
var ssp:MP3StreamPlayer = new MP3StreamPlayer();
ssp.playStream("http://localhost:8000/");
Original comment by protot...@gmail.com
on 9 Apr 2009 at 2:20
This is the Flex Builder project I tested with:
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.utils.ByteArray;
import fly.sound.MP3StreamPlayer;
import fly.sound.events.SoundBufferEvent;
import fly.sound.events.TitleChangeEvent;
public class MP3StreamPlayerTest extends Sprite
{
private var _mp3StreamPlayer:MP3StreamPlayer;
public function MP3StreamPlayerTest()
{
_mp3StreamPlayer = new MP3StreamPlayer();
_mp3StreamPlayer.addEventListener
(TitleChangeEvent.TITLE_CHANGE, _titleChangeHandler);
_mp3StreamPlayer.addEventListener
(SoundBufferEvent.BUFFER_EMPTY, _test);
_mp3StreamPlayer.addEventListener
(SoundBufferEvent.BUFFERING, _test);
_mp3StreamPlayer.addEventListener(ProgressEvent.PROGRESS,
_test);
_mp3StreamPlayer.addEventListener(Event.COMPLETE,
_completeHandler);
_mp3StreamPlayer.addEventListener
(SoundBufferEvent.BUFFERING, _buffering);
_mp3StreamPlayer.playStream("http://streamURL:port");
}
private function _titleChangeHandler(e:TitleChangeEvent):void
{
trace(e.title);
}
private function _buffering(e:SoundBufferEvent):void
{
trace(e.entriesLoaded, "/", e.entriesTotal);
}
private function _test(e:Event):void
{
trace("test", e.type);
}
private function _completeHandler(e:Event):void
{
_sound = _mp3StreamPlayer.sound;
}
}
}
Original comment by eeco...@gmail.com
on 9 Apr 2009 at 8:03
Issue 8 has been merged into this issue.
Original comment by eeco...@gmail.com
on 9 Apr 2009 at 8:04
Original issue reported on code.google.com by
fgdfgdfg...@gmail.com
on 9 Mar 2009 at 11:13