• 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 not playing in iOS with StageWebView

New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

I'm working on an iPhone app as part of a senior project, and need some help getting my videos to work. I'm a designer, not a coder, so I've been struggling with this quite a bit.  I'm also getting near the end of my year so any help is greatly appreciated.  In another thread on this forum I got some code about a StageWebView, however when I get to the frame where the video needs to play... I get a white box, with no video playing.  Here is the code I have on that frame...

import flash.geom.Rectangle;

import flash.media.StageWebView;

import flash.filesystem.File;

var webView:StageWebView = new StageWebView();

webView.stage = this.stage;

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

var fPath:String = new File(new File("objects.flv").nativePath).url;

webView.loadURL( fPath );

I've made sure to include the video files packaged with the app.

Help please!?

TOPICS
Development

Views

1.9K

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

correct answers 1 Correct answer

LEGEND , May 23, 2011 May 23, 2011

stagewebview can play H.264 movies, so most likely a .mp4. You're playing an flv, which is not H.264. You can play FLVs with the normal video ways in Flash, which can be as simple as having an FLVPlayback component on the stage, and setting its source to the flv.

Votes

Translate

Translate
LEGEND ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

stagewebview can play H.264 movies, so most likely a .mp4. You're playing an flv, which is not H.264. You can play FLVs with the normal video ways in Flash, which can be as simple as having an FLVPlayback component on the stage, and setting its source to the flv.

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
New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

Alright.

The reason I was trying this way of playing the video was I was having a lot of issues with the video skipping pretty badly (even with small files).  I had heard this was a fix for that.  I'll try converting the video and see if that works.

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
New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

No luck... I converted it to an mp4 and have the same result... A white screen with no video.

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

Copy link to clipboard

Copied

Did you add the movie file in the General tab in iOS settings?

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
New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

Yes I did.  I just realized I was missing the app:/ piece of code.  I added that along with the mp4 conversion, and it's working now.

Now my question is how can I make it return to a designated frame after the video finishes playing.

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

Copy link to clipboard

Copied

See this discussion, and the code near the end:

http://forums.adobe.com/message/3694991#3694991

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
New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

LATEST

You're savin my life man. Thanks a lot.

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