home *** CD-ROM | disk | FTP | other *** search
/ ftp.novell.com / 2014.06.ftp.novell.com.tar / ftp.novell.com / forge / camtasia.msi / Cabs.w1.cab / WMPlayItem.js < prev    next >
Text File  |  2009-08-17  |  758b  |  27 lines

  1. function PlayItem( ItemNum )
  2. {
  3.    if( document.mediaPlayer == undefined || document.mediaPlayer == null )
  4.    {
  5.       return;
  6.    }
  7.    
  8.    if( document.mediaPlayer.playState != 3 )
  9.       document.mediaPlayer.controls.play();
  10.    
  11.    if( navigator.appName == "Netscape" && !window.GeckoActiveXObject ) 
  12.    {
  13.       // Retrieve the media item at the position in the current playlist.
  14.       var media = document.mediaPlayer.getCurrentPlaylist().item(ItemNum);
  15.  
  16.       // Play the media item.
  17.       document.mediaPlayer.getControls().playItem(media);    
  18.    } 
  19.    else 
  20.    {
  21.       var media = document.mediaPlayer.currentPlaylist.item(ItemNum);
  22.       
  23.       // Play the media item.
  24.       document.mediaPlayer.controls.playItem(media);
  25.    }        
  26. }
  27.