- Timestamp:
- 08/30/10 19:06:53 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fl5/src/com/longtailvideo/jwplayer/controller/Controller.as
r1228 r1252 84 84 /** Whether the playlist has been loaded yet **/ 85 85 protected var _playlistReady:Boolean = false; 86 86 /** Set this value if a seek request comes in before the seek is possible **/ 87 protected var _queuedSeek:Number = -1; 87 88 88 89 /** A list with legacy CDN classes that are now redirected to buit-in ones. **/ … … 373 374 break; 374 375 case PlayerState.PAUSED: 375 _model.media.play(); 376 if (_queuedSeek >= 0) { 377 _model.media.seek(_queuedSeek); 378 _queuedSeek = -1; 379 } else { 380 _model.media.play(); 381 } 376 382 break; 377 383 } … … 478 484 } 479 485 480 481 486 public function seek(pos:Number):Boolean { 482 487 if (locking) { 483 488 return false; 484 489 } 485 if (!_model.media) 486 return false; 490 if (!_model.media) { 491 _queuedSeek = pos; 492 return false; 493 } 487 494 488 495 switch (_model.media.state) { 489 496 case PlayerState.PLAYING: 490 case PlayerState.BUFFERING:491 497 case PlayerState.PAUSED: 492 498 _model.media.seek(pos); 493 499 return true; 500 break; 501 case PlayerState.BUFFERING: 502 case PlayerState.IDLE: 503 _queuedSeek = pos; 494 504 break; 495 505 } … … 630 640 private function bufferFullHandler(evt:MediaEvent):void { 631 641 if (!locking) { 632 _model.media.play(); 642 if (_queuedSeek >= 0) { 643 _model.media.seek(_queuedSeek); 644 _queuedSeek = -1; 645 } else { 646 _model.media.play(); 647 } 633 648 } else { 634 649 _lockingResume = true; … … 647 662 648 663 public function fullscreen(mode:Boolean):Boolean { 664 _view.fullscreen(mode); 649 665 _model.fullscreen = mode; 650 _view.fullscreen(mode);651 666 dispatchEvent(new PlayerEvent(PlayerEvent.JWPLAYER_FULLSCREEN, mode.toString())); 652 667 return true;
Note: See TracChangeset
for help on using the changeset viewer.
