Posts in Category "AIR"

How to provide video rotation information to ActionScript as metadata

fp_air

By Jason Lee

Prior to Flash Player and AIR version 20, the Flash runtime does not correctly process the matrix field values in the Track Header Box and the Movie Header Box, as defined in the ISO specification ISO/IEC 14496-12:2008. As a result, in some instances, the user experiences an incorrectly resized and rotated video when the video is played back with Flash. The problem is particularly pronounced when playing videos that are recorded in portrait mode with old Android or iOS devices. This happens because these devices save video in landscape mode along with a matrix representing rotation transformation, when the users record the video in portrait mode.

Flash Player and AIR version 20 introduce a feature whereby video rotation meta-data is provided through ActionScript. This feature mitigates the problem discussed above by providing the video matrix information to ActionScript as a part of the meta-data object of the onMetaData event, an event handler of the NetStream object. This allows the ActionScript developers to render the video in the intended rotation matrix. It should be noted that the Flash Player engine does not automatically apply the video matrix information to the rendered video output, so as to avoid any resizing or rotation that is not intended by the ActionScript developer.

video-rotation-problem

The ActionScript code example below shows how to apply the rotation matrix to the Video object.

Note: The example assumes that the video is recorded along a matrix representing 90° clockwise rotation.

var video:Video = new Video();
 addChild(video);
 var nc:NetConnection = new NetConnection();
 nc.connect(null);
 var ns:NetStream = new NetStream(nc);
 ns.client = {};
 ns.client.onMetaData = ns_onMetaData;
 ns.client.onCuePoint = ns_onCuePoint;
 video.attachNetStream(ns);
 ns.play("Demo.mp4");
 
function ns_onMetaData(info:Object):void {
 trace("metaData");
 video.x = 0,
 video.y = 0;
 video.width = info.width;
 video.height = info.height;
 varmatrix:Matrix = video.transform.matrix; // Read old transform matrix of video object.
 varoldSize:Point = new Point(video.width, video.height);
 varnewSize:Point = new Point(Math.abs(info.matrix.transformPoint(oldSize).x), Math.abs(info.matrix.transformPoint(oldSize).y));
 matrix.translate(-(oldSize.x / 2), -(oldSize.y / 2));
 if (info.hasOwnProperty("trackHeaderBoxMatrix"))
 matrix.concat(info.trackHeaderBoxMatrix[0]); // Apply the matrix of the Track Header Box of Video Track provided by this feature to video object.
 // trackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks.
 if (info.hasOwnProperty("movieHeaderBoxMatrix"))
 matrix.concat(info.movieHeaderBoxMatrix); // Apply the matrix of the Movie Header Box provided by this feature to video object.
 matrix.translate((newSize.x / 2), (newSize.y / 2));
 video.transform.matrix = matrix; // Set new matrix to transform matrix of Video object.
 }
 function ns_onCuePoint(item:Object):void {
 trace("cuePoint");
 }

The feature works for NetStream objects using progressive download, which allows Flash runtime to download and directly parse a video file. However, this feature does not handle NetStream using RTMP or appendBytes, in which case, the matrix properties provided by this feature are not available. This feature provides the matrices for all file formats — MP4, M4V, F4V, and 3GPP in accordance with ISO specification ISO/IEC 14496-12:2008, when using progressive download. For all other file formats, such as FLV, the matrix properties provided by this feature are not available.

The matrix information provided by this feature can only be applied to an instance of the Video class. Therefore, with StageVideo, which uses GPU acceleration, for example, the matrix information is not applicable.

This feature introduces the following new properties of the object representing video meta-data, a parameter of onMetaData event handler:

  • Object.movieHeaderBoxMatrix: flash.geom.Matrix
  • Object.trackHeaderBoxMatrix: An array of flash.geom.MatrixtrackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks in a single video file.

If you are a Flash content developer and are having trouble getting a video to display in correct orientation, please try this new ActionScript functionality for handling video rotation meta-data.

Issues while downgrading from AIR 20 to a lower version on Mac OS X

air_3_icon_rgb

