Changeset 376


Ignore:
Timestamp:
09/21/09 18:18:00 (4 years ago)
Author:
zach
Message:

Updating CoreComponent interfaces

Location:
trunk/fl5/src/com/longtailvideo/jwplayer
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/fl5/src/com/longtailvideo/jwplayer/events/ViewEvent.as

    r307 r376  
    4949                 
    5050                /** 
    51                  * The ViewEvent.JWPLAYER_VIEW_LINK constant defines the value of the 
    52                  * <code>type</code> property of the event object 
    53                  * for a <code>jwplayerReady</code> event. 
    54                  * 
    55                  * @eventType jwPlayerViewLink 
    56                  */ 
    57                 public static var JWPLAYER_VIEW_LINK:String = "jwPlayerViewLink"; 
    58                  
    59                 /** 
    6051                 * The ViewEvent.JWPLAYER_VIEW_MUTE constant defines the value of the 
    6152                 * <code>type</code> property of the event object 
     
    10192                 */ 
    10293                public static var JWPLAYER_VIEW_LOAD:String = "jwPlayerViewLoad"; 
    103                  
    104                 /** 
    105                  * The ViewEvent.JWPLAYER_VIEW_REDRAW constant defines the value of the 
    106                  * <code>type</code> property of the event object 
    107                  * for a <code>jwplayerReady</code> event. 
    108                  * 
    109                  * @eventType jwPlayerViewRedraw 
    110                  */ 
    111                 public static var JWPLAYER_VIEW_REDRAW:String = "jwPlayerViewRedraw"; 
    11294 
    11395                /** 
     
    119101                 */ 
    120102                public static var JWPLAYER_VIEW_SEEK:String = "jwPlayerViewSeek"; 
     103 
     104                /** 
     105                 * The ViewEvent.JWPLAYER_VIEW_CLICK constant defines the value of the 
     106                 * <code>type</code> property of the event object 
     107                 * for a <code>jwPlayerViewClick</code> event. 
     108                 * 
     109                 * @eventType jwPlayerViewClick 
     110                 */ 
     111                public static var JWPLAYER_VIEW_CLICK:String = "jwPlayerViewClick";              
    121112 
    122113                /** Sent along with REQUEST Event types. **/ 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/ControlBarComponent.as

    r307 r376  
    11package com.longtailvideo.jwplayer.view { 
    2         import com.longtailvideo.jwplayer.events.GlobalEventDispatcher; 
     2        import flash.events.Event; 
     3        import flash.display.DisplayObject; 
    34         
    4         import flash.display.DisplayObject; 
    5         import flash.events.Event; 
    6  
    7         /** 
     5                /** 
    86         * Sent when the user interface requests that the player play the currently loaded media 
    97         * 
     
    7472         */ 
    7573        [Event(name="jwPlayerViewSeek", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    76  
    77  
    78         public class ControlBarComponent extends GlobalEventDispatcher implements IControlbarComponent { 
     74         
     75         
     76        public class ControlBarComponent extends CoreComponent implements IControlbarComponent { 
    7977                public function ControlBarComponent() { 
     78                        //TODO: implement function 
     79                        super(); 
    8080                } 
    81  
    82                 public function addButton(icon:DisplayObject, clickHandler:Function):void { 
     81                 
     82                 
     83                public function addButton(name:String, icon:DisplayObject, clickHandler:Function):void { 
     84                        //TODO: implement function 
    8385                } 
    84  
    85                 public function hide(state:Boolean):void { 
     86                 
     87                 
     88                public function removeButton(name:String):void { 
     89                        //TODO: implement function 
    8690                } 
    87  
    8891        } 
    8992} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/CoreComponent.as

    r307 r376  
    11package com.longtailvideo.jwplayer.view { 
     2        import com.longtailvideo.jwplayer.events.GlobalEventDispatcher; 
     3        import com.longtailvideo.jwplayer.events.IGlobalEventDispatcher; 
     4         
    25        import flash.display.MovieClip; 
     6        import flash.events.Event; 
     7        import flash.events.IEventDispatcher; 
    38 
    4         public class CoreComponent extends MovieClip { 
     9        public class CoreComponent extends MovieClip implements IGlobalEventDispatcher { 
     10 
     11                private var _dispatcher:IGlobalEventDispatcher; 
     12 
    513                public function CoreComponent() { 
     14                        _dispatcher = new GlobalEventDispatcher(); 
    615                        super(); 
    716                } 
    817                 
    9                 public function setSkin(newSkin:ISkin):void { 
     18                public function resize(width:Number, height:Number):void { 
     19                        return; 
     20                } 
     21                 
     22                public function hide():void { 
     23                        return; 
     24                } 
     25                 
     26                public function show():void { 
     27                        return; 
     28                } 
     29                 
     30                public function block(name:String, timeout:Number):void { 
     31                        return; 
     32                } 
     33                 
     34                public function unblock(name:String, timeout:Number):void { 
     35                        return; 
     36                } 
     37                 
     38                public function lock(name:String, timeout:Number):void { 
     39                        return; 
     40                } 
     41                 
     42                public function unlock(name:String, timeout:Number):void { 
     43                        return; 
     44                } 
     45                 
     46                ///////////////////////////////////////////              
     47                /// IGlobalEventDispatcher implementation 
     48                ///////////////////////////////////////////              
     49                /** 
     50                 * @inheritDoc 
     51                 */ 
     52                public function addGlobalListener(listener:Function):void { 
     53                        _dispatcher.addGlobalListener(listener); 
     54                } 
     55                 
     56                 
     57                /** 
     58                 * @inheritDoc 
     59                 */ 
     60                public function removeGlobalListener(listener:Function):void { 
     61                        _dispatcher.removeGlobalListener(listener); 
     62                } 
     63                 
     64                 
     65                /** 
     66                 * @inheritDoc 
     67                 */ 
     68                public override function dispatchEvent(event:Event):Boolean { 
     69                        _dispatcher.dispatchEvent(event); 
     70                        return super.dispatchEvent(event); 
    1071                } 
    1172        } 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/IControlbarComponent.as

    r307 r376  
    3939 
    4040        /** 
    41          * Sent when the user interface requests that the player navigate to the playlist item's <code>link</code> property 
    42          * 
    43          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_LINK 
    44          */ 
    45         [Event(name="jwPlayerViewLink", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    46  
    47         /** 
    4841         * Sent when the user reuquests the player set its mute state to the given value 
    4942         * 
     
    7467 
    7568        /** 
    76          * Sent when the user wishes to load a new item into the playlist, or replace the playlist 
    77          * 
    78          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_LOAD 
    79          */ 
    80         [Event(name="jwPlayerViewLoad", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    81  
    82         /** 
    83          * User request to redraw the player 
    84          * 
    85          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_REDRAW 
    86          */ 
    87         [Event(name="jwPlayerViewRedraw", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    88  
    89         /** 
    9069         * User request to seek to the given playback location, in seconds. 
    9170         * 
     
    9473        [Event(name="jwPlayerViewSeek", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    9574 
    96         public interface IControlbarComponent extends IEventDispatcher { 
    97  
    98                 function addButton(icon:DisplayObject, clickHandler:Function):void; 
    99                 function hide(state:Boolean):void; 
    100  
     75        public interface IControlbarComponent { 
     76                function addButton(name:String, icon:DisplayObject, clickHandler:Function):void; 
     77                function removeButton(name:String):void; 
    10178        } 
    10279} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/IDisplayComponent.as

    r307 r376  
    11package com.longtailvideo.jwplayer.view { 
     2        import flash.display.DisplayObject; 
     3         
    24 
    35        /** 
     
    911 
    1012        /** 
    11          * Sent when the user interface requests that the player pause the currently playing media 
    12          * 
    13          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_PAUSE 
    14          */ 
    15         [Event(name="jwPlayerViewPause", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    16  
    17         /** 
    18          * Sent when the user interface requests that the player stop the currently playing media 
    19          * 
    20          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_STOP 
    21          */ 
    22         [Event(name="jwPlayerViewStop", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    23  
    24         /** 
    25          * Sent when the user interface requests that the player navigate to the playlist item's <code>link</code> property 
    26          * 
    27          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_LINK 
    28          */ 
    29         [Event(name="jwPlayerViewLink", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    30  
    31         /** 
    32          * Sent when the user reuquests the player set its mute state to the given value 
    33          * 
    34          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_MUTE 
    35          */ 
    36         [Event(name="jwPlayerViewMute", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    37  
    38         /** 
    39          * Sent when the user reuquests the player set its fullscreen state to the given value 
     13         * Sent when the user requests the player set its fullscreen state to the given value 
    4014         * 
    4115         * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_FULLSCREEN 
    4216         */ 
    4317        [Event(name="jwPlayerViewFullscreen", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
     18         
     19        /** 
     20         * Sent when the user clicks on the display 
     21         * 
     22         * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_CLICK 
     23         */ 
     24        [Event(name="jwPlayerViewClick", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    4425 
    4526        public interface IDisplayComponent { 
    46  
    47                 function hide(state:Boolean):void; 
    48  
     27                function setIcon(displayIcon:DisplayObject):void; 
     28                function setText(displayText:String):void; 
    4929        } 
    5030} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/IDockComponent.as

    r307 r376  
    33 
    44        public interface IDockComponent { 
    5                  
    6                 function addButton(icon:DisplayObject, clickHandler:Function):void; 
    7                 function hide(state:Boolean):void; 
    8  
     5                function addButton(name:String, icon:DisplayObject, clickHandler:Function):void; 
     6                function removeButton(name:String):void; 
    97        } 
    108} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/IPlaylistComponent.as

    r307 r376  
    1616 
    1717        /** 
    18          * Sent when the user interface requests that the player navigate to the playlist item's <code>link</code> property 
    19          * 
    20          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_LINK 
    21          */ 
    22         [Event(name="jwPlayerViewLink", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    23  
    24         /** 
    2518         * Sent when the user requests the player skip to the given playlist index 
    2619         * 
     
    2922        [Event(name="jwPlayerViewItem", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    3023 
    31         /** 
    32          * Sent when the user wishes to load a new item into the playlist, or replace the playlist 
    33          * 
    34          * @eventType com.longtailvideo.jwplayer.events.ViewEvent.JWPLAYER_VIEW_LOAD 
    35          */ 
    36         [Event(name="jwPlayerViewLoad", type = "com.longtailvideo.jwplayer.events.ViewEvent")] 
    37  
    38         public interface IPlaylistComponent { 
    39                  
    40                 function hide(state:Boolean):void; 
    41                  
     24        public interface IPlaylistComponent {            
    4225        } 
    4326} 
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/PlayerComponents.as

    r307 r376  
    1010                 
    1111                public function PlayerComponents(skin:ISkin) { 
     12                        _controlbar = new ControlBarComponent(); 
     13                        _display = new DisplayComponent(); 
    1214                } 
    1315                 
Note: See TracChangeset for help on using the changeset viewer.