It is possible that the mp4 file did not get embedded with the iOS app.
Attach a fault handler to ns and see if something shows up.

Thanks,
Om


On Wed, Apr 2, 2014 at 11:20 PM, sam991 <[email protected]>wrote:

> Hi,
>
> I have used code to play video both in android tab and my iPad, with code
> video plays very well in android tab and in iPad only video player is
> displayed and nothing happens.
>
> protected function init():void
> {
>         try
>         {
>                 vp.source="../assets/"+Global.selectedVideo;
>         }
>         catch(error:Error)
>         {
>                 Alert.show(error.message);
>         }
> }
>
> <s:VideoPlayer width="100%" height="85%" autoPlay="true" loop="true"
> id="vp"/>
>
>
> And, even used this code run video, with code video plays very well in
> android tab and in iPad nothing happens.
>
> videoURL = new
>
> File(File.applicationDirectory.resolvePath("assets/Part1.mp4").nativePath).url;
>
> stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY,
> onStageVideo);
>
> protected function onStageVideo(event:StageVideoAvailabilityEvent):void
> {
>         if(event.availability == StageVideoAvailability.AVAILABLE)
>         {
>                 var nc:NetConnection = new NetConnection();
>                 nc.connect(null);
>
>                 var ns:NetStream = new NetStream(nc);
>                 var obj:Object = new Object();
>
>                 ns.client = obj;
>                 obj.onMetaData = onMetaData;
>
>                 var sv:StageVideo = new StageVideo();
>                 sv.viewPort = new Rectangle(145, 220, 730, 335);
>                 sv.attachNetStream(ns);
>                 ns.play(videoURL);
>         }
> }
>
> protected function onMetaData(info:Object):void
> {
>         trace(info.width, info.height, info.duration);
> }
>
> Now, can i get to know what i am doing wrong
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Not-able-to-play-video-in-my-iPad-tp5932p5936.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Reply via email to