By Eric Simenel

This tech note addresses the problems that you may face when attempting to downgrade from AIR version 20 to an older AIR version. Prior to AIR version 20, AIR was provided as a 32-bit Runtime dynamic Library for Mac OS X. However, with the release of AIR 20, only a 64-bit Runtime dynamic Library is provided on Mac OS X. See AIR 20 release notes for details.

Certain users who are running apps that require 32-bit ANEs may want to downgrade to a lower AIR version that supports a 32-bit Runtime dynamic Library. Prior to AIR 20, downgrading AIR to a previous version (let’s say AIR 19) is a simple process:

  1. Download AIR 19 runtime. For downloading any other versions, see Archived Adobe AIR SDK versions.
  2. Uninstall AIR 20 runtime. See Removing Adobe AIR for details.
  3. Install AIR 19 runtime. See Installing Adobe AIR for details.
  4. Run AIR Settings manager utility to disable further updates of the runtime.

However, these steps will not suffice when you are downgrading from AIR 20 to a previous AIR version as there are some additional steps required in this case. To meet this requirement, the additional steps or the solutions are explained below.

Downgrading from AIR 20

Starting with AIR 20, which is a now 64-bit Runtime (instead of the previous 32 bit AIR runtime), the process for downgrading is the same as mentioned above. But there are certain points, which require attention when attempting to downgrade.

After you install AIR 20, any previously installed AIR app using the Shared Runtime that is launched gets updated. So the app’s launcher code will now be a 64-bit binary. The previously used 32-bit launcher gets renamed with a ‘_32’ suffix.

Note: AIR Captive Runtime Apps are unaffected by this upgrade to AIR 20. See AIR 64-bit on Mac OS X for more details.

Issue

If you go back to a previous AIR version, for example, AIR 19, then after uninstalling AIR 20 and installing AIR 19, an attempt to launch the updated AIR app fails because the new 64-bit launcher is unable to find the 64-bit AIR Runtime.

This problem occurs only when attempting to downgrade to an older version.

Solution

You can use either of the three solutions to resolve this issue:

Solution 1: Move the application to the Trash, empty the Trash, and reinstall it from its .air package or custom installer as you did when you installed it the first time.

Solution 2: Rename the launchers at <AIR application>/Contents/MacOS/.

  1. For the launcher with no suffix, add a ‘_64’ suffix.
  2. For the launcher with the ‘_32’ suffix, remove this suffix.

Note: Here launcher refers to the name of your <AIR application>.

Solution 3: Edit the contents of the info.plist file so that its CFBundleExecutable key has the ‘_32’ suffix. The info.plist file is present at <AIR application>/Contents/.

Downgrading after an initial AIR 20 installation from a SideCar

There is another issue that a few users may face — specifically, those who install an AIR application with a SideCar AIR 20 installation; having never before installed an AIR shared runtime and then downgrading from AIR 20.

Note: An AIR SideCar Installation is one where an .air package is distributed alongside the AIR installer so that both AIR and this application are installed at the same time.

After an Initial AIR 20 installation from a SideCar, launching the .air package results in Mac OS X “blessing” the Adobe AIR Installer that sits next to it. Hence forward, Mac OS X remembers this application as the default launcher for an .air package. If you do not delete this directory after installing, then anytime you launch an .air package, this Adobe AIR Installer is launched. Checking that the AIR Runtime is now present, it goes on with the standard AIR App installation that is done by the AIR Runtime.

Issue

Now when you uninstall AIR 20, install AIR 19, and then try to launch an .air package, this attempt fails because the Adobe AIR Installer that is a 64-bit binary is unable to load the AIR Runtime that is now a 32-bit binary again. That Adobe AIR Installer (version 20) keeps its precedence over the Adobe AIR Application Installer (version 19) that is present at /Applications/Utilities because the Adobe AIR Application Installer has not been launched yet and is “invisible” to Mac OS X.

Solution

The solution to this issue is to simply delete the directory that contains the SideCar .air package and Adobe AIR Installer so that this 64-bit binary longer exists. Thus, it will not be launched by Mac OS X when .air launches. Instead, the 32-bit Adobe AIR Application Installer will be launched.

