Ignore:
Timestamp:
12/11/08 12:57:49 (5 years ago)
Author:
jeroen
Message:

removed IVA branch, added revolt, hd, metaviewer updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/accessibility-1.0/com/jeroenwijering/plugins/Accessibility.as

    r107 r125  
    2828                audio:undefined, 
    2929                captions:undefined, 
    30                 fontsize:13, 
     30                fontsize:15, 
    3131                hide:false, 
    3232                listener:undefined, 
     
    6363                config['hide'] = !stt; 
    6464                clip.visible = config['hide']; 
     65                if(config['hide']) {  
     66                        clip.captionsIcon.alpha = 1; 
     67                } else {  
     68                        clip.captionsIcon.alpha = 0.3; 
     69                } 
     70        }; 
     71 
     72 
     73        /** Clicking the  hide button. **/ 
     74        private function hideClick(evt:MouseEvent) { 
     75                hideCaptions(config['hide']); 
    6576        }; 
    6677 
     
    89100                hideCaptions(config['hide']) 
    90101                muteAudio(config['mute']); 
     102                try { 
     103                        if(config['audio']) { 
     104                                view.getPlugin('controlbar').addButton(clip.audioIcon,'audio',muteClick); 
     105                        } 
     106                        if(config['captions']) { 
     107                                view.getPlugin('controlbar').addButton(clip.captionsIcon,'captions',hideClick); 
     108                        } 
     109                } catch (erro:Error) {  
     110                        clip.audioIcon.visible = clip.captionsIcon.visible = false; 
     111                } 
    91112        }; 
    92113 
     
    141162                config['mute'] = stt; 
    142163                setVolume(); 
     164                if(config['mute']) { 
     165                        clip.audioIcon.alpha = 0.3; 
     166                } else {  
     167                        clip.audioIcon.alpha = 1; 
     168                } 
     169        }; 
     170 
     171 
     172        /** Clicking the  hide button. **/ 
     173        private function muteClick(evt:MouseEvent) { 
     174                muteAudio(!config['mute']); 
    143175        }; 
    144176 
     
    201233        /** Check timing of the player to sync captions. **/ 
    202234        private function timeHandler(evt:ModelEvent):void { 
     235                if(!captions) { return; } 
    203236                var cur:Number = -1; 
    204237                var pos:Number = evt.data.position; 
     
    212245                if(cur != current) { setCaption(cur); } 
    213246                // and sync up the audio (only if needed). 
    214                 if(channel && view.config['state'] == ModelStates.PLAYING &&  
    215                         Math.abs(pos-channel.position/1000) > 1) { 
     247                if(channel && view.config['state'] == ModelStates.PLAYING && Math.abs(pos-channel.position/1000) > 0.5) { 
    216248                        channel.stop(); 
    217249                        channel = sound.play(pos*1000); 
Note: See TracChangeset for help on using the changeset viewer.