Write access denied for stream error when recording audio stream
Hi guys,
I've had FMS running on my local machine for a while and have had a little experience writing FMS apps, but I've just tried recording audio for the first time using the standard vod application and I keep getting a "Write access denied for stream" error. My AS3 code is copied and pasted for various examples and am confident that it works.
I'm running Windows XP service pack 3 & FMIS 3.5.
If anyone has any ideas? I've had a look at the vod/media directory and under windows->properties the read-only attribute is ticked. Every time I un-tick this it reverts back to being ticked. I've googled this and MS say that most programs ignore the read-only attribute and that it only really applied to files. I've also tried the MS fix for setting the read-only attribute via cmd and still no joy (doesn't fix read-only attribute or FMS recording the audio after setting via cmd).
I've also tried our dev server install of FMS (running under linux) and am getting the same results.
Here's my AS3 code...
private function initApp(event:Event):void
{
removeEventListener(Event.ADDED_TO_STAGE,initApp);
nc = new NetConnection();
nc.client = this;
nc.addEventListener(NetStatusEvent.NET_STATUS, handleNetStatus);
nc.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSecurityError)
nc.connect("rtmp://localhost/vod");
//--FORCE SETTING MIC MANAGER
var mic:Microphone = Microphone.getMicrophone();
stage.addEventListener(MouseEvent.CLICK ,handleMouseClick);
}
private function handleNetStatus(event:NetStatusEvent):void
{
switch (event.info.code)
{
case "NetConnection.Connect.Success":
trace("NC connected");
ns = new NetStream(nc);
var mic:Microphone = Microphone.getMicrophone();
trace('mic: ' + (mic));
ns.attachAudio(mic);
ns.addEventListener(NetStatusEvent.NET_STATUS, handleNetStreamNetStatus);
break;
case "NetStream.Publish.BadName":
trace("Please check the name of the publishing stream" );
break;
}
}
private function initNetStream():void
{
ns.publish("test", "record");
}
Thanks
Mike
