Changeset 540


Ignore:
Timestamp:
10/28/09 17:52:54 (4 years ago)
Author:
pablo
Message:

HTTPMediaProvider playlist duration issue fixed
Model event metadata
MediaProvider event metadata
PlayerConfig cleanup
MRSS duration issue fixed (getting 0 instead of -1 when duration not set)

Location:
trunk/fl5
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/fl5/src/com/longtailvideo/jwplayer/controller/Controller.as

    r536 r540  
    123123                        _model.playlist.addEventListener(PlaylistEvent.JWPLAYER_PLAYLIST_ITEM, playlistItemHandler, false, 1000); 
    124124                         
     125                        _model.addEventListener(MediaEvent.JWPLAYER_MEDIA_COMPLETE, completeHandler); 
     126                         
    125127                        // Broadcast playlist loaded (which was swallowed during player setup); 
    126128                        if (_model.playlist.length > 0) { 
     
    152154                private function errorState(message:String=""):void { 
    153155                        dispatchEvent(new PlayerEvent(PlayerEvent.JWPLAYER_ERROR, message)); 
     156                } 
     157                 
     158                private function completeHandler(evt:MediaEvent):void { 
     159                         
    154160                } 
    155161 
  • trunk/fl5/src/com/longtailvideo/jwplayer/media/HTTPMediaProvider.as

    r535 r540  
    205205                                resize(_width, _height); 
    206206                        } 
    207                         if (dat.duration && item.duration < 0) { 
     207                        if (dat.duration && item.duration <= 0) { 
    208208                                item.duration = dat.duration; 
    209209                        } 
  • trunk/fl5/src/com/longtailvideo/jwplayer/media/MediaProvider.as

    r530 r540  
    3939        [Event(name="jwplayerMediaLoaded", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
    4040        /** 
     41         * Sent after a load() command has completed 
     42         *  
    4143         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_TIME 
    4244         */ 
    4345        [Event(name="jwplayerMediaTime", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
    4446        /** 
     47         * Sends the position and duration of the currently playing media 
     48         *  
    4549         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_VOLUME 
    4650         */ 
    4751        [Event(name="jwplayerMediaVolume", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
    4852        /** 
     53         * Fired when the currently playing media has completed its playback 
     54         *  
     55         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_COMPLETE 
     56         */ 
     57        [Event(name="jwplayerMediaComplete", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     58        /** 
     59         * Sent when the playback state has changed. 
     60         *  
    4961         * @eventType com.longtailvideo.jwplayer.events.PlayerStateEvent.JWPLAYER_PLAYER_STATE 
    5062         */ 
    5163        [Event(name="jwplayerPlayerState", type="com.longtailvideo.jwplayer.events.PlayerStateEvent")] 
    52  
    5364 
    5465        public class MediaProvider extends Sprite implements IGlobalEventDispatcher { 
  • trunk/fl5/src/com/longtailvideo/jwplayer/model/Model.as

    r527 r540  
    1616 
    1717        /** 
     18         * Fired when a portion of the current media has been loaded into the buffer. 
     19         * 
    1820         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_BUFFER 
    1921         */ 
    20         [Event(name="jwplayerMediaBuffer", type = "com.longtailvideo.jwplayer.events.MediaEvent")] 
    21  
    22         /** 
     22        [Event(name="jwplayerMediaBuffer", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     23        /** 
     24         * Fired when the buffer is full. 
     25         * 
     26         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_BUFFER_FULL 
     27         */ 
     28        [Event(name="jwplayerMediaBufferFull", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     29        /** 
     30         * Fired if an error occurs in the course of media playback. 
     31         * 
     32         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_ERROR 
     33         */ 
     34        [Event(name="jwplayerMediaError", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     35        /** 
     36         * Fired after the MediaProvider has loaded an item into memory. 
     37         * 
    2338         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_LOADED 
    2439         */ 
    25         [Event(name="jwplayerMediaLoaded", type = "com.longtailvideo.jwplayer.events.MediaEvent")] 
    26  
    27         /** 
     40        [Event(name="jwplayerMediaLoaded", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     41        /** 
     42         * Sent after a load() command has completed 
     43         *  
    2844         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_TIME 
    2945         */ 
    30         [Event(name="jwplayerMediaTime", type = "com.longtailvideo.jwplayer.events.MediaEvent")] 
    31  
    32         /** 
     46        [Event(name="jwplayerMediaTime", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     47        /** 
     48         * Sends the position and duration of the currently playing media 
     49         *  
    3350         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_VOLUME 
    3451         */ 
    35         [Event(name="jwplayerMediaVolume", type = "com.longtailvideo.jwplayer.events.MediaEvent")] 
    36  
    37         /** 
     52        [Event(name="jwplayerMediaVolume", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     53        /** 
     54         * Fired when the currently playing media has completed its playback 
     55         *  
     56         * @eventType com.longtailvideo.jwplayer.events.MediaEvent.JWPLAYER_MEDIA_COMPLETE 
     57         */ 
     58        [Event(name="jwplayerMediaComplete", type="com.longtailvideo.jwplayer.events.MediaEvent")] 
     59        /** 
     60         * Sent when the playback state has changed. 
     61         *  
    3862         * @eventType com.longtailvideo.jwplayer.events.PlayerStateEvent.JWPLAYER_PLAYER_STATE 
    3963         */ 
    40         [Event(name="jwplayerPlayerState", type = "com.longtailvideo.jwplayer.events.PlayerStateEvent")] 
    41  
    42         /** 
     64        [Event(name="jwplayerPlayerState", type="com.longtailvideo.jwplayer.events.PlayerStateEvent")] 
     65        /** 
     66         * Fired if an error has occurred in the model. 
     67         *  
    4368         * @eventType com.longtailvideo.jwplayer.events.PlayerEvent.JWPLAYER_ERROR 
    4469         */ 
  • trunk/fl5/src/com/longtailvideo/jwplayer/model/PlayerConfig.as

    r524 r540  
    11package com.longtailvideo.jwplayer.model { 
     2        import com.longtailvideo.jwplayer.controller.RepeatOptions; 
    23        import com.longtailvideo.jwplayer.plugins.PluginConfig; 
    34        import com.longtailvideo.jwplayer.utils.Configger; 
     
    56        import com.longtailvideo.jwplayer.utils.Strings; 
    67        import com.longtailvideo.jwplayer.utils.TypeChecker; 
     8        import com.longtailvideo.jwplayer.view.PlayerLayoutManager; 
    79         
    810        import flash.events.EventDispatcher; 
     
    2224                private var _autostart:Boolean          = false;  
    2325                private var _bufferlength:Number        = 5;  
    24                 private var _displayclick:String        = "play";  
    2526                private var _displaytitle:Boolean       = true;  
    2627                private var _fullscreen:Boolean         = false; 
     
    2829                private var _linktarget:String          = "_blank"; 
    2930                private var _mute:Boolean                       = false; 
    30                 private var _repeat:String                      = "none";  
     31                private var _repeat:String                      = RepeatOptions.NONE;  
    3132                private var _shuffle:Boolean            = false;  
    3233                private var _smoothing:Boolean          = true;  
     
    3940                private var _screencolor:Color          = null; 
    4041                 
    41                 private var _controlbar:String          = "bottom"; 
    42                 private var _dock:String                        = "right"; 
     42                private var _controlbar:String          = PlayerLayoutManager.BOTTOM; 
     43                private var _dock:Boolean                       = true; 
    4344                private var _height:Number                      = 400; 
    4445                private var _icons:Boolean                      = true; 
     
    222223 
    223224                /** Set this to true to show the dock with large buttons in the top right of the player. Available since 4.5.  @default true **/ 
    224                 public function get dock():String { return _dock; } 
    225                 public function set dock(x:String):void { 
    226                         if (x == 'true') { 
    227                                 _dock = 'right'; 
    228                         } else { 
    229                                 _dock = x; 
    230                         } 
     225                public function get dock():Boolean { return _dock; } 
     226                public function set dock(x:Boolean):void { 
     227                        _dock = x; 
    231228                } 
    232229 
     
    286283                public function get bufferlength():Number { return _bufferlength; } 
    287284                public function set bufferlength(x:Number):void { _bufferlength = x; } 
    288  
    289                 /**  
    290                  * What to do when one clicks the display. Can be play, link, fullscreen, none, mute, next. When set to none, the handcursor is  
    291                  * also not shown. @default play  
    292                  **/ 
    293                 public function get displayclick():String { return _displayclick; } 
    294                 public function set displayclick(x:String):void { _displayclick = x; } 
    295285 
    296286                /** Set this to true to print the title of a video in the display. @default true **/ 
  • trunk/fl5/src/com/longtailvideo/jwplayer/parsers/MediaParser.as

    r320 r540  
    2929                                                                itm['file'] = i.@url.toString(); 
    3030                                                        } 
    31                                                         if (i.@duration) { 
     31                                                        if (i.@duration.length() > 0) { 
    3232                                                                itm['duration'] = Strings.seconds(i.@duration.toString()); 
    3333                                                        } 
    34                                                         if (i.@start) { 
     34                                                        if (i.@start.length() > 0) { 
    3535                                                                itm['start'] = Strings.seconds(i.@start.toString()); 
    3636                                                        } 
  • trunk/fl5/src/com/longtailvideo/jwplayer/player/Player.as

    r539 r540  
    3030         */ 
    3131        public class Player extends Sprite { 
    32                 private static var playerVersion:String = "5.0.539 alpha"; 
     32                private static var playerVersion:String = "5.0.540 alpha"; 
    3333                private static var _commercial:Boolean = Boolean(CONFIG::commercial); 
    3434                 
Note: See TracChangeset for help on using the changeset viewer.