Changeset 1815
- Timestamp:
- 05/31/11 08:26:37 (2 years ago)
- Location:
- plugins/captions/v5
- Files:
-
- 5 edited
-
captions.swf (modified) (previous)
-
doc/guide.html (modified) (1 diff)
-
src/com/longtailvideo/plugins/captions/Captions.as (modified) (2 diffs)
-
src/com/longtailvideo/plugins/captions/Selector.as (modified) (5 diffs)
-
test/assets/corrie-styled.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/captions/v5/doc/guide.html
r1813 r1815 329 329 <li>Enhanced error handling. Instead of printing the error on screen, it is logged by the player. </li> 330 330 <li>Fixed an issue with too many line breaks in both MP4 and DFXP files.</li> 331 <li>Fixed an issue that caused spans wrapping an entire caption to be ignored.</li> 331 332 </ul> 332 333 -
plugins/captions/v5/src/com/longtailvideo/plugins/captions/Captions.as
r1813 r1815 330 330 /** Resize this plugin */ 331 331 public function resize(width:Number, height:Number):void { 332 _selector.resize(width,height);333 332 if(_player.config.fullscreen) { 334 333 _renderer.x = width / 6; … … 346 345 _renderer.y = height - 10; 347 346 } 347 _selector.resize(width,height); 348 348 }; 349 349 -
plugins/captions/v5/src/com/longtailvideo/plugins/captions/Selector.as
r1813 r1815 71 71 private function _downHandler():void { 72 72 _offset++; 73 _redraw( false);73 _redraw(); 74 74 }; 75 75 … … 90 90 } 91 91 _options[_active].button.activate(true); 92 // Set a sane default offset.93 if(_active < _max()) {94 _offset = 0;95 } else if(_options.length > _max() && _active > _options.length - _max()) {96 _offset = _options.length - _max();97 } else {98 _offset = _active;99 }100 92 // Redraw the menu. 93 _reoffset(); 101 94 _redraw(); 102 95 }; … … 104 97 105 98 /** Draw visible portion of the options. **/ 106 private function _redraw( show:Boolean=true):void {99 private function _redraw():void { 107 100 var button:SelectorButton; 108 101 var height:Number = 0; … … 164 157 165 158 159 /** If scrolling, set offset such that active track is visible. **/ 160 private function _reoffset():void { 161 if(_active < _max()) { 162 _offset = 0; 163 } else if(_options.length > _max() && _active > _options.length - _max()) { 164 _offset = _options.length - _max(); 165 } else { 166 _offset = _active; 167 } 168 }; 169 170 166 171 /** Resize the selector screen. **/ 167 172 public function resize(width:Number,height:Number):void { 173 _back.height = height; 168 174 _back.width = width; 169 _back.height = height;170 if(_options) {175 if(_options) { 176 _reoffset(); 171 177 _redraw(); 172 178 } … … 176 182 /** The up button was clicked. **/ 177 183 private function _upHandler():void { 178 _offset --;179 _redraw( false);184 _offset--; 185 _redraw(); 180 186 }; 181 187 -
plugins/captions/v5/test/assets/corrie-styled.xml
r1769 r1815 12 12 <p begin="00:00:08" end="00:00:10" style="boldened">- Nothing is going on.</p> 13 13 <p begin="00:00:10.5" end="00:00:12.5" style="yellow">You liar!</p> 14 <p begin="00:00:13.5" end="00:00:15" style="yellow"><span tts:fontSize="30" >Are you?</span></p>14 <p begin="00:00:13.5" end="00:00:15" style="yellow"><span tts:fontSize="30" tts:color="#FFCC00">Are you?</span></p> 15 15 <p begin="00:00:17" end="00:00:20" style="bigger">Violet, please!<br/>- I am <span tts:fontSize="30">not</span> your babe!</p> 16 16 <p begin="00:00:24" end="00:00:29" style="yellow">
Note: See TracChangeset
for help on using the changeset viewer.
