Changeset 1606


Ignore:
Timestamp:
02/17/11 10:08:24 (2 years ago)
Author:
jeroen
Message:

updated QM plugin for adaptive support

Location:
plugins/qualitymonitor/v5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/qualitymonitor/v5/src/com/longtailvideo/plugins/qualitymonitor/QualityMonitor.as

    r1487 r1606  
    4848        /** Build the plugin graphics. **/ 
    4949        private function buildStage():void { 
    50                 mouseEnabled = false; 
    51                 mouseChildren = false; 
    5250                _back = new Sprite(); 
    5351                _back.graphics.beginFill(0x000000,0.8); 
    5452                _back.graphics.drawRect(0,0,400,116); 
     53                _back.mouseEnabled = false; 
     54                _back.mouseChildren = false; 
    5555                addChild(_back); 
    5656                _field = new TextField(); 
     
    6262                _field.y = 12; 
    6363                _field.x = 16; 
     64                _field.mouseEnabled = false; 
    6465                addChild(_field); 
    6566                _lines = new Array( 
     
    7677                _message.width = 300; 
    7778                _message.visible = false; 
     79                _message.mouseEnabled = false; 
    7880                addChild(_message); 
    7981        }; 
     
    8284        /** Update quality metrics chart. **/ 
    8385        private function checkQuality():void { 
    84                 var idx:Number = 1; 
    85                 var txt:String = _data.level; 
     86                var txt:String = _data.currentLevel; 
     87                var idx:Number = Number(_data.currentLevel.substr(0,1)); 
    8688                if(_player.playlist.length) {  
    8789                        var arr:Array = _player.playlist.currentItem.levels; 
     
    117119                _player.addEventListener(PlayerStateEvent.JWPLAYER_PLAYER_STATE,stateHandler); 
    118120                _data = { 
    119                         bandwidth: _player.config.bandwidth, 
     121                        bandwidth: 95, 
    120122                        droppedFrames: 0, 
    121                         level: '1 of 1', 
     123                        currentLevel: '1 of 1 (5kbps, 320px)', 
    122124                        width: _player.config.width 
    123125                }; 
     
    138140                        _data.droppedFrames = event.metadata.droppedFrames; 
    139141                } 
    140                 if(event.metadata.width) { 
    141                         _data.level = '1 of 1 ('+event.metadata.width+'px)'; 
     142                if(event.metadata.currentLevel) { 
     143                        _data.currentLevel = event.metadata.currentLevel; 
    142144                } 
    143145                if(event.metadata.type == 'blacklist') { 
Note: See TracChangeset for help on using the changeset viewer.