开发者

Why NetStream#togglePause() do not work?

开发者 https://www.devze.com 2023-03-25 15:46 出处:网络
I create a record audio application based on red5 0.9 version. Below is my flex client code snippets. My red5 server work fine.

I create a record audio application based on red5 0.9 version.

Below is my flex client code snippets. My red5 server work fine.

private var playStream:NetStream;

private function playRecord(event:MouseEvent):void{
  if(isPausing){
    playStream.togglePause();
  }else{
    play开发者_开发知识库Stream=getStream();
    playStream.bufferTime=15;
    playStream.play(streamName);
  }
}

private function pauseRecord(event:MouseEvent):void{
  playStream.togglePause();
}

I press pause button fine, but when i press play button, the audio always play form the begining.

Why? do i need to clean up NetStream Buffer?


I found solution myself.

playStream.maxPauseBufferTime=0;
0

精彩评论

暂无评论...
验证码 换一张
取 消