How to Stream and Playback Live Video using Flash Media Server
This entry was posted on Aug 11 2009
Sorry for the lack of instruction or description. I would rather hand off some code that works, rather than no code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | var cameraPlayback:Video = new Video(); addChild(cameraPlayback); var camera:Camera = Camera.getCamera(); camera.setQuality(0,100); var publishStream:NetStream; var playbackStream:NetStream; var nc:NetConnection = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); var client:Object = {}; client.onBWCheck = function() { } client.onBWDone = function() { } nc.client = client; nc.connect("rtmp://YOUR_FMS_SERVER_URL/live/"); function onNetStatus(e:NetStatusEvent) { switch(e.info.code) { case "NetConnection.Connect.Success": publishStream = new NetStream(nc); publishStream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); publishStream.attachCamera(camera); publishStream.publish("myCamera"); playbackStream = new NetStream(nc); playbackStream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); playbackStream.play("myCamera"); cameraPlayback.attachNetStream(playbackStream); break; } } |

hi,
Please guide me to how to include Bandwidth Check and Playing the appropriate stream.
Also if we are streaming the Multi Bit rate (as Supported by Flash Media Live Encoder 3.1) then how to capture those streams.
Thanks in advance.
Regards
Vibs