References

AIR 64-bit on Mac OSX

By Nidhi Tanwar

air_3_icon_rgb

With the release of AIR 20, the feature AIR 64-bit implies a major change for the AIR desktop developers. In the previous AIR versions, a 32-bit Runtime Dynamic Library was provided for Mac and Windows. However, with the release of AIR 20, only a 64-bit Runtime Dynamic Library is provided on Mac OS X. This means that all the new applications created by AIR developers will run on the 64-bit Runtime on Mac OS X. All the existing shared applications, captive applications, and native applications will continue to work on the 64-bit Runtime on Mac OS X.

Changes for existing applications

The existing AIR applications require the following changes when using AIR 64-bit.

Shared, Captive, and Native applications

These applications will continue to run on AIR 64-bit.

Native extension

All the native applications that use a 32-bit ANE need to add a 64-bit ANE to continue working with AIR 20 and beyond on Mac OS X. To create a 64-bit ANE, you have to provide the platform value as MacOS-x86-64 in the extension descriptor file and in the command used to create the ANE.

So, a native extension descriptor file for Mac OSX will have the following structure:

<platforms>
  <platform name="MacOS-x86-64">
    <applicationDeployment>
      <nativeLibrary>…</nativeLibrary>
      <initializer>…</initializer>
      <finalizer>…</finalizer>
    </applicationDeployment>
  </platform>
</platforms>

And the command for creating the ANE will be:

adt -package  -target ane  path/where/you/want/YourANE.ane YourExtensionDescriptor.xml  -swc YourAIRLibrary.swc  -platform MacOS-x86-64  library.swf YourMacOSNativeLibrary.framework

Libraries and frameworks for Xcode

When you are creating the native code extension for 64-bit architecture using Xcode, the following libraries and frameworks have to be included in Xcode (see figure below):

  • Adobe AIR.framework
  • Adobe AIR_64

 

 

 

 

 

 

 

 

 

 

 

 

 

Note: If you do not add Adobe AIR_64, which is a 64-bit dylib inside the Adobe AIR framework, you may get link errors such as “ld: symbol(s) not found for architecture x86_64 error.”

Linking ANE using Flash Builder 4.7

If you are linking your AIR application with 64-bit ANE using Flash builder 4.7 by adding the ANE in ActionScript Build Path for the AIR project, you will notice that there is a red ‘X’ next to the ANE file entry in the Build Paths dialog box (see figure below). If you click the triangle, you will see the error “This ANE does not support air-native-macosx platform”. This is a quirk in Flash Builder 4.7; if you click the triangle next to Targets, you will see that MacOS-x86-64 is supported by the ANE.

Linking ANE using Flash Builder 4.7

 

The red ‘X’ issue is observed again when you are packaging the ANE by including the ANE in ActionScript Build Packaging.

Ignore the error and click OK.

3

 

When you are creating your native application from the Project >Export Release Build, Flash Builder displays a packaging error. To continue with app creation, check select Ignore Errors in Native Extensions tab and click Finish. Your application will be created successfully.

4

 

Related Documents

Flash Runtime v20 Release Announcement!

We’re pleased to announce the immediate availability of Flash Player and AIR version 20!  With this December release, we’ve added new features, important security updates and functional bug fixes for our customers.  Full details on this release can be found in our release notes and security bulletin.

Updates for Flash Player 20 have automatically started rolling out to those that have enabled “Allow Adobe to install updates (recommended)”.  If you’ve opted into this auto update mechanism there’s no work required on your end.   Over the next 24 hours we’ll be pushing this update out silently and automatically to computers connected to the internet.

Customers using Google Chrome or Windows 8.x/10 Internet Explorer or Microsoft Edge will receive the update through the Google and Microsoft update mechanisms.

Last week we made some exciting announcements around Flash Professional, now Adobe Animate CC, and a new partnership for the Flash Runtime.  The future is very bright for the Animate CC team and for the designers and developers that use this tool.  The changes and improvements they’ve made and have planned for 2016 are inspiring and we’re more than confident that they will continue to deliver the innovation that our customers need to succeed.

