December 19, 2007 6:13 PM
The HTML snippet below plays FLV and H.264 encoded quicktime movies.
Update (20th December 2007): Make sure you have AIRAliases.js in the same folder as your html file. It has to be copied over from AIR SDK installation folder/frameworks. AIRAliases.js only comes with the AIR SDK. It doesn't come with Flex Builder or Flex SDK because Flex Builder doesn't yet support launching HTML AIR applications directly. AIRAliases.js just shortens long names for convenience.
Just change sample.flv to the appropriate flv or quicktime movie file.
Couple the HTML file with the application descriptor file:
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.0.M6"> <id>AirApp</id> <filename>AirApp</filename> <version>v1</version> <initialWindow> <content>test.html</content> <visible>true</visible> <width>400</width> <height>400</height> </initialWindow> <name>AirApp</name> </application>
If the AIR application HTML file was named test.html and the application descriptor was saved as AirApp-app.xml, you can launch this application by typing the following command at the command prompt:
Presto, a simple application that plays videos. Not bad for the amount of functionality you get in 22 lines of code, eh?