Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
i am searching for the same answer
Copy link to clipboard
Copied
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>