On the Flash Runtime side, we’re thrilled to announce our partnership with Facebook.  We know that our customers and developers rely on Flash content to work securely and reliably.  With this new partnership with Facebook, our ongoing collaboration with both Google and Microsoft, and our close work with Apple, Mozilla, Opera and others, we’re committed more than ever to making the Flash Runtime secure, reliable, and compatible for everyone.

As we close out 2015, Flash Player enjoys amazing ubiquity with full support from every major browser and operating system in use today.  Flash Player is built into every version of Google Chrome and ChromeOS.  Flash Player comes as part of both the Windows 8 and Windows 10 operating systems and works seamlessly with both Internet Explorer and Microsoft Edge.  Flash Player has full support from Mozilla Firefox, Apple Safari, and Opera.  This unprecedented level of support allows our developers to be successful and our customers to enjoy the content they want to use, view, and play.  We look forward to great things to come in 2016 and we wish everyone a happy new year!

 

Read past the break for the highlights of this release!

Continue reading…

Troubleshooting common Adobe AIR installation errors with iOS applications

air_3_icon_rgb

By Piyush Bagri

In this post, we will explain the possible causes and solutions for some general errors that may occur when installing an AIR application on iOS devices using Flash Builder, Flash Professional, or command-line. This will help you to narrow down the installation error to a specific cause so that it can be resolved easily.

Installation error: “Application verification failed.”

The possible causes for this installation error along with the solutions to rectify it in each case are specified here.

Wildcard characters used in application id

If you are using any wildcard characters in the application id in your project, for example ‘calculator.debug.*‘, you will get ‘application verification failed‘ error.

Solution: The error will be resolved as soon as you remove the wildcard characters from the application id.

Feature listed in application.xml file is not added in the provisioning profile

If you are trying to compile your IPA with aps-environment key in entitlement.plist tags in application.xml file as shown in the example below and push notification service is not enabled in provisioning profile, then also you will get ‘application verification failed‘ error.

Example: Entitlements tag has been added in application.xml file but the push notification service is not enabled in provisioning profile.

...
<Entitlements><![CDATA[
            <key>aps-environment</key>
            <string>development</string>
             ]]>
</Entitlements>
...

Solution: Simply comment the above section of the code in application.xml or else add the feature in the provisioning profile. You will be able to rectify this error and compile your project. For more details, see Using push notifications in AIR iOS apps.

Wrong certificate used for packaging

You can also get ‘application verification failed‘ error if there is something wrong with the developer certificate that you are packaging your AIR application with. Another reason for the error could be that your device UUID is not listed in the provisioning profile.

Solution: You will be able to install your app on the device when you connect the right certificate with your provisioning profile. To know more about applying for an iPhone developer certificate and creating a provisioning profile, see Obtaining and working with iPhone developer files.


Installation error: “iTunes mobile device library not found. Please check your iTunes installation.”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device. You may get this error in the following cases:

Using Flash Professional CC 2014 with iTunes 12.1.2

If you are using Adobe Flash CC 2014 and AIR SDK (any version) with iTunes 12.1.2, you may get this installation error when in your Flash Professional CC project you select:

File > Publish >Install application on the connected iOS device

Solution: This issue has been fixed in the latest Adobe Flash Professional CC 2015 version. With this fix, it can now be used with Adobe AIR SDK (any version) and Apple iTunes version 12.1.2 in Windows environment.

Using ADT version 16 or older with iTunes 12.1.2

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) 16 or older, you can encounter this error. ADT is not able to detect iTunes 12.1.2 library in this case.

<AIRSDK Location>/bin/adt –installApp –platform ios –package <package name>

Solution: It is recommended to use Adobe AIR SDK version 16 or newer to resolve this error. iTunes 12.1.2 library is detected by Adobe AIR SDK 16 or newer versions.

Using ADT version 20.0.0.177 or older with iTunes 12.3

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) 20.0.0.177 or older, you can encounter this error. ADT is not able to detect iTunes 12.3 library in this case.

