Ignore:
Timestamp:
02/03/10 17:35:19 (3 years ago)
Author:
pablo
Message:
  • Fixed bug in HTTP and YouTube where seeking could result in strange buffering behavior in the controlbar.
  • Try/catch Arthropod log.
  • MediaProviders send position w/ jwplayerMediaBuffer events
  • Fixed bug in PNG Skins where the buffer wouldn't show correctly with a seek/offset.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fl5/src/com/longtailvideo/jwplayer/view/components/Slider.as

    r781 r819  
    2929                /** Lock state of the slider **/ 
    3030                protected var _lock:Boolean; 
     31                /** If the buffer has a percentage offset **/ 
     32                protected var _bufferOffset:Number = 0; 
    3133 
    3234 
     
    7880                } 
    7981 
     82                public function setBufferOffset(offset:Number):void { 
     83                        _bufferOffset = offset; 
     84                } 
    8085 
    8186                public function resize(width:Number, height:Number):void { 
     
    8489                        _width = width * scale; 
    8590                        _height = height; 
    86                         if (_rail.getChildByName("bitmap")) { 
    87                                 _rail.getChildByName("bitmap").width = _width; 
    88                                 resizeElement(_rail); 
    89                         } 
    90                         if (_buffer.getChildByName("bitmap")) { 
    91                                 _buffer.getChildByName("bitmap").width = _width; 
    92                                 resizeElement(_buffer, _currentBuffer); 
    93                         } 
    94                         if (_progress.getChildByName("bitmap") && !_dragging) { 
    95                                 _progress.getChildByName("bitmap").width = _width; 
    96                                 resizeElement(_progress, _currentProgress); 
     91                        var railMap:DisplayObject = _rail.getChildByName("bitmap");  
     92                        if (railMap) { 
     93                                railMap.width = _width; 
     94                                resizeElement(railMap); 
     95                        } 
     96                        var bufferMap:DisplayObject = _buffer.getChildByName("bitmap");  
     97                        if (bufferMap) { 
     98                                bufferMap.width = _width; 
     99                                bufferMap.x = _width * _bufferOffset / 100; 
     100                                resizeElement(bufferMap, _currentBuffer); 
     101                        } 
     102                        var progressMap:DisplayObject = _progress.getChildByName("bitmap");  
     103                        if (progressMap && !_dragging) { 
     104                                progressMap.width = _width; 
     105                                resizeElement(progressMap, _currentProgress); 
    97106                        } 
    98107                        if (_thumb && !_dragging) { 
     
    103112 
    104113 
    105                 private function resizeElement(element:Sprite, maskpercentage:Number=100):void { 
     114                private function resizeElement(element:DisplayObject, maskpercentage:Number=100):void { 
    106115                        if (element) { 
    107116                                if (_width && _height) { 
     
    112121                                                mask = new Sprite(); 
    113122                                                mask.name = "mask"; 
    114                                                 element.addChild(mask); 
     123                                                addChild(mask); 
    115124                                                element.mask = mask; 
    116125                                        } 
    117                                         mask.x = 0; 
     126                                        mask.x = element.x; 
    118127                                        mask.graphics.clear(); 
    119                                         mask.graphics.beginFill(0x000000, 0); 
    120                                         mask.graphics.drawRect(element.x, 0, _width * maskpercentage / 100, element.height); 
     128                                        mask.graphics.beginFill(0x0000ff, 0); 
     129                                        mask.graphics.drawRect(0, 0, _width * maskpercentage / 100, element.height); 
    121130                                        mask.graphics.endFill(); 
    122131                                } 
Note: See TracChangeset for help on using the changeset viewer.