Posts in Category "Uncategorized"

Best Practices for High Performing and Efficient Flash Video

flashvideo

 

Use StageVideo.  Always.

For best video playback performance and to minimize CPU and better battery consumption, using StageVideo for rendering video is strongly recommended.  StageVideo leverages the browser’s hardware accelerated rendering pipeline and GPU wherever available.

Starting with Flash Player 15, and when the swf is compiled for swf version greater than 26, the Flash Player will provide a software version of StageVideo as an automatic failover option when hardware StageVideo is not available.  As such the content does not need to implement a Video object failover.  The Flash Player will always try to use the hardware accelerated StageVideo first and only if the browser version and the GPU version does not support it, then it will automatically fail over to software version without any need to implement any fail overs in the App.

There should no longer be any reason to use the Video object, as StageVideo will always be available.

The StageVideoAvilability in this case will ALWAYS be “available”, the reason will always be “noError”.  If it is not able to support HW StageVideo for some reason and fails over to SW StageVideo, it will indicate that failover with a StageVideoAvailability event, and its property called “driver” will be set to “software”.

Use of wmode=direct is recommended.  For all the newer browsers as mentioned below, all the wmodes will support hardware accelerated StageVideo rendering.  But some older versions of the browsers that do not have hardware rendering support will fail over to software StageVideo if the wmode is not direct.  The only reason to not use wmode=direct will be if the app needs to render html overlays on top of video. Newer browsers will be able to support html overlays on any wModes, but older browsers that do not have hardware rendering support, will not be able to support html overlay for wmode=direct.

On Windows:

IE 11: IE has an accelerated pipeline and the FlashPlayer is HW accelerated in all wmode, so HW StageVideo should always be available.  Note that the decision to use the HW accelerate rendering pipeline reside in IE itself, there are probably cases where it will fallback to older software pipelines when the driver or OS is too old.  It is also possible for the user to disable the HW acceleration in the settings panel.

Firefox: There is currently no HW accelerated pipeline available in Firefox on windows and only wMode direct will have HW StageVideo available all other wMode should failover to SW StageVideo.

Chrome: Pepper has HW acceleration in all wMode, but some restrictions apply.  For example Chrome will refuse to use HW acceleration on Windows XP and it has its own driver blacklisting mechanism.  It is also possible for the user to disable the HW acceleration in the settings panel.  Chrome exposes a somewhat useful page to allow one to see the status of its gpu acceleration: chrome://gpu/

On Mac:

Safari: Apple’s browser uses CoreAnimation to render the HTML pages and all wMode should expose HW StageVideo.

Firefox: This browser also uses CoreAnimation to render the pages and all wModes should expose HW StageVideo.

Chrome: Pepper HW acceleration is available like it is on Windows and all wMode should expose HW StageVideo, with the same limitations as the windows version.

StageVideo should not be used before the availability event is fired.  Before this event, StageVideo is basically not initialized at all.  The timing of this event is somehow dependent on the browser and it should not be guessed.  You cannot base your code on a specific browser/os combination.  This will be true even with the software version of the API.

Just before the StageVideoAvailability event is fired, the StageVideo array is populated with a fixed amount of planes, usually 4.  At that time a stream can be attached to the plane for rendering.

The app should continue to listen for StageVideoAvailability event, if it wants to track HW or SW version of StaegVideo, as the event might be fired again when the status changes.

Once attached to a StageVideo entry, you can play the content and use its properties to move it around, zoom, pan…

 

