I've set up a little application that just shows a spark videoDisplay control loading a local file. The video plays ok as an AIR in windows and it plays ok in a browser over osx if the flex application is a web app, but whenever I try to run as a Flex AIR application on the Mac, the VideoDisplay goes through:
- MediaPlayerState.LOADING
- MEdiaPlayerState.READY
- MediaPlayerState.PLAYBACK_ERROR
I can't find any clue on what is going on or the reason of that playback error. The video file is of course the same in all the cases.
I'm using Flex SDK 4.6 (comes with AIR 3.1) from Flash builder 4
Here it is the code I'm using for the test:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import org.osmf.events.MediaPlayerStateChangeEvent;
protected function mediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void
{
trace(event.state);
}
]]>
</fx:Script>
<s:VideoDisplay width="100%" height="100%" source="/somepath/video.mp4"
mediaPlayerStateChange="mediaPlayerStateChangeHandler(event)"/>
</s:WindowedApplication>