Re: [flexcoders] recieve RTMP Stream in flex? This can't be this hard?
I'm having similar headaches!! :) I've handled onMetaData, but now I get an asyncherror about streamInfo, which I can't place anywhere. Were you able to get your video and videoDisplay to play nice? On 10/6/06, eccentricwade [EMAIL PROTECTED] wrote: I am trying to connect to an RTMP stream from the Flash Media server in Flex 2. I have yet to be able to pull this off. Following the api I have the following class in the components directory and below that the mxml. This is the error that I receive. Any ideas on how to make this work would be greatly appreciated. Video Example! netStatusHandler connectStream netStatusHandler Unable to locate video: rtmp://10.3.0.104/iscam1 -- Wade package components { import flash.display.Sprite; import flash.events.*; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; public class VideoExample extends Sprite { private var videoURL:String = rtmp://10.3.0.104/iscam1; private var connection:NetConnection; private var stream:NetStream; public function VideoExample() { trace(Video Example!); connection = new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); connection.connect(null); } private function netStatusHandler(event:NetStatusEvent):void { trace(netStatusHandler); switch (event.info.code) { case NetConnection.Connect.Success: connectStream(); break; case NetStream.Play.StreamNotFound: trace(Unable to locate video: + videoURL); break; } } private function connectStream():void { trace(connectStream); var stream:NetStream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var video:Video = new Video(); video.attachNetStream(stream); stream.play(videoURL); addChild(video); } private function securityErrorHandler(event:SecurityErrorEvent):void { trace(securityErrorHandler: + event); } private function asyncErrorHandler(event:AsyncErrorEvent):void { // ignore AsyncErrorEvent events. } } } AND THE MXML ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:T8=components.* layout=vertical horizontalAlign=left T8:VideoExample / /mx:Application -- John Wilker Vice President Software Development/Writer Red Omega Solutions, Inc. www.johnwilker.com / www.red-omega.com Everything changes, nothing remains without change. ~Buddha c.483 bc
Re: [flexcoders] recieve RTMP Stream in flex? This can't be this hard?
a good example of thathttp://flash-communications.net/technotes/fms2/flex2FMS/index.htmlRegards On 10/6/06, eccentricwade [EMAIL PROTECTED] wrote: I am trying to connect to an RTMP stream from the Flash Media server in Flex 2. I have yet to be able to pull this off. Following the api I have the following class in the components directory and below that the mxml. This is the error that I receive. Any ideas on how to make this work would be greatly appreciated. Video Example! netStatusHandler connectStream netStatusHandler Unable to locate video: rtmp://10.3.0.104/iscam1 -- Wade package components { import flash.display.Sprite; import flash.events.*; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; public class VideoExample extends Sprite { private var videoURL:String = rtmp://10.3.0.104/iscam1; private var connection:NetConnection; private var stream:NetStream; public function VideoExample() { trace(Video Example!); connection = new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); connection.connect(null); } private function netStatusHandler(event:NetStatusEvent):void { trace(netStatusHandler); switch (event.info.code) { case NetConnection.Connect.Success: connectStream(); break; case NetStream.Play.StreamNotFound: trace(Unable to locate video: + videoURL); break; } } private function connectStream():void { trace(connectStream); var stream:NetStream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var video:Video = new Video(); video.attachNetStream(stream); stream.play(videoURL); addChild(video); } private function securityErrorHandler(event:SecurityErrorEvent):void { trace(securityErrorHandler: + event); } private function asyncErrorHandler(event:AsyncErrorEvent):void { // ignore AsyncErrorEvent events. } } } AND THE MXML ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns:T8=components.* layout=vertical horizontalAlign=left T8:VideoExample / /mx:Application -- Igor Costawww.igorcosta.com __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] recieve RTMP Stream in flex? This can't be this hard?
I am trying to connect to an RTMP stream from the Flash Media server in Flex 2. I have yet to be able to pull this off. Following the api I have the following class in the components directory and below that the mxml. This is the error that I receive. Any ideas on how to make this work would be greatly appreciated. Video Example! netStatusHandler connectStream netStatusHandler Unable to locate video: rtmp://10.3.0.104/iscam1 -- Wade package components { import flash.display.Sprite; import flash.events.*; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; public class VideoExample extends Sprite { private var videoURL:String = rtmp://10.3.0.104/iscam1; private var connection:NetConnection; private var stream:NetStream; public function VideoExample() { trace(Video Example!); connection = new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); connection.connect(null); } private function netStatusHandler(event:NetStatusEvent):void { trace(netStatusHandler); switch (event.info.code) { case NetConnection.Connect.Success: connectStream(); break; case NetStream.Play.StreamNotFound: trace(Unable to locate video: + videoURL); break; } } private function connectStream():void { trace(connectStream); var stream:NetStream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var video:Video = new Video(); video.attachNetStream(stream); stream.play(videoURL); addChild(video); } private function securityErrorHandler(event:SecurityErrorEvent):void { trace(securityErrorHandler: + event); } private function asyncErrorHandler(event:AsyncErrorEvent):void { // ignore AsyncErrorEvent events. } } } AND THE MXML ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:T8=components.* layout=vertical horizontalAlign=left T8:VideoExample / /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/