Skip to main content
Inspiring
August 20, 2014
Question

NetStream doesn't play mp4 packaged with app - but plays same file over http

  • August 20, 2014
  • 0 replies
  • 241 views

I'm using StageVideo to play an h264 encoded mp4 file in an iPhone app.

When I package the mp4 file with the app (in the root), the app doesn't play the video at all. When I simply change the video's location to a http location where the exact same file is located, it plays fine.

In other words, the only change I'm making is:

Packaging mp4 in root of app:

var _videoURL:String = "video_h264.mp4" ;

_nc = new NetConnection ( ) ;

_nc.connect ( null ) ;

_ns = new NetStream ( _nc ) ;

_ns.client = this ;

_ns.play ( _videoURL ) ;

...

_stageVideo.attachNetStream ( _ns ) ;

to

Hosting video remotely:

var _videoURL:String = "http://www.myDomain.dk/video_h264.mp4" ;

_nc = new NetConnection ( ) ;

_nc.connect ( null ) ;

_ns = new NetStream ( _nc ) ;

_ns.client = this ;

_ns.play ( _videoURL ) ;

...

_stageVideo.attachNetStream ( _ns ) ;

Does anyone know if there's some restriction when using NetStream that could explain this?

This topic has been closed for replies.