Video streaming with FMS for Android
Hi,
I am currently building a movie player which will play movie stored in the FMS with my PC as localhost(later on i will port it to my Android device).However,through the following code, I tried to just simply connect to the localhost to retrieve one of the video,but it keep popping out errors which I don't get it.
nc = new NetConnection();
nc.connect("rtmp://localhost/vod");
ns = new NetStream(nc);
ns.client = customClient;
customClient.onMetaData = metaDataHandler;
ns.play("mp4:Vultures");
vid.width = 800;
vid.height = 390;
vid.attachNetStream(ns);
addChild(vid);
Error log:
ArgumentError: Error #2126: NetConnection object must be connected.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at MoviePlayer/video()
at MoviePlayer()
at Main/gotoMoviePlayer()
at Details/playMovie()
ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.
at MoviePlayer/video()
at MoviePlayer()
at Main/gotoMoviePlayer()
at Details/playMovie()
If anyone can shed some light or any advice,I really appreciate it.Thanks!
Regards,
Tan
