2

I have developed adobe air application using adobe flash builder 4.6 for Windows and Mac OS. Application allow user to download movie (.mp4) file in his system at specific location for play without live streaming. File downloading correctly in both OS and also file playing from download location in Window application correctly. but when start playing file Mac OS application not start playing.

When start playing in mac OS, NetStatusEvent.Net_Status event return "NetStream.Play.StreamNotFound" event info code. I have found one solution for mac OS is use colon notation instead of slash notation. I have tried it but it also not working.

_nc = new NetConnection();
_nc.addEventListener(NetStatusEvent.Net_Status, connectionHandler);
_nc.connect(null);

private function connectionHandler(event:NetStatusEvent):void
{
     trace("Connection to server: " + event.info.code);
     /// Get "NetStream.Play.StreamNotFound" code in mac OS.    
}

I found one approach for mac OS- Use colon based notation instead of slash based notation. But its not working for me. I have used following.

slash notation path: /Users/mayur/Downloads/myvideo.mp4 (Original path)
Colon notation path: I have tried following colon notation path
1) :Users:mayur:Downloads:myvideo.mp4
2) Users:mayur:Downloads:myvideo.mp4
3) Macintosh HD:Users:mayur:Downloads:myvideo.mp4 (Macintosh HD - Drive name)

Please help me to solve this issue.

mmpatel009
  • 921
  • 4
  • 11
  • 25

2 Answers2

0

Flash can only play a files located in an application directory or its sub directory. See reference of NetStream#play() method.

And, with Mac environment, absolute path is not woking. Try to use a relative path with NetStream#play() method.

Shinji Yamada
  • 376
  • 2
  • 7
0

I had exactly the same problem and solved it by prepending "file://" to the file path.

It seems that NetStream.play() requires a fully qualified path, at least on Mac/iOS, when the target file first appears/downloaded.