Skip to main content
chris.campbell
Community Manager
Community Manager
August 6, 2014
Question

Using StageVideo and Stage3D in AIR - BETA

  • August 6, 2014
  • 35 replies
  • 25782 views

We're planning on introducing a new ActionScript feature that will allow hardware accelerated video to be used as a source texture in a Stage3D environment.  Currently, using video with Stage3D requires the use of the Video object, which is not accelerated, and manipulation of the bitmap representations of the video frames.  The planned feature, called VideoTexture, will allow direct access to a texture object that is sourced from a Netstream or Camera object.

The following sample code demonstrates the use of the VideoTexture object.

1) Create a VideoTexture object and attach a NetStream (or Camera) object to the VideoTexture object:

var ns:NetStream;

var context3D:Context3D;

var texture:VideoTexture;

texture = context3D.createVideoTexture();

texture.attachNetstream(ns);

ns.play("video.3gp");

texture.addEventListener(VideoTexture.RENDER_STATE, renderFrame);

2) A texture representation of the current video frame can be retrieved from the callback function for the VideoTexture.RENDER_STATES event.

function renderFrame(e:Event):void

{

    // Render on stage3D with VideoTexture

}

Please note that this will be an "extended beta" feature.  The initial implementation, available  in our AIR 15 beta, will be for Windows/AIR only.  We are committed to expanding this feature to AIR mobile and Mac in a following release.  We'll also consider an implementation in Flash Player if there is sufficient demand.

Getting your feedback will be critical to making sure we're providing a solution that you can use.  Please let us know what you think and keep an eye out for updated beta release notes in the next couple of weeks.

This topic has been closed for replies.

35 replies

Vyacheslav Alferov
Participant
August 12, 2014

Hi! Please add this bugfix/feature not only to the AIR, but in web player too. I need it for my Starling+Feathers videoplayer that I can't use now. I make it for the web, tot for desktops.

Infin8
Inspiring
August 12, 2014

Will this new feature include the facility to control the movie and listen for events?

e.g. Play, pause, stop, rewind, seek and Event.READY, Event.COMPLETE?

If so that would make it an extremely useful addition.

Colin Holgate
Inspiring
August 12, 2014

StageVideo just uses netstream, which you can control. I don't think it will matter that the video is being used as a texture, you should still be able to control the netstream.

Participant
August 7, 2014

Finally a dream comes true! Thanks to all people which are involved to make this happen! Number of AIR possibilities squared -> BAAAMMM

chris.campbell
Community Manager
Community Manager
August 12, 2014

Thanks for the feedback so far.  To clarify, our initial support is for Windows AIR only.  This will be an "extended" beta feature and once the v15 release goes out in September we'll start our work on the Mac and mobile (iOS and Android) AIR versions.  Based on your feedback, once the AIR side is done we'll take a look at what will be required to move this over to Flash Player.  Do you see strong use cases for this on the Player?

Participating Frequently
August 12, 2014

Yes, I see. It's good choice to overlay StageVideo by stage3d-based ui's to control media playback. Personally, I use Feathers. And now i can't do it this way.

Known Participant
August 7, 2014

@ Chris

First, I want to thank you and Adobe for pursuing this feature. I have read what you've written but I was curious if you could clarify a few things.

1. Initial support will be for:

     Yes - Desktop AIR for Windows

     No - Desktop AIR for Mac

     No - Mobile AIR for Android

     No - Mobile AIR for iOS

     No - Flash Player

     ** I have a Macintosh computer and want to make mobile apps that utilize this feature.

2. Will this feature allow us to use an H.264 video file as a texture on a Away3D object? (in AIR Mobile)

I've been trying to get support for this feature for several years now.

Here's my thread at the Adobe Bug Base: Bug#3744843 - H.264 video + Away3D + AIR mobile = Does not work

Best Regards,

Jason

Participating Frequently
August 7, 2014

So, what about FlashPlayer in this case?

ozmachine
Known Participant
August 7, 2014

There are so many nice possibilities with this feature.

Participant
August 7, 2014

Cool! It is a necessary feature. With H264 we will have a smaller size, better quality, and higher performance =)

Inspiring
August 6, 2014

Superb. For me, this would cover the needs I've had in the past.

itlancer
Inspiring
August 6, 2014

It is important feature for combining GPU accelerated video and Stage3D interface/content. Waiting for release!

We need it on all of  desktop and mobile platforms.

Known Participant
August 6, 2014

This looks promising Chris.


---------------------------------------

Mobile + H.264 + Away3D

---------------------------------------


Currently, we cannot use H.264 video files as textures on 3D Objects (using Away3D, etc) for MOBILE apps.

I am very curious, and hopeful, whether this feature will resolve this. Both I (and Andy Dufresne) have been trying to get support for this for quite some time.

Best Regards,

Jason Villmer

Andy Dufresne

Participating Frequently
August 6, 2014

I was hoping you'd find this thread