我创建了一个基于red5 0.9版本的录音应用程序。
下面是我的 flex 客户端代码片段。我的 red5 服务器工作正常。
private var playStream:NetStream;
private function playRecord(event:MouseEvent):void{
if(isPausing){
playStream.togglePause();
}else{
playStream=getStream();
playStream.bufferTime=15;
playStream.play(streamName);
}
}
private function pauseRecord(event:MouseEvent):void{
playStream.togglePause();
}
我按下pause button
很好,但是当我按下时play button
,音频总是从头开始播放。
为什么?我需要清理 NetStream 缓冲区吗?