Changeset 634


Ignore:
Timestamp:
11/16/09 20:24:04 (4 years ago)
Author:
pablo
Message:
  • Player doesn't allow adding / removing children
  • Player handles PLAYER_READY before default
  • V4 plugins can retrieve the plugin configs for v5 plugins
Location:
trunk/fl5
Files:
5 edited

Legend:

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

    r628 r634  
    368368                public function get pluginIds():Array { 
    369369                        var names:Array = []; 
    370                         for (var plug:String in _pluginConfig) { 
    371                                 if ( (['controlbar','playlist','dock','display']).indexOf(plug) == -1 ) { 
    372                                         names.push(plug); 
     370 
     371                        // Only include loaded plugins 
     372                        for each (var lp:String in _plugins.split(",")) { 
     373                                var plugName:String = (lp.substr(lp.lastIndexOf("/")+1).replace(/(.*)\.swf$/i, "$1").split("-")[0] as String).toLowerCase(); 
     374                                if (plugName) { 
     375                                        names.push(plugName); 
    373376                                } 
    374                                 /* TODO: Make sure this only returns loaded plugins 
    375                                 if (_plugins.indexOf(plug)) { 
    376                                         names.push(plug); 
    377                                 } 
    378                                 */ 
    379                         } 
     377                        } 
     378                         
    380379                        return names; 
    381380                } 
  • trunk/fl5/src/com/longtailvideo/jwplayer/player/Player.as

    r618 r634  
    1313        import com.longtailvideo.jwplayer.view.interfaces.ISkin; 
    1414         
     15        import flash.display.DisplayObject; 
    1516        import flash.display.Sprite; 
    1617        import flash.events.Event; 
     
    5556                        view = new View(this, model); 
    5657                        controller = new Controller(this, model, view); 
    57                         controller.addEventListener(PlayerEvent.JWPLAYER_READY, playerReady); 
     58                        controller.addEventListener(PlayerEvent.JWPLAYER_READY, playerReady, false, -1); 
    5859                        controller.setupPlayer(); 
    5960                } 
     
    296297                        return view.getPlugin(id); 
    297298                }  
     299                 
     300                /** The player should not accept any calls referencing its display stack **/ 
     301                public override function addChild(child:DisplayObject):DisplayObject { 
     302                        return null; 
     303                } 
     304 
     305                /** The player should not accept any calls referencing its display stack **/ 
     306                public override function addChildAt(child:DisplayObject, index:int):DisplayObject { 
     307                        return null; 
     308                } 
     309 
     310                /** The player should not accept any calls referencing its display stack **/ 
     311                public override function removeChild(child:DisplayObject):DisplayObject { 
     312                        return null; 
     313                } 
     314 
     315                /** The player should not accept any calls referencing its display stack **/ 
     316                public override function removeChildAt(index:int):DisplayObject { 
     317                        return null; 
     318                } 
     319                 
    298320        } 
    299321} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerV4Emulation.as

    r629 r634  
    1313        import com.longtailvideo.jwplayer.model.Model; 
    1414        import com.longtailvideo.jwplayer.model.PlaylistItem; 
     15        import com.longtailvideo.jwplayer.plugins.IPlugin; 
    1516        import com.longtailvideo.jwplayer.plugins.PluginConfig; 
    1617        import com.longtailvideo.jwplayer.plugins.V4Plugin; 
     
    369370                 
    370371                public override function getPluginConfig(plugin:Object):Object { 
    371                         var pluginParent:V4Plugin = (plugin as DisplayObject).parent as V4Plugin;  
    372                         if (pluginParent) { 
    373                                 return _player.config.pluginConfig(pluginParent.pluginId); 
     372                        if (plugin is IPlugin) { 
     373                                return _player.config.pluginConfig((plugin as IPlugin).id) 
     374                        } else if (plugin is V4Plugin) { 
     375                                return _player.config.pluginConfig((plugin as V4Plugin).pluginId); 
     376                        } else if ((plugin as DisplayObject).parent is V4Plugin) { 
     377                                return _player.config.pluginConfig((plugin.parent as V4Plugin).pluginId); 
    374378                        } else if (plugin is IDockComponent) { 
    375379                                return _player.config.pluginConfig('dock'); 
  • trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as

    r629 r634  
    33         
    44        public class PlayerVersion { 
    5                 protected static var _version:String = "5.0.626 beta"; 
     5                protected static var _version:String = "5.0.627 beta"; 
    66                 
    77                public static function get version():String { 
Note: See TracChangeset for help on using the changeset viewer.