Adobe AIR 3.3  -  Bug 3186454

Created on Wednesday, May 9, 2012

Login for more options

Title

[Platform_iOS]StageVideo makes stage opaque to Stage3D

Description

Problem Description:
When using StageVideo (or even adding a listener for StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY -- either one will cause this problem), display objects on the stage become opaque in front of the Stage3D layer.

Steps to Reproduce:
Add an event listener like this at any point in the program -- you can even remove it immediately and get the problem:

-------------------------
import flash.events.StageVideoAvailabilityEvent;

theStage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, nothing);
theStage.removeEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, nothing);

private function nothing(event:StageVideoAvailabilityEvent):void
{
}
-------------------------

Now put content on the stage3D layer, as well as the classic stage. (For instance, I add a simple shape:
-------------------------
var newCircle:Shape = new Shape();
newCircle.graphics.beginFill(0xFF0000);
newCircle.graphics.drawCircle(512,384,100);
newCircle.graphics.endFill();
Global.theStage.addChild(newCircle);
-------------------------

You will also get this without the event listener, but when getting a StageVideo object. The problem persists after the StageVideo object has been cleaned up, to the best of my ability.
-------------------------
m_stageVideo = m_instance.stage.stageVideos[0]; // this line makes subsequent stage3D not show up behind stage.
m_stageVideo.addEventListener(StageVideoEvent.RENDER_STATE, stageVideoStateChange);
m_stageVideo.viewPort = new Rectangle(0, 0, Global.SCREEN_WIDTH, Global.SCREEN_HEIGHT);
-------------------------


Actual Result:

The bounding box around this shape will be black, but it should be transparent. It works on the PC emulator but not the iPad.

Expected Result:

Transparent pixels on the stage should show the Stage3D layer underneath it. (It works if you don't add the event listener above, or use StageVideo.)

Any Workarounds:
Don't use StageVideo, or don't use the Stage, or don't use Stage3D.
...

Test Configuration

My Hardware and Environment details:

Flash Builder 4.6
Air 3.3 (3.3.0.3560 Beta Build)
iPad 1 & 2
ActionScript Mobile Project

App Language(s) ALL
OS Language(s) English
Platform(s) iOS All
Browser(s)

Notes (25)

  • Anton Azarov

    2:30:27 AM GMT+00:00 Apr 9, 2015

    Try to use VideoTexture :) It's new feature of Adobe AIR

  • Gabriel Bonnefond

    2:10:08 AM GMT+00:00 Apr 9, 2015

    Hi, I found a solution for avoiding this bug.
    The transparency is dysfunctionning when you close the Netstream connection. Never close the ns, just play a blank video (black screen and no sound) when you play the 3D scene.

    That was the good solution for me.

  • Alex Rekish

    11:17:11 AM GMT+00:00 Sep 26, 2014

    Related issues:
    https://bugbase.adobe.com/index.cfm?event=bug&id=3810979
    https://bugbase.adobe.com/index.cfm?event=bug&id=3779843
    This extremely critical. Please fix it ASAP!

  • Todsaporn Banjerdkit

    4:16:11 AM GMT+00:00 Feb 19, 2014

    I don't think it's hardware issue because my work around is working before...

    Here's how
    1. attach stream and play game intro video with StageVideo
    2. when done intro do attach stream to normal Video (this is a trick)
    3. dispose all video related as usual

    now start Stage3D for game play

    bad news this workaround is stop working after AIR 3.5 as i recall
    and comment here is really mislead to

    "I can't use Stage3D and StageVideo together at the same time"

    which is not the point and too fancy, actual problem is...

    "I can't use StageVideo then dispose it and then use Stage3D later"

    (which is previously doable before AIR 3.5 but not anymore as i said)
    and result for this mislead is Adobe think it's same issue and then close both issue just like that.

    Workaround today is keep StageVideo in memory like zombie...why? because "The problem persists after the StageVideo object has been cleaned up"

    Trouble is friend of us ;p

  • Anton Azarov

    3:50:40 AM GMT+00:00 Feb 19, 2014

    iPad can't play transparent video using own controls. So removing black area it's CPU job. iPad as all devices use weak CPU.
    For this reason you can't use Video Texture in Unity3D.

    It's technically impossible. Or if you can do this - next question will be "Why is so slow??"

  • ThreeRoll

    9:59:05 AM GMT+00:00 Dec 11, 2013

    Would it be possible for Adobe to provide a more complete explanation of the issue and how it is as designed? It also seems like additional guidance on how to get StageVideo and the Flash display list to coexist would be helpful to a lot of people.

  • Anton Azarov

    10:07:30 PM GMT+00:00 Dec 10, 2013

    I think it's not as designed. It's hardware limitation.

  • rkrasky

    12:22:19 PM GMT+00:00 Nov 7, 2013

    I try to use Away3d with starling and stagevideo together with no success. Please let us know how to use these components together!

  • OMA2k

    10:22:41 AM GMT+00:00 Nov 7, 2013

    Well, I've tried to use Context3D.present() and it doesn't fix anything, unfortunately.

  • rockdeman

    7:13:15 AM GMT+00:00 Oct 30, 2013

    Is there any hope that it will ever be possible to add Stage3D content over StageVideo? It would allow fantastic Smart TV GUIs.

  • Hitomi Kudo

    11:57:51 AM GMT+00:00 May 21, 2013

    And our developer confirmed this as expected behavior = AsDesigned:

    "correct, this is not a bug. When using Stage3D, the user must call Context3D.present() to make the stage layer update. There is no independant update of the Stage, Context3D.present() drives the update of both the Stage and the Stage3D layers. This is necessary to achieve high performance. Workarounds include making all the Stage3D invisible and delaying the Context3D creation until you are going to start using it."

  • Hitomi Kudo

    11:56:25 AM GMT+00:00 May 21, 2013

    I found this note in internal bug comment that it may help you:

    The problem is not due to stage video. It is due to the way in which 'direct' mode works. This mode uses context3d.present() to submit the changes in 2D stage to screen.

    After making changes to the display list ( for eg. stage.addChild(newCircle)), the user should call context3d.present (). Otherwise he will get this behavior. Consider the following code to reproduce the issue without any stageVideo.
    ==================================

    package {

    public class main extends MovieClip {

    private var context3D:Context3D;
    private var xpos:Number = 150;
    private var ypos:Number = 150;
    private var newCircle:Shape;
    private var Num:int = 0;

    public function main(){
    this.newCircle = new Shape();
    super();
    this.newCircle.graphics.beginFill(0xFFFFFF);
    this.newCircle.graphics.drawCircle(this.xpos, this.ypos, 20);
    this.newCircle.graphics.endFill();
    stage.addChild(this.newCircle);
    stage.stage3Ds[0].addEventListener(Event.CONTEXT3D_CREATE, this.onContext3DCreate);
    stage.stage3Ds[0].requestContext3D();
    }
    private function onContext3DCreate(_arg1:Event):void{
    var _local2:Stage3D = (_arg1.target as Stage3D);
    this.context3D = _local2.context3D;
    if (this.context3D == null){
    return;
    };
    _local2.x = 100;
    _local2.y = 100;
    this.context3D.configureBackBuffer(240, 180, 0, false);
    addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
    }
    protected function onEnterFrame(_arg1:Event):void{
    if (this.Num < 1){
    this.context3D.clear(1, 0, 0);
    this.context3D.present();
    };
    this.Num = (this.Num + 1);
    }

    }
    }//package

    =============================================

    Internally
    1. During configureBackBuffer, player marks the stage3Ds[0]'s viewport for punching alpha hole . (Color(0,0,0,0))
    2.Immediately , player calls onEnterFrame and context3d.present(). It also blits the circle with opaque border to screen.
    3. Then player does the DoPlay_UpdateSceen(), where the alpha hole is created in the 2d stage canvas. The circle will be re-drawn with transparent border.

    Since there are no further context3d.present() calls, the updated 2d stage canvas (with transparent border) is not drawn to the screen. If we modify the condition (this.Num < 1) to (this.Num < 2), the updated canvas will be drawn on screen without any black border. I feel, the whole thing is a behavior of 'direct mode' and not a bug.

  • OMA2k

    8:38:12 PM GMT+00:00 Apr 16, 2013

    A similar problem with StageVideo happens in Android. I've filed a separate bug report for Android here:

    https://bugbase.adobe.com/index.cfm?event=bug&id=3543239

    Please vote in that bug report as well.

  • web_job

    2:11:35 PM GMT+00:00 Mar 20, 2013

    I have also come to this problem. It's absolutely ridiculous that this issue is not fix almost after the year of been reported.

    Just to add a bit to description. It seems that the issue occurs when you use all 3 components: stagevideo, stage3d and displaylist. The issue occurs right after you access some of the stagevideo properties. Even setting the StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY triggers it (though the handler does not have any code). Also, the issue occurs only when you do not successfully stream video (or dispose stream after playing).

  • Benedikt Rausch

    8:40:14 AM GMT+00:00 Jan 31, 2013

    Confirmed here also ... It practically makes stagevideo unusable ...

  • Todsaporn Banjerdkit

    1:29:57 AM GMT+00:00 Dec 12, 2012

    just hit this today, all png texture appear black when StageVideo is use ;(

  • MattBolt

    11:04:42 AM GMT+00:00 Nov 21, 2012

    Does anyone know of a work-around? Completely stuck until this is resolved.

  • Cheng Liao

    4:09:17 AM GMT+00:00 Jul 13, 2012

    Thank you for your information . It is similar to a earlier bug which has been deferred because of not primary use case.
    For now it has become an important use case . We will collect more information about it to determine how to process it.

  • mpelland

    3:57:31 PM GMT+00:00 Jun 17, 2012

    I have them working .. using full screen video and hiding the stage 3d viewport while the video plays.. when the video is done, i should the stage video again.. the black boxes appear for me on display list items after the video has been removed

  • macvsapple

    1:10:51 AM GMT+00:00 Jun 13, 2012

    I found ipa-ad-hoc is correct.
    but ipa-app-store will have the black rect

  • cydex24

    4:45:44 AM GMT+00:00 Jun 6, 2012

    Having same issue with Android 4.0.3 on an Acer A510.

    Stage3d setup and as soon as I start the stageVideo the stage3D area goes black.

    Big issue for me with a job that needs both stageVideo and Stage3D in same application at same time

  • Alisa(Ying) Wang

    12:45:59 AM GMT+00:00 May 31, 2012

    Thanks for your detailed notes.
    It can be reproduced on our side ,and our engineer is working on this.

  • Anton Azarov

    9:30:30 AM GMT+00:00 May 24, 2012

    I working with simple iPhone4 / 3gs app that use Stage3D and StageVideo

    1) Request Stage3D
    2) Create StageVideo
    3) After StageVideo ends - Stage3D is black because StageVideo have fully black fills

    I use Adobe Air 3.2 public release, Flash CS6, iOS 4.3.3 - 5.0.1

  • BenY00

    2:21:32 PM GMT+00:00 May 9, 2012

    As I look at my screenshot I see a small red dot that is part of the map texture -- the big red circle in the middle shows the problem.

    Also, I'm developing on a Mac.

  • BenY00

    2:17:31 PM GMT+00:00 May 9, 2012

    I'm submitting an example screenshot from my iPad1. I'm using the Away3D engine to display the globe but the same thing happens with Alternative or Starling, or our internal Starling-inspired 2D Molehill renderer. The red circle is a shape on the stage and is the only content there.

