急需帮助,关于播放rmtp视频的问题
代码如下
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://具体服务器地址");
nc.onStatus = function(info) {
trace(info.code);
if (info.code == "NetConnection.Connect.Success") {
trace("接通");
}
};
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(5);
ns.play("video001.flv");
theVideo.attachVideo(ns);
ns.onStatus = function(infoObject:Object) {
trace("infoObject.code is "+infoObject.code);
};
theVideo 是我在库里面新建的视频元件
服务器上的文件绝对存在,用FLVPlayback.contentPath这样加载就能看到
运行输出:
NetConnection.Connect.Success
接通
infoObject.code is NetStream.Play.Reset
infoObject.code is NetStream.Play.Start
然后就停止了,不再继续,不知问题在哪里,急求,请各位高手帮助
新手,分不多,抱歉抱歉