Open rubel opened 7 years ago
Strange. In the source code these are the important bits(in FWVideoEncoder.as):
res = ffmpeg_initFinished() as Boolean; } } // safe to call finish now if (res) { checkInitThreadFinished = false; // in AIR we remove this event listener again, in FlasCC we don't remove it, it is removed elsewhere CONFIG::AIR { removeEventListener(Event.ENTER_FRAME, enterFrame); } // dispatch event startRecording(); instance.dispatchEvent( new StatusEvent( StatusEvent.STATUS, false, false, "started", "")); }
So either ffmpeg_initFinished() doesn't return true or it's something else. Try to put a trace near the dispatchEvent to see if its really never dispatched and / or trace the return value of initFinished.
myEncoder = FWVideoEncoder.getInstance(this);
myEncoder.addEventListener(StatusEvent.STATUS, onStatus); myEncoder.load("../../lib/FlashPlayer/mp4/");
private function onStatus(e:StatusEvent):void { if (e.code == "ready") {
myEncoder.start(20, FWVideoEncoder.AUDIO_MICROPHONE); }
}