我们正在尝试使用ActionScript 3中的NetConnection对象和NetStream将视频录制到Flash Media Server.Flash Media Server已在Windows 2003 Server环境中设置。
以下是我们用于将网络摄像头流式视频发送到Flash服务器的代码:
ns = new NetStream(nc); //nc is an instantiated NetConnection object
ns.client = new CustomClient();
ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
if(media)
{
ns.attachCamera(cam);
}
ns.attachAudio(mic);
ns.bufferTime = .1;
addEventListener(Event.ENTER_FRAME,vuMeter);
ns.publish("recording" + timestamp, "record");
执行此脚本时,它会很好地连接到服务器,但会生成以下错误消息:
NetStream.Record.NoAccess
这似乎与Windows目录权限问题有关,因为我们能够连接到服务器但不向其写入视频。不幸的是,我们对Windows 2003 Server和Flash Media Server都没有太多帮助。
有关可能导致此错误的原因/如何修复它的任何想法?
答案 0 :(得分:0)
Interesting read here关于Windows中目录的只读属性。似乎解决方案似乎是从命令行中删除目录的只读属性,如下所示:
attrib -r drive:\<path>\<foldername>
答案 1 :(得分:0)
问题不是权限问题,而是我们安装了Flash Media Streaming Server。 &#39; Streaming&#39;版本只允许从服务器读取。为了写入服务器,我们需要安装Flash Media Interactive 服务器。