2 Replies Latest reply on May 17, 2012 7:34 AM by rod_m

    Streaming Video in Flash Builder 4.5 AIR for Android

    jugg1es

      How do you do it?  When you try to use the VideoDisplay that is built-in for AIR, the documentation pops up and says:

       

      Adobe discourages using VideoDisplay when targeting profiles: mobileDevice.

       

      What are you supposed to use?

        • 1. Re: Streaming Video in Flash Builder 4.5 AIR for Android
          rod_m

          i am searching for the same answer

          • 2. Re: Streaming Video in Flash Builder 4.5 AIR for Android
            rod_m Level 1

            can anyone confirm if this example is the best video method for mobile. needs some extra size and position script but does work without warnings!

             

            <?xml version="1.0" encoding="utf-8"?>

            <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                    xmlns:s="library://ns.adobe.com/flex/spark" title="Video" viewActivate="init();">

               

            <fx:Script>

                <![CDATA[

                   

                    import mx.core.UIComponent;

                   

                    import org.osmf.elements.VideoElement;

                //    import org.osmf.media.MediaPlayer;

                    import org.osmf.media.MediaPlayerSprite;

                    import org.osmf.media.URLResource;

                    //import org.osmf.net.DynamicStreamingItem;

                //    import org.osmf.net.DynamicStreamingResource;

                    private function init():void{

                        trace('FLVPlayerView data url = '+data.url);

                        var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite();

                       

                        var videoElement:VideoElement = new VideoElement();

                        var urlResource:URLResource = new URLResource(data.url);

                        videoElement.resource = urlResource;

                        var uiel:UIComponent = new UIComponent();

                        uiel.addChild(mediaPlayerSprite);

                        this.addElement(uiel);

                        mediaPlayerSprite.media = videoElement;  

                    }

                ]]>

            </fx:Script>

            </s:View>