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

Video streaming using AIR / Flash for iphone?

Explorer ,
May 13, 2011 May 13, 2011

Copy link to clipboard

Copied

Hey,

I've been trying to port a flash application to iphone.  This application streams video from an external server to the user.

Not being very familiar with iphone apps and their capabilities with respect to the Adobe IOS exporter, is this something that is possible to do?

I have tried a bunch of variations-- I can get apps to run, however, if I try to use the video API to create a video window (which works when I run compile and run the SWF locally) it comes up blank on an iphone.

I have tried moving the remote streamed video files locally (and including them in the "included files" list) but it still does not work.

So my questions are:

Can web content be accessed in this simple way?

Is video content playable with any existing flash/AIR api?  FLVplayer didn't work at all, and the AS3 video class didn't seem to work on iphone.

Is there a "trick" to accessing local content once an IOS app has been compiled to the iphone?  For example, in AS3 you could simply pass "video.flv" and so long as the file resided in the same directory as the executable, it would be found.

Any help is much appreciated.  Thank you!

TOPICS
Development

Views

2.1K

Translate

Translate

Report

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
LEGEND ,
May 13, 2011 May 13, 2011

Copy link to clipboard

Copied

LATEST

Just using an FLVPlayback component with its source set to the flv that is in the package will work. You won't get a controller, so set that to None, but you can use the various video components to add a play/pause button for example.

The performance with AIR 2.6 may not be ideal, so you could look at using StageWebView instead. With that you can point to any MP4 video anywhere, and it will play in native performance, with all of the typical iOS zooming abilities.

For example, try this code in the timeline of a new Flash CS5.5 timeline:

import flash.geom.Rectangle;

import flash.media.StageWebView;

var webView:StageWebView = new StageWebView();

webView.stage = this.stage;

webView.viewPort = new Rectangle(0,0,stage.stageWidth/2,stage.stageHeight/2);

var fPath:String = "http://www.sportsrecruiters.com/hwdvideos/uploads/62lzc85jzr6gwuxl.mp4";

webView.loadURL( fPath );

It won't work as a test movie, but try it on your iPhone or iPad, and the stage will load with that video clip in the top left quarter of the stage. Touching the full screen button makes it behave just like you would think it should.

Votes

Translate

Translate

Report

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