views:

19

answers:

1

Hi there,

I'm writing a flex app, which must record an audio and then playback. It records just fine, I can hear the flv on the server, but when it comes to the playback it cuts the end a little bit, and each time I ask to reproduce again it cuts a little bit more. What can it be? I guess it's something related to buffer management, but I don't know exactly. Any thoughts?

EDIT: Here's the code I'm using to playback. It is called from a mediator:

        var streamPlayClient:Object = new Object();
        this.stream.client = streamPlayClient;
        streamPlayClient.onPlayStatus = function(infoObject:Object):void {
            if (infoObject.code == "NetStream.Buffer.Flush") {
                stopPlayback();
            }
        }

        this.stream.play("flv:" + this.streamName);
A: 

As it turns out, I have to handle the NetStream.Buffer.Empty event, instead of the NetStream.Play.Complete or the NetStream.Buffer.Flush.

Thiago