StageVideo FAQs

  1. Is stageVideos.length>0 even if it’s software StageVideo?
    Yes, length is for stageVideo in general, either hardware or software.  Also, the length of the vector can sometimes be zero.  Rather than polling the length of the stageVideos vector manually, to implement stage video correctly, you should always listen to theStageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY event.  This will inform you about stage video ability.  SW StageVideo is enabled when the swf is compiled for swf version 26 and above, and is supported since Flash player 15.  If so the StageVideoAvilability will ALWAYS be “available”, the reason will always be “noError”.
  2. Is there an API to check if hardware acceleration is enabled (boolean value) or is the presence of stageVideos.length>0 enough?
    Stage video availability event has a property called driver that will be “software” when it is using Software StageVideo.stageVideo.length is not representative of HW or SW StageVideo and should not be used.  With SW StageVideo you can always expect this to be > 0.
  3. How does the value of HW Acceleration in right-click Settings panel impact StageVideo availability?
    It will disable HW acceleration and HW decode. Stage video software and software decode will be used.
  4. What is the best way to check for StageVideo availability before trying to load video content?
    The StageVideoAvailability event is called independent of video playback, so it can be checked at any time.  It is recommended to be checked before it’s used, so it should be checked before it is attached to NetStream.
  5. Is StageVideo available to all streaming formats ?
    Yes, StageVideo rendering is available for progressive, rtmp, appendBytes, or HLS formats.
  6. Where can I find more information on StageVideo?
    Getting started with StageVideo

Clean up NetStream after use

In order to conserve memory usage for video applications, its very important that any GPU or memory resources being consumed by the app are released and cleaned up.

NetStream object holds the buffered video data and handle to HW decoders so its very important that the object is cleaned up after its used.  This is specially important in the case of applications which create multiple NetStream objects and switch between them for displaying ads or to implement video playlists.

To clean up NetStream resources call Netstream.close() which will release all buffers and HW decoders and is ready for re-use if it needs to be recycled for another stream.  If the NetStream isn’t needed anymore, call NetSteam.dispose() instead.  In both the cases, detach the attached StageVideo object to it, by calling StageVideo.attachStream(null) which will also stop video playback and release the StageVideo object for another stream.

Special thanks to Abhinav Kapoor for putting together this article.

April Flash Runtime Updates

Both Flash Player 17 and AIR 17 were updated on April 14th during our planned April release.  This release focuses on security and functional improvements and does not include new functionality.  Flash Player customers that have opted into our automatic update process will receive this release within 24 hours.  AIR runtime customers will see a notification update dialog within 7 days (or the next time you run your AIR based application).  Full details for this release can be found in the our release notes and security bulletin.

Flash Player and AIR 17 Release Notes

Security Bulletin APSB15-06

Attention AIR iOS developers – If you would like to learn how you can use the Adobe Gaming SDK ANE’s in your universal iOS applications, please check out this recent article by our own Abhinav Dhandh!

Gaming SDK ANE’s – Universal 64-bit support

Abhinav provides the reader a high level overview of the included ANE’s and then step by step instructions on how you can modify and rebuild these ANE’s for your projects.

Finally, for those that read the Get AIR blog post by Philomena Dolla back in January, you might have noted that we were at 2.5 billion installations of AIR applications.  A monumental achievement to say the least!  It’s a little less than 3 months later and we’re now at 3.3 billion installations (and over 4 billion installs and updates!)  Congratulations to all of the amazing AIR developers and the enormous success your applications have had across the globe!

Flash Runtime 17 and more!

Flash Player and AIR 17 have arrived!  With this new release we’ve added some excellent features requested by our development community.  We recommend everyone check out the official release notes but I’ll cover some of the highlights below.  We’re also in the process of updating our public roadmap, for those interested in checking out an early preview read past the break!

Continue reading…

Feathers updates to 2.1.0

Congratulations to Josh Tynjala and the Feathers open source project for the release of Feathers 2.1.0 this week. Feathers offers a large collection of ActionScript UI components and layouts for mobile and desktop. Built on top of Starling, Feathers is a key framework in the Adobe Gaming SDK.

feathers-cube-transition

In version 2.1.0, Feathers includes a few new UI components and some new animation options to visually enhance your apps and games.

The AutoComplete component builds on top of the existing TextInput component to display a drop-down list of suggestions that is filtered as the user types.

SpinnerList is a mobile-style list that changes its selected item by scrolling. Items repeat infinitely in both directions – like a reel from a slot machine.

StackScreenNavigator enhances the classic ScreenNavigator component to add a history stack that makes it easier to go back to a previous screen.

The new StackScreenNavigator benefits from a new, expanded collection of animated transitions. In addition to simple transitions that slide screens into view or fade them in and out, Feathers takes advantage of the new Sprite3D feature added in Starling 1.6 to add card-flip and cube transitions that rotate in 3D space. Seven types of transitions are included with Feathers (each offers a number of customization options), and anyone may create custom transitions using familiar Starling animation techniques.

