Changeset 751


Ignore:
Timestamp:
12/14/09 16:04:21 (4 years ago)
Author:
pablo
Message:
  • Further fix to trac ticket 669
Location:
trunk/fl5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/fl5/src/com/longtailvideo/jwplayer/model/Playlist.as

    r749 r751  
    4545         
    4646        public class Playlist extends GlobalEventDispatcher implements IPlaylist { 
    47                 /** **/ 
     47                /** An array holding all of the PlaylistItem objects **/ 
    4848                private var list:Array; 
    49                 /** **/ 
     49                /** The current playlist index **/ 
    5050                private var index:Number; 
    51                  
     51                /** Keep track of the last playlistItem, so we can send a PLAYLIST_ITEM event at the correct time **/ 
     52                private var lastItem:PlaylistItem = null; 
    5253                 
    5354                /** 
     
    105106                                index = 0; 
    106107                                dispatchEvent(new PlaylistEvent(PlaylistEvent.JWPLAYER_PLAYLIST_LOADED, this)); 
    107                                 dispatchEvent(new PlaylistEvent(PlaylistEvent.JWPLAYER_PLAYLIST_ITEM, this)); 
     108                                currentIndex = 0; 
    108109                        } else { 
    109110                                dispatchEvent(new PlayerEvent(PlayerEvent.JWPLAYER_ERROR, "Loaded playlist is empty")); 
     
    194195                 */ 
    195196                public function set currentIndex(idx:Number):void { 
    196                         if (idx != index && idx < list.length) { 
     197                        if (getItemAt(idx) != lastItem) { 
    197198                                if (idx >= 0) { 
    198199                                        index = idx; 
     200                                        lastItem = currentItem; 
    199201                                        dispatchEvent(new PlaylistEvent(PlaylistEvent.JWPLAYER_PLAYLIST_ITEM, this)); 
    200202                                } else { 
     203                                        lastItem = null; 
    201204                                        index = -1; 
    202205                                } 
     
    218221                        return list.length; 
    219222                } 
    220  
     223                 
    221224                /** 
    222225                 * @inheritDoc 
  • trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as

    r750 r751  
    33         
    44        public class PlayerVersion { 
    5                 protected static var _version:String = "5.0.750"; 
     5                protected static var _version:String = "5.0.751"; 
    66                 
    77                public static function get version():String { 
Note: See TracChangeset for help on using the changeset viewer.