[FMS]AS3.0连接FMS的简单测试代码示例
[FMS]AS3.0连接FMS的简单测试代码示例as3与fms,rtmp与fms,as3连接fms
[FMS]AS3.0连接FMS的简单测试代码示例
- var fmsIP:String = "127.0.0.1";
- var fmsPath:String = "rtmp://" + fmsIP + "/audioOnLine_fms/";
- var myNC:NetConnection = new NetConnection();
- myNC.objectEncoding = ObjectEncoding.AMF0;
- myNC.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
- myNC.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
- function netStatusHandler(event:NetStatusEvent):void
- {
- switch (event.info.code)
- {
- case "NetConnection.Connect.Success":
- trace("酷播cuplayer提示:连接成功!")
- getStream();
- break;
- case "NetStream.Play.StreamNotFound":
- trace("酷播cuplayer提示:未找到视频文件: " + videoURL);
- break;
- }
- }
- function securityErrorHandler(event:SecurityErrorEvent):void
- {
- trace("酷播cuplayer提示:安全沙箱错误侦听: " + event);
- }
- function getStream():void
- {
- var myNS:NetStream = new NetStream(myNC);
- myNS.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
- movie.Live_video.attachNetStream(myNS);
- myNS.play("1");
- }
- myNC.connect(fmsPath)
热门文章推荐
- [FMS]Adobe FMS产品(Adobe Flash Media Server)使用介绍(组图)
- [FMS]Flash Media Server之教程附示例代码
- [RTMP]国产RTMP/HLS直播服务器simple-rtmp-server
- [WOWZA]用wowza流媒体服务器发布和播放直播流(RTMP)
- [RTMP]又一款rtmp类的服务器openrtmfp流媒体服务器
- [RTMP]adobe之FMS视频直播解决方案流程介绍(组图)
- [RTMP协议]实时消息传输协议 (RTMP) 常识性介绍
- [FMS]Adobe的Flash Media Server服务器(FMS服务器)安装
请稍候...