You can find the complete release notes on the project’s Github page. Developers are encouraged to download the latest stable version from the Feathers website.

Adobe AIR and Android 5.0

Google has recently started rolling out an update to Android (OS 5.0 – Lollipop) on select devices. Unfortunately, this operating system upgrade has caused problems with AIR based applications.  We are working closely with Google to fix these issues.  This blog post describes the currently known problems and workarounds that developers can use for new applications.

Update 12/3/2014: Google has reported that this issue has been fixed with Android 5.0.1!  This OTA update is being currently being deployed to devices and we will continue to track the status and welcome your feedback.

Continue reading…

Improved Resolution of Stage3D Content on Browser Zoom

Authored by Channey Park

Flash Player version 15 (FP 15) introduces a feature whereby the loss of sharpness of Stage3D content upon browser zoom can be avoided.  With prior versions of FP, upon the user’s changing of the browser zoom factor, content that is rendered to a statically sized Stage3D buffer is scaled to match the browser zoom.  As the browser zoom factor increases, the sharpness of the Stage3D content is increasingly lost due to the scaling content. A new functionality introduced in FP 15 provides an event notification to the content when the browser zoom changes, and allows the content an opportunity to change the size of the Stag3D back buffer and re-render the stage3D content.

Continue reading…

Detective Grimoire sleuths its way onto desktop and mobile!

Detective Grimoire Logo

We absolutely love to see the amazing examples of what can be accomplished by our Adobe Runtime developers.  Detective Grimoire, from the very talented folks at SFB Games, was recently released on Steam after being greenlit in just 19 days!  Tom Vian took the time to answer a few questions about the game and their development process for our community.  If you haven’t checked this game out, make sure to finish reading the article and then head on over to Steam, Apple App Store, Google Play Store, Amazon App Store, or their website and pick up a copy!

Continue reading…

Instant Game Previews for Mobile

mobile-game-previews

 

 

 

 

 

Adobe AIR technology has made it possible for developers around the world to create some of the best and most stunning mobile games available today. You can now use this versatile technology to promote your games to a much larger audience. The new Instant Game Preview capability  (for Android platform only) lets users try your game and experience it first hand without downloading and installing the application.

For a quick demo, open this link in your Android browser –

http://www.adobe.com/gamepreview/?game=Games2WinDemo/TF.html

The fact that AIR would allow users to try your games and applications very quickly, chances of your app getting eventually installed increases manifolds. Instant Game Previews are better than video based previews because they let the user actually ‘play’ the game instead of just ‘watching’ it.

For details on how you can quickly create a preview for your game, refer to the following devnet article –

http://www.adobe.com/devnet/air/articles/air-mobile-game-previews-android.html

Flash Player and AIR 13 Released

flash_player_11_icon_rgbair_3_icon_rgb

Yesterday we released Flash Player 13 and the AIR 13 Runtime and SDK.  This was one of our major quarterly releases that includes new functionality, bug fixes, and security updates.  We recommend reviewing our release notes or visiting the Flash Player announcement or AIR announcement page for download links and additional details.

AIR developers and users will notice that the AIR version jumped from 4 to 13.  This was done specifically to bring AIR and Flash Player in sync with their version number.  The two share common code and we believe this should help unify perception of both products under the Flash Runtime umbrella.

Continue reading…

Feathers updates to 1.3.0

Feathers Framework UI

Congratulations to Josh Tynjala and the Feathers project which was updated last week to version 1.3.0!  Feathers is a key framework included in the Adobe Gaming SDK and is a light weight, skinnable and extensible UI framework for both mobile and desktop applications and games.  Feathers leverages the devices GPU to create a smooth and responsive experience.

With the 1.3.0 release, Josh was able to add the much anticipated support for percent dimensions in layouts.

percent-layout

In addition, Feathers has added a TextBlockTextRenderer built on the Flash Text Engine (FTL), support for Mac HiDPI, improved support for multiple Starling instances, and the example themes are now built as easy drop-in SWCs instead of source code.

The full release notes are available on the project’s Github page and developers can also download the latest version directly from the Feathers website.