NetStream.appendBytes
我有一个连接到 Flash Media Server 的 netConnection。我正在尝试使用 Flash Player 10.1 中的新appendBytes 函数将本地FLV 文件流式传输到FMS。但是我遇到了问题...我在网上获取的文档
function playFile(data:ByteArray):void
{
// data is bytearray data from an already loaded FileReference object
netStream.play(null);
netStream.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
netStream.appendBytes(data);
}
但是,我在appendBytesAction 和appendBytes 方面遇到了错误。错误是:错误#2004:其中一个参数无效......
TypeError: Error #2004: One of the parameters is invalid.
有什么想法吗? 谢谢
I have a netConnection connected to a Flash Media Server. I am trying to use the new appendBytes function from Flash Player 10.1 to stream a local FLV file to FMS. I'm having issues however... Documentation I get online
function playFile(data:ByteArray):void
{
// data is bytearray data from an already loaded FileReference object
netStream.play(null);
netStream.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
netStream.appendBytes(data);
}
However, I'm getting an error with the appendBytesAction and appendBytes. The error is: Error #2004: One of the parameters is invalid....
TypeError: Error #2004: One of the parameters is invalid.
Any ideas?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当流的
NetConnection
连接到除“null”之外的任何其他内容时,您无法成功使用appendBytes
。来自 http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#appendBytes%28%29:这几乎肯定意味着 Adobe 所谓的“数据生成模式”在连接到 Flash Media Server 实例的连接对象上不可用。
You can't use
appendBytes
successfully when your stream'sNetConnection
is connected to anything else than "null". From the documentation ofappendBytes
method at http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#appendBytes%28%29:This almost certainly implies that what Adobe calls "Data Generation Mode" will not be available on a connection object connected to say, a Flash Media Server instance.