Solution: With AIR SDK 20.0.0.178 build this issue has been resolved.


Installation error: “PackageInspectionFailed”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device.

Solution: With Flash Builder 4.7, cleaning your project solves this error.

To clean you project, choose Project> Clean > Clean All Projects. See Build projects in Adobe Flash Builder 4.7 documentation for more details.

***

Typically, you want to have the latest version of Adobe AIR. To get it, follow the instructions at Download and install Adobe AIR. However, you can get an older version of Adobe AIR here.

Do you still have problem with the installation of Adobe AIR application? Post your question in the Adobe AIR Installation Issues forum.

Flash Runtime 16 Update – New PPAPI Installers and AIR news!

Flash Player 16 was released today with important bug and security fixes.  In this release, we added stand alone installation and plugin support for the PPAPI (“Pepper”) version of Flash Player!  This version was previously only available as an integrated component of Google Chrome.  With the upcoming changes to Chromium, making the PPAPI version of Flash Player available was critical for our customers and a top priority for our team.  With Flash Player 16, customers can now download Flash Player PPAPI for Chromium based applications and developers have access to the official PPAPI content debugger.  Please note, no changes or additional downloads are required for Google Chrome users.

For additional Flash Player release details, please see our forum announcement.

AIR developers, we haven’t forgotten about you!  It’s been all hands on deck getting support into AIR for iOS 64 bit.  Our plan is to shortly (possibly later this week) release an updated AIR 16 beta with iOS 64-bit compatibility along with an early peek at the videoTexture API for iOS.  We’re counting on getting great feedback from you and quickly making improvements.  We’ll continue updating our beta releases on labs.adobe.com to make sure you have the latest code available.  We know its going to be tough for everyone as we approach this holiday season, but we’re committed to making sure we have a solution in place before Apple changes their store requirements.

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…

Adobe AIR to support upcoming iOS x64 requirement

Starting February 1st 2015, Apple will be requiring all new iOS applications submitted to the App Store to include support for 64-bit.  The Flash Runtime team is committed to supporting our AIR developers and end users.  Our team recognizes that platform compatibility is crucial to our customers, and supporting new OS versions and requirements are a top priority.

We’re hard at work adding iOS 64-bit compatibility to AIR in an upcoming beta which we look forward to making available in December 2014.

Both AIR and Flash Player have very active public beta programs, with updates made on almost a weekly basis.  We encourage all developers to participate and provide feedback to Adobe.  Updates, release notes and additional information can be found on Adobe Labs.

Adobe AIR Labs Homepage

Adobe Flash Player Labs Homepage

Beta Feature: VideoTexture and Stage3D

Authored by Jason Lee

Flash Player 15 Beta introduces the VideoTexture object, which allows hardware decoded video to be used in Stage3D content. With prior versions of Flash Player, the use of video in Stage3D required the use of the Video object (which is not hardware accelerated), copying of video frame to a BitmapData object, and loading of the data onto the GPU.

With the VideoTexture object introduced in Flash Player 15 Beta, the decode, conversion from YUV to RGB, and texture loading can be completely moved to the GPU.  The textures provided by the VideoTexture object can be used as rectangular, RGB, no mipmap textures in rendering of a Stage3D scene; and can be treated as ARGB texture by the shaders (i.e., the AGAL shaders do not need to provide YUV->RGB conversion).  Thus, standard shaders used with static images can also be used without providing a functionality for YUV-> RGB conversion.

Continue reading…

Flash Runtime 15 now available for download!

It’s time for our next quarterly, feature bearing, update of the Flash Runtime!  We’re at version 15 for both Flash Player and AIR and we’ve got some great new features and important bug fixes in store for you.  We recommend everyone checks out the official release notes but feel free to read past the break for the high level description of our new features.  We’ve also added some detailed guides to some of these new features in the blog posts further below.

Flash Runtime Version 15 Release Notes

Flash Player Download

AIR Runtime Download

AIR SDK Download

Continue reading…