Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Participant ,
Aug 20, 2014 Aug 20, 2014

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?

TOPICS
ActionScript
230
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation