Tuesday, November 25th, 2008

ExtPlayer: Ext AIR classes get an update

Category: Adobe, Sencha

Aaron Conran has created a new set of AIR classes, as well as an example called ExtPlayer to show them off.


Ext 2.0.2 introduced an Ext.air.Sound class, which is useful for playing small sounds such as beep and chimes. In contrast, Ext.air.MusicPlayer is meant for long running sounds such as music and podcasts which you would never want multiple files playing at the same time. MusicPlayer supports all of the basic operations, stop, pause, play and skipTo along with supporting events. The MusicPlayer enables the developer to add music and podcasts to their AIR-enabled Ext application very quickly.


  1. var mp = new Ext.air.MusicPlayer();
  2. mp.adjustVolume(0.5);
  3. mp.play(url);


The new notification class allows you to notify your users with toast or growl-like messages from the operating system. This allows you to notify users that something important has occurred even when your application may not be visible. By displaying these notifications at the operating system level it is sure to get the users attention without being lost within a browser tab.


  1. var msg = 'Title: {0}<br />Artist: {1}';
  2. var sample = new Ext.air.Notify({
  3.     msg: String.format(msg, id3info.songName, id3info.artist),
  4.     icon: '../famfamfam/music.png'
  5. });


Ext.air.Clipboard allows you to interact with the system’s clipboard. Developers can determine if a particular format has data, set the data and get the data. At this point, this is largely a pass through to an existing class from Adobe air.Clipboard.generalClipboard. There may be enhancements or workarounds which Ext will add in the future including integration with drag and drop.


  1. Ext.air.Clipboard.setData('air:text', 'Sample set on the clipboard');
  2. var data = Ext.air.Clipboard.getData('air:text');


xt.air.VideoPanel enables you to embed flash based video while maintaining the same functionality as an Ext.Panel. VideoPanel’s can also take part in Ext layout management. This means that you can nest your Video’s in a border layout, add toolbars, buttons, just as you have become accustomed to. You just need to provide the recorded FLV to playback or provide a camera connected to the PC. You can even watch the video fullscreen in high definittion!


  1. var vp = new Ext.Viewport({
  2.     layout: 'fit',
  3.     items: [{
  4.         id: 'video',
  5.         xtype: 'videopanel'
  6.     }]
  7. });
  8. Ext.getCmp('video').loadVideo('sample.flv');

Posted by Dion Almaer at 5:51 am
Comment here

4.3 rating from 79 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.