Duplicate ID
Reported By BenY00

Status

State Closed
Status Withdrawn
Reason AsDesigned

Importance

Priority 3-High
Frequency Some users will encounter
Failure Type Incorrectly Functioning
Product Area AIR SDK

Build

Found In Build 3.3.0.3360(beta)
Fixed In Build

Attachments (1)

Votes (46)

  • reinier_77

    12:48:23 AM GMT+00:00 Nov 26, 2014

    Mobile devices need StageVideo for smooth video playback and Stage3D for optimal game performance. This affects our app on both iOS and Android but is not an issue on desktop. For iOS there is a workaround (never detach or dispose NetStream) but unfortunately this does not work for Android. HIGH PRIORITY!

  • Alex Rekish

    11:13:47 AM GMT+00:00 Sep 26, 2014

    It's huge problem for us. Need to be fixed ASAP!

  • DerzkiyOleg

    12:54:55 AM GMT+00:00 Jul 28, 2014

    I can't belive this bug still don't fixed nowdays (AIR 14)!

  • Lowell List

    4:01:58 PM GMT+00:00 Jul 17, 2014

    Getting this fixed is HUGE for AIR to be worthwhile for MOBILE. Mobile devices need StageVideo for smooth video playback and Stage3D for optimal game performance. This affects our app on both iOS and Android but is not an issue on desktop. For iOS there is a feeble workaround (never detach or dispose NetStream) but unfortunately this does not work for Android. HIGH PRIORITY!

  • Andrius

    10:05:01 AM GMT+00:00 Apr 22, 2014

    We need this fixed. This makes our app unusable.

  • Timbowicz

    10:23:06 AM GMT+00:00 Mar 14, 2014

    Due this problem we had to refactor our application. After a week of searching and trying to figure out what the problem was, we had to use a not so nice solution to work with video and stage3d together. Would be a great winner if this is going to be fixed!

  • asdasd asdasd

    1:59:08 AM GMT+00:00 Mar 12, 2014

    Solving this would be an excellent thing to have.

  • Jonas Tornqvist

    2:38:44 AM GMT+00:00 Mar 11, 2014

    This problem still exist.

  • Hugo DD

    7:06:50 AM GMT+00:00 Feb 27, 2014

    If you cannot use stage3d(Away3D) with stagevideo air becomes useless...

  • Stephen Miller

    8:46:32 PM GMT+00:00 Feb 18, 2014

    This is absurd, fix this NOW Adobe

  • manu4562

    1:58:45 AM GMT+00:00 Feb 13, 2014

    This problem still occurs in iOS (iPhone 4S) and Android (Galaxy S3) with AIR 3.9.
    Back to the flv video.

  • Erick Souza

    5:16:48 PM GMT+00:00 Feb 10, 2014

    couldn't find a workaround

  • Andreas Wagner

    8:17:46 PM GMT+00:00 Dec 10, 2013

    IS there a workaround for this? setting the stage color maunually?

  • Daniele81

    5:17:00 AM GMT+00:00 Nov 15, 2013

    We need an workaround: please Adobe!

  • bfgAMike

    5:20:13 PM GMT+00:00 Nov 14, 2013

    Tried a number of workarounds (pausing instead of detaching netstreams, moving the video viewport off the screen, delaying creation of the context3d until after the video) and none of them have worked on iPads 2nd-4th gen. Which is quite a bummer, as stage video plays back so much better on these devices compared to software mode.

  • SFBTom

    4:17:26 PM GMT+00:00 Nov 13, 2013

    This bug is preventing the use of 2 of AIR's best features together!

  • Josh Tynjala

    8:21:08 AM GMT+00:00 Nov 12, 2013

    This is affecting many Starling users. Please look for a way to improve this experience.

  • sinious

    5:14:02 PM GMT+00:00 Nov 11, 2013

    This put me in a very bad position, finding out deep indo production.

  • JohannesFuglefjellet

    6:19:03 AM GMT+00:00 Nov 7, 2013

    This bug makes it impossible to use StageVideo, Stage3D and Native DisplayList together in a mobile app.
    Adobe: If you will not fix this, at least document or state somewhere that using all these features together on mobile is not supported.

  • davidabrown

    7:01:25 AM GMT+00:00 Oct 30, 2013

    This is going to be an ever increasing problem and needs fixing ASAP

  • --udi--

    3:59:04 PM GMT+00:00 Sep 30, 2013

    I just encountered this bug. I'm working with StageVideo and I added a label to Starling's native overlay and it worked fine on the emualtor but the labels have black backgrounds on the Android device.

  • Wallace Morais

    9:15:06 PM GMT+00:00 Jun 27, 2013

    Good to see i'm not the only one with this problem.
    Please fix it as soon as you can.

  • ThreeRoll

    6:02:57 PM GMT+00:00 May 2, 2013

    We're hitting this on the game we're developing. We very much need this fixed ASAP.

  • morganpolenord

    9:06:20 AM GMT+00:00 Apr 24, 2013

    Please fix it. It's important

  • tk_1io

    7:26:54 AM GMT+00:00 Apr 18, 2013

    This bug makes it impossible to use Stage, Stage3d and StageVideo together

  • OMA2k

    8:34:23 PM GMT+00:00 Apr 16, 2013

    We're having the exact same problem in iOS. We've lost countless hours troubleshooting this problem before concluding it was caused because of StageVideo. Also, since our application uses a lot of video, we can't just stop using videos to avoid this Stage3D bug.

    Stage3D and StageVideo are important AIR/Flash technologies, and shouldn't interfere with each other. This should be fixed ASAP. Please do not wait another year to fix this.

  • tomayz

    12:34:54 PM GMT+00:00 Apr 12, 2013

    please fix, this is keeping our company from using air on an iphone app we made.

  • web_job

    2:11:04 PM GMT+00:00 Mar 20, 2013

    I have also come to this problem. It's absolutely ridiculous that this issue is not fix almost after the year of been reported.

    Just to add a bit to description. It seems that the issue occurs when you use all 3 components: stagevideo, stage3d and displaylist. The issue occurs right after you access some of the stagevideo properties. Even setting the StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY triggers it (though the handler does not have any code). Also, the issue occurs only when you do not successfully stream video (or dispose stream after playing).

  • Benedikt Rausch

    8:39:26 AM GMT+00:00 Jan 31, 2013

    Please fix this ... this is very important and not just a small issue ...
    And if you cannot fix it please provide a good and well explained workaround.

  • MattBolt

    11:06:50 AM GMT+00:00 Nov 21, 2012

    Reported in the 3.3 BETA, yet two MAJOR releases since then without a fix. Pretty large problem if you ask me.

  • devomatic

    8:46:32 AM GMT+00:00 Oct 16, 2012

    I couldn't understand how it cannot be resolved since 3.3...

  • Jon Lucas

    9:32:22 AM GMT+00:00 Sep 24, 2012

    Same bug on Android... Please fix this quick :) Thanx.

    Flash Builder 4.7 BĂȘta, Air SDK 3.4.

    Samsung Galaxy Tab 10.1, Android 3.2, Air 3.4.0.254.

  • Ryan338

    8:30:01 AM GMT+00:00 Aug 29, 2012

    We came across this issue, and we definitely had to come up with some creative work arounds. Can we please get this fixed ASAP?

  • Thou Art Jay

    8:28:15 AM GMT+00:00 Aug 29, 2012

    Definitely would be nice to have to be able to use StageVideo and Stage3D without this issue.

  • pjsteele190

    6:43:48 AM GMT+00:00 Aug 10, 2012

    This is killing my product.

    My clients need to display a 'playlist' that contains 3D Sprites and HD Video.


  • Maslov22

    8:04:02 AM GMT+00:00 Aug 1, 2012

    I need this fixed soon since the project is already underway. Right now i have a StageWebView playing the videos in JPlayer instead, which was a really hacky workaround that is not all that elegant. This problem has already increased my dev time by 4 weeks. I would like to avoid more setbacks

  • Donny1985

    10:28:51 PM GMT+00:00 Jul 26, 2012

    Essential to have both integrated into projects.

  • rockdeman

    2:19:52 PM GMT+00:00 Jun 27, 2012

    Stage3D over StageVideo is absolutely needed - especially to convince management to stick with Air. Need to build prototypes. The sooner the better.

  • Karim Beyrouti

    3:50:42 PM GMT+00:00 Jun 19, 2012

    Oh ... this totally gets my vote too - was wondering if Stage3D / StageVideo would happily co-exist for my project ...

  • KatieSpam

    10:50:54 AM GMT+00:00 May 30, 2012

    We need to be able to use both stage video and stage 3D with the classic stage! Video makes a huge impact and for developing on smaller devices hardware acceleration is a must! Hoping this can be fixed right away!

  • micsw

    10:41:02 AM GMT+00:00 May 30, 2012

    This is super important!!!

  • Jeremy Friesen

    10:40:53 AM GMT+00:00 May 30, 2012

    This completely breaks any app that wants to use StageVideo and Stage3D. This bug needs to be addressed before Air 3.4.

  • terravisaoDev

    5:47:50 PM GMT+00:00 May 25, 2012

    Not having this capability is a deal breaker for me. The world of social video interaction is becoming hugely popular. Without the use of both stage 3d and stage video performance will continue to be an issue for rich experiences on IOS. The framework is unstoppable if you can allow these two technologies to work in harmony.

    Thanks for your consideration :)

  • rkrasky

    3:50:01 AM GMT+00:00 May 25, 2012

    I confirm this bug, also on Android (bounding box is not black but stage video is showing through)!

  • makc3d

    10:28:45 PM GMT+00:00 May 24, 2012

    I would sure like this fixed before we have a chance to run into it )

  • Anton Azarov

    9:32:48 AM GMT+00:00 May 24, 2012

    This is hot bug! We can't use Stage3D with the StageVideo in one application. But on Desktop PC this works. Only have iOS bugs (Android was not tested)

Your session has expired! Click to login
Current form data will be preserved

Cancel