Salut
en fin réussi il fallait seulement chager le port http dans red5/conf/
red5.proprietes
Merci ekameleon :D

On 7 mar, 10:06, Sézard_damian <[email protected]> wrote:
> Re
> Je précise seulement que je n'ai rien touché côté serveur RED 5
> puisque les enregistrements se font dans le répertoire oflademo c'est
> une application déjà prête dans le red 5
>
> Sézard_damian a écrit :
>
> > Hi et merci pour cette réponse très précise
> > alors pour la version de res 5 c'est
> > *RED5 0.7.0 j'ai installé la version standaloone donc autonome
> > * je compile utilisant le FP9
> > * oui je travail en local
> > voici le code complet qui assure l'affichage dans mon système ainsi
> > l'enregistrment et la connexion avec le RED 5
> > //////////////////////////////////////:
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Canvas backgroundColor="#eeeeee" creationComplete="init()"
> > xmlns:mx="http://www.adobe.com/2006/mxml";
> > xmlns:utils="com.dougmccune.utils.*"
> > xmlns:controls="com.dougmccune.controls.*">
> >            <mx:RemoteObject id="myservice" fault="faultHandler(event)"
> > showBusyCursor="true" source="PictureService" destination="amfphp">
> >         <mx:method name="savePNG" result="resultHandler(event)"
> > fault="faultHandler(event)" />
> >     </mx:RemoteObject>
> >    <mx:Script>
> >            <![CDATA[
> >                    import mx.managers.PopUpManager;
> >                    import mx.events.CloseEvent;
> >                    import flash.utils.clearInterval;
> >            import flash.display.*;
> >            import flash.display.MovieClip;
> >            import flash.media.Video;
> >            import flash.media.Microphone;
> >            import flash.media.Video;
> >            import flash.net.NetConnection;
> >            import flash.net.NetStream;
> >            import flash.events.NetStatusEvent;
> >            import flash.events.AsyncErrorEvent;
> >            import flash.display.SimpleButton;
> >            import flash.text.*;
> >            import flash.system.SecurityDomain;
> >            import flash.system.Security;
> >            import flash.net.Responder;
> >            import flash.net.NetStream;
> >                    import flash.utils.setInterval;
> >                    import mx.graphics.codec.JPEGEncoder;
> >                    import mx.controls.Alert;
> >                    import mx.core.UIComponent;
> >                    import mx.managers.CursorManager;
> >                    import mx.rpc.events.ResultEvent;
> >                    import mx.rpc.events.FaultEvent;
> >                    import mx.messaging.AbstractConsumer;
> >                    import mx.core.UIComponent;
> >                    import mx.core.IUIComponent;
> >                    import mx.controls.Image;
> >                    import GestionNotification.SendMail;
> >                    private var smail:SendMail;
> >                    private var nc:NetConnection;
> >            private var responder:Responder;
> >            private var ns:NetStream;
> >            private var mic:Microphone = Microphone.getMicrophone();
> >                    private var nTimer:Number;
> >                    public var threshold:Number = .2;
> >                    public var recordingyes:Boolean;
> >                private var isrecord:Boolean;
> >                public var notif_type:String="(Aucune)";
> >                public var user_type:String="Aucun";
> >                public function onBWDone():void {
>
> > }
> >     private function init():void
> >    {
> >            connect();
> >    }
> >    private function connect():void
> >    {       NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
> >         SharedObject.defaultObjectEncoding  =
> > ObjectEncoding.AMF0;
> >            nc = new NetConnection();
> >            nc.client=this;
> >            nc.objectEncoding=0;
> >            nc.connect("rtmp://localhost:1935/oflaDemo",true);
> >        nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
> >    }
> >    private function netStatusHandler(e:NetStatusEvent):void  {
> >            var code:String = e.info.code;
> >            Alert.show("code = " + code);
> >            if(code == "NetConnection.Connect.Success"){
> >            ns = new NetStream(nc);
> >            ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
> > asyncErrorHandler);
> >            recordingyes=true;
> >            isrecord=false;
> >            }
> >    }
> >   private function asyncErrorHandler(event:AsyncErrorEvent):void {
> >        Alert.show(event.toString(),"error");
> >   }
> >   public function publishCam(str:String):void
> >    {
> >            try
> >            {
> >            ns.attachCamera(videoCamera.camera);
> >            mic.rate = 44;
> >            ns.attachAudio(mic);
> >                    ns.publish(str, 'record');
> >            }
> >            catch(err:Error)
> >            {
> >                    Alert.show( err.toString() );
> >            }
> >    }
>
> >    public function stopRecording():void
> >    {
> >            ns.close();
> >            clearInterval(nTimer);
> >            isrecord=false;
> >    }
>
> >                    public function Enregistrer():void
> >                    {
> >                        var snapshotHolder:UIComponent = new UIComponent();
> >                            var snapshot:BitmapData = new
> > BitmapData(videoCamera.width,videoCamera.height,true);
> >                            var snapshotBitmap:Bitmap = new Bitmap(snapshot);
> >                            snapshotHolder.addChild(snapshotBitmap);
> >                            snapshot.draw(videoCamera);
> >                            savePicture(snapshot);
> >                    }
> >                    private function savePicture(picture:BitmapData) : void {
> >                    // appél au compresseur JPEG
> >                       var jpegEncoder:JPEGEncoder= new JPEGEncoder();
> >                            var 
> > jpegBytes:ByteArray=jpegEncoder.encode(picture);
> >                            jpegBytes.compress();
> >                            // envoyé au serveur
> >                            
> > myservice.getOperation("savePNG").send(jpegBytes);
> >                    }
> >                    private function faultHandler(fault:FaultEvent):void
> >             {
> >                 CursorManager.removeBusyCursor();
> >                 Alert.show("code:\n" + fault.fault.faultCode + "\n
> > \nMessage:\n" + fault.fault.faultString + "\n\nDetail:\n" +
> > fault.fault.faultDetail);
> >             }
>
> >             private function resultHandler(evt:ResultEvent):void
> >             {
> >                Alert.show(evt.result.toString());
> >             }
>
> >                    private function motionHandler(event:Event):void {
> >                            var dat:Date= new Date();
> >                            if(detector.percentChange > threshold) {
> >                                    if(til.numChildren>50)
> >                                    {
> >                                            til.removeAllChildren();
> >                                    }
> >                                    var image:Image = new Image();
> >                                    image.source = new 
> > Bitmap(detector.lastSnapshot.clone());
> >                                    image.width =  50;
> >                                    image.height = 45;
> >                                    til.addChild(image);
> >                                    if(recordingyes==true){
> >                                            if(isrecord==false){
> >                                    var ccA:String=dat.getDay().toString()+ 
> > dat.getMonth().toString()
> > + dat.getHours().toString()+ dat.getMinutes().toString()
> > +dat.getSeconds().toString()+dat.getMilliseconds().toString();
> >                        var chA:String="Demo_"+ccA;
> >                                    publishCam(chA);
> >                                    isrecord=true;
> >                                    nTimer=setInterval(stopRecording,10000);}
> >                                    }
> >                                    bar.setStyle("trackColors", 
> > [0xff0000,0xff0000]);
> >                                    générer_notif();
> >                            }
> >                            else {
> >                                    bar.clearStyle("trackColors");
> >                            }
> >                    }
> >                    private function générer_notif():void{
> >                            if (user_type=="administrateur"){// le compte 
> > connécté est un
> > compte chef ou administrateur
> >                                    smail=new SendMail();
> >                                    if(smail.mail_admin!=""){// 
> > l'administrateur a déjà fait de
> > gestion de notification
> >                    // envoir mail
> >                                    }
> >                                    else{
> >                                            // l'administrateur n'a ps 
> > encore enregistré ses coordonées
> >                                            // une boite de dialogue 
> > s'affiche si l'administrateur veut
> > enregistrer ses coordonnées
> >                                            Alert.yesLabel="Oui";
> >                                            Alert.noLabel="Non";
> >                                            Alert.show("les coordonnées de 
> > l'administrateur ne sont pas
> > encore enregistrés voulez vous le faire maintenant?","information",
> > (Alert.YES|Alert.NO|Alert.NONMODAL),this,CloseHandler);
> >                                    }
> >                            }
> >                    }
> >                    private function CloseHandler(event:CloseEvent):void{
> >                            if(event.detail==Alert.YES){
> >                                    // gerer notif s'affiche
> >                            
> > smail.addEventListener(CloseEvent.CLOSE,remouvsmail);
> >                    PopUpManager.addPopUp(smail,this,true);
> >                            }
> >                    }
> >                    private function remouvsmail(event:CloseEvent):void{
> >                     PopUpManager.removePopUp(smail);
> >             }
> >            ]]>
> >    </mx:Script>
> >    <utils:SimpleMotionDetector id="detector"  sampleRate="100"
> >            source="{videoCamera}" change="motionHandler(event);
> > bar.setProgress(detector.percentChange, 1)" />
> >     <mx:Panel title="Streaming Vidéo" id="streaming"
> > borderColor="#34A89C" fontFamily="Georgia" height="408" width="494"
> > layout="vertical" horizontalAlign="left" verticalAlign="top">
> >             <controls:WebCamDisplay id="videoCamera" width="474"
> > height="319"
> >             borderThickness="1"
> >             borderColor="#FFFFFF"
> >             borderStyle="solid"
> >             cornerRadius="0"/>
> >         <mx:ProgressBar mode="manual" minimum="0" maximum="1" id="bar"
> > trackHeight="30"
> >            labelPlacement="center" label="Sensibilité: %3%%"
> > width="{videoCamera.width}" />
> >     </mx:Panel>
> >     <mx:Tile id="til" visible="false" x="0" y="0"/>
> > </mx:Canvas>
> > //////////////////////////////////////
>
> > On 6 mar, 20:42, ekameleon <[email protected]> wrote:
> > > Hello :)
>
> > > il nous faut beaucoup plus d'infos (comme toujours ;))
>
> > > 1 - version de RED5 et quelle est ta configuration (port, etc...).. 
> > > explique
> > > comment tu installes celui ci etc.
>
> > > 2 - tu as cherché sur leur mailing list pour voir si quelqu'un a eu déjà 
> > > le
> > > même problème ?http://osflash.org/pipermail/red5_osflash.org/
>
> > > 3 - tu compiles en FP10 ? FP9 ? tu as mis un code en AMF0 .. côté serveur 
> > > tu
> > > es certaine d'être en AMF0 ? Tu fais pas de l'AMF3 sans le savoir ?
>
> > > 4 - Tu peux préciser si tu es en local, en ligne, etc ? Là impossible de
> > > savoir ce que tu fais à ce niveau là ;)
>
> > > Perso je ne maitrise pas du tout Red5 mais plutôt FMS :) Du coup là je te
> > > mets des questions bateau... mais franchement si personne ne te réponds
> > > rapidement ici, tu auras plus de chance de trouver ta réponse sur la 
> > > mailing
> > > list de Red5 où la communauté sera surement en forme pour te donner la
> > > réponse ;)
>
> > > En général quand on arrive à se connecter à un serveur pas de raison de 
> > > pas
> > > pouvoir le faire de "temps en temps"... faut que tu sois précise dans ton
> > > process d'intégration, etc. pour voir ce qui peut clocher. Le code AS3 ne
> > > doit pas être la cause du soucis car tu ne fais pas grand chose à ce que 
> > > je
> > > vois qui peut causer problème dans ton test ;)
>
> > > PS : faudrait voir aussi ton code Java server side.. mais là c'est encore
> > > une autre histoire
>
> > > EKA+ :)
>
> > > Le 6 mars 2010 20:29, Sézard_damian <[email protected]> a écrit :
>
> > > > hi there :D contente de rejoindre ce groupe
>
> ...
>
> plus de détails »

-- 
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes FCNG.
Pour envoyer un message à ce groupe, adressez un e-mail à [email protected].
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse 
[email protected].
Pour plus d'options, consultez la page de ce groupe : 
http://groups.google.com/group/fcng?hl=fr

Répondre à