Index: /trunk/fl5/doc/publishers/options.rst
===================================================================
--- /trunk/fl5/doc/publishers/options.rst	(revision 1207)
+++ /trunk/fl5/doc/publishers/options.rst	(revision 1238)
@@ -95,4 +95,8 @@
 
    Position of the controlbar. Can be set to *bottom*, *top*, *over* and *none*.
+
+.. describe:: controlbar.idlehide ( false )
+
+   If **controlbar.position** is set to *over*, this option determines whether the controlbar stays hidden when the player is paused or stopped.
 
 .. describe:: dock ( true )
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/media/YouTubeMediaProvider.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/media/YouTubeMediaProvider.as	(revision 1003)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/media/YouTubeMediaProvider.as	(revision 1238)
@@ -71,5 +71,5 @@
 		 * ylLzyHk54Z0
 		 **/
-		private function getID(url:String):String {
+		public static function getID(url:String):String {
 			var arr:Array = url.split(/\?|\#\!/);
 			var str:String = '';
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/model/Playlist.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/model/Playlist.as	(revision 1149)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/model/Playlist.as	(revision 1238)
@@ -3,4 +3,5 @@
 	import com.longtailvideo.jwplayer.events.PlayerEvent;
 	import com.longtailvideo.jwplayer.events.PlaylistEvent;
+	import com.longtailvideo.jwplayer.media.YouTubeMediaProvider;
 	import com.longtailvideo.jwplayer.parsers.IPlaylistParser;
 	import com.longtailvideo.jwplayer.parsers.JWParser;
@@ -108,4 +109,7 @@
 						item.provider = JWParser.getProvider(item);
 					}
+					if (item.provider == "youtube" && !item.image) {
+						item.image = 'http://i.ytimg.com/vi/' + YouTubeMediaProvider.getID(item.file) + '/0.jpg';
+					}
 				}
 				list = newList;
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/utils/Stretcher.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/utils/Stretcher.as	(revision 542)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/utils/Stretcher.as	(revision 1238)
@@ -5,4 +5,6 @@
 
 	import flash.display.DisplayObject;
+	import flash.display.Sprite;
+	import flash.geom.Rectangle;
 
 	public class Stretcher {
@@ -62,4 +64,27 @@
 			clp.height = Math.ceil(clp.height);
 		}
+		
+		/**
+		 * Calculates the stretching dimensions of a clip without modifying it
+		 *
+		 * @param clp	The display element to resize.
+		 * @param wid	The target width.
+		 * @param hei	The target height.
+		 * @param typ	The stretching type.
+		 **/
+		public static function stretchDimensions(clp:DisplayObject, wid:Number, hei:Number, typ:String='uniform'):Rectangle {
+			var tempParent:Sprite = new Sprite();
+			tempParent.graphics.beginFill(1, 1);
+			tempParent.graphics.drawRect(0, 0, wid, hei);
+			
+			var tempChild:Sprite = new Sprite();
+			tempChild.graphics.beginFill(1, 1);
+			tempChild.graphics.drawRect(0, 0, clp.width, clp.height);
+			tempParent.addChild(tempChild);
+			
+			stretch(tempChild, wid, hei, typ);
+			
+			return new Rectangle(tempChild.x, tempChild.y, tempChild.width, tempChild.height);
+		}
 
 	}
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponentV4.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponentV4.as	(revision 979)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponentV4.as	(revision 1238)
@@ -11,4 +11,5 @@
 	import com.longtailvideo.jwplayer.utils.Draw;
 	import com.longtailvideo.jwplayer.utils.Logger;
+	import com.longtailvideo.jwplayer.utils.RootReference;
 	import com.longtailvideo.jwplayer.utils.Stacker;
 	import com.longtailvideo.jwplayer.utils.Strings;
@@ -20,4 +21,5 @@
 	import flash.display.MovieClip;
 	import flash.display.Sprite;
+	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.geom.ColorTransform;
@@ -63,4 +65,8 @@
 			animations = new Animations(this);
 			controlbarConfig = _player.config.pluginConfig("controlbar");
+			if (controlbarConfig['position'] == "over" && String(controlbarConfig['idlehide']) == "true") {
+				alpha = 0;
+			}
+			
 			if (!controlbarConfig['margin']) controlbarConfig['margin'] = 0;	
 			// TODO: Remove Link button
@@ -88,4 +94,6 @@
 			_player.addEventListener(PlaylistEvent.JWPLAYER_PLAYLIST_UPDATED, itemHandler);
 			_player.addEventListener(PlaylistEvent.JWPLAYER_PLAYLIST_ITEM, itemHandler);
+			RootReference.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeftStage);
+			RootReference.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
 			stacker = new Stacker(skin as MovieClip);
 			try {
@@ -366,76 +374,74 @@
 
 		
+		private function get fadeOnTimeout():Boolean {
+			return controlbarConfig['position'] == 'over' || (_player.config.fullscreen && controlbarConfig['position'] != 'none');
+		}
+		
+		private function get hideOnIdle():Boolean {
+			return String(controlbarConfig['idlehide']) == "true";
+		}
+		
 		private function startFader():void {
-			if (controlbarConfig['position'] == 'over' || (_player.config.fullscreen && controlbarConfig['position'] != 'none')) {
+			if (fadeOnTimeout) {
 				if (!isNaN(hiding)) {
 					clearTimeout(hiding);
 				}
 				hiding = setTimeout(moveTimeout, 2000);
-				_player.controls.display.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-				addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
 			}
 		}
 		
 		private function stopFader():void {
+			if (alpha == 0) {
+				animations.fade(1, 0.5);
+			}
 			if (!isNaN(hiding)) {
 				clearTimeout(hiding);
-				try {
-					_player.controls.display.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-					removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-				} catch (e:Error) {}
-			}
-			Mouse.show();
-			animations.fade(1);
-		}
-		
-		/** Show above controlbar on mousemove. **/
+				Mouse.show();
+			}
+		}
+		
+		/** Show above controlbar on mousemove and restart the countdown. **/
 		private function moveHandler(evt:MouseEvent=null):void {
 			if (alpha == 0) {
-				animations.fade(1);
-			}
-			clearTimeout(hiding);
-			hiding = setTimeout(moveTimeout, 2000);
-			Mouse.show();
-		}
-		
+				stopFader();
+				startFader();
+			}
+		}
 		
 		/** Hide above controlbar again when move has timed out. **/
-		private function moveTimeout():void {
-			animations.fade(0);
+		private function moveTimeout(evt:Event=null):void {
+			animations.fade(0, 0.5);
 			Mouse.hide();
 		}
 		
-		/** Process state changes **/
+		/** If the mouse leaves the stage, hide the controlbar if position is 'over' **/
+		private function mouseLeftStage(evt:Event=null):void {
+			if (fadeOnTimeout) {
+				if (_player.state == PlayerState.BUFFERING || _player.state == PlayerState.PLAYING || hideOnIdle)
+					animations.fade(0);
+			}
+		}
+		
+
 		private function stateHandler(evt:PlayerEvent=null):void {
-			// TODO: Fix non-working fading
-			clearTimeout(hiding);
-			try {
-				switch (_player.state) {
-					case PlayerState.PLAYING:
-						getSkinComponent('playButton').visible = false;
-						getSkinComponent('pauseButton').visible = true;
-						startFader();
-						break;
-					case PlayerState.PAUSED:
-						getSkinComponent('playButton').visible = true;
-						getSkinComponent('pauseButton').visible = false;
+			switch(_player.state) {
+				case PlayerState.BUFFERING:
+				case PlayerState.PLAYING:
+					getSkinComponent('playButton').visible = false;
+					getSkinComponent('pauseButton').visible = true;
+					startFader();
+					break;
+				case PlayerState.PAUSED:
+				case PlayerState.IDLE:
+					getSkinComponent('playButton').visible = true;
+					getSkinComponent('pauseButton').visible = false;
+					if (hideOnIdle) {
+						mouseLeftStage();
+					} else {
 						stopFader();
-						break;
-					case PlayerState.BUFFERING:
-						getSkinComponent('playButton').visible = false;
-						getSkinComponent('pauseButton').visible = true;
-						stopFader();
-						break;
-					case PlayerState.IDLE:
-						getSkinComponent('playButton').visible = true;
-						getSkinComponent('pauseButton').visible = false;
-						timeHandler();
-						stopFader();
-						break;
-				}
-			} catch (e:Error) {
-			}
-		}
-
+					}
+					break;
+			}
+		}
 
 		/** Process time updates given by the model. **/
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponent.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponent.as	(revision 1059)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/view/components/ControlbarComponent.as	(revision 1238)
@@ -11,4 +11,5 @@
 	import com.longtailvideo.jwplayer.utils.Animations;
 	import com.longtailvideo.jwplayer.utils.Logger;
+	import com.longtailvideo.jwplayer.utils.RootReference;
 	import com.longtailvideo.jwplayer.utils.Strings;
 	import com.longtailvideo.jwplayer.view.interfaces.IControlbarComponent;
@@ -17,4 +18,5 @@
 	import flash.display.MovieClip;
 	import flash.display.Sprite;
+	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.geom.ColorTransform;
@@ -103,4 +105,6 @@
 		protected var _bgColorSheet:Sprite;
 		
+		protected var _fullscreen:Boolean = false;
+		
 		protected var controlbarConfig:PluginConfig;
 		protected var animations:Animations;
@@ -109,4 +113,10 @@
 		public function ControlbarComponent(player:IPlayer) {
 			super(player, "controlbar");
+			controlbarConfig = _player.config.pluginConfig(_name);
+			animations = new Animations(this);
+			if (controlbarConfig['position'] == "over" && hideOnIdle) {
+				alpha = 0;
+			}
+			
 			_layoutManager = new ControlbarLayoutManager(this);
 			_dividers = [];
@@ -118,6 +128,4 @@
 			setTime(0, 0);
 			updateVolumeSlider();
-			controlbarConfig = _player.config.pluginConfig(_name);
-			animations = new Animations(this);
 		}
 
@@ -133,4 +141,6 @@
 			player.addEventListener(PlayerEvent.JWPLAYER_LOCKED, lockHandler);
 			player.addEventListener(PlayerEvent.JWPLAYER_UNLOCKED, lockHandler);
+			RootReference.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeftStage);
+			RootReference.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
 		}
 
@@ -153,43 +163,51 @@
 		}
 
+		private function get fadeOnTimeout():Boolean {
+			return controlbarConfig['position'] == 'over' || (_player.config.fullscreen && controlbarConfig['position'] != 'none');
+		}
+		
+		private function get hideOnIdle():Boolean {
+			return String(controlbarConfig['idlehide']) == "true";
+		}
 		
 		private function startFader():void {
-			if (controlbarConfig['position'] == 'over' || (_player.config.fullscreen && controlbarConfig['position'] != 'none')) {
+			if (fadeOnTimeout) {
 				if (!isNaN(hiding)) {
 					clearTimeout(hiding);
 				}
 				hiding = setTimeout(moveTimeout, 2000);
-				_player.controls.display.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-				addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
 			}
 		}
 		
 		private function stopFader():void {
+			if (alpha == 0) {
+				animations.fade(1, 0.5);
+			}
 			if (!isNaN(hiding)) {
 				clearTimeout(hiding);
-				try {
-					_player.controls.display.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-					removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler);
-				} catch (e:Error) {}
-			}
-			Mouse.show();
-			animations.fade(1, 0.5);
-		}
-		
-		/** Show above controlbar on mousemove. **/
+				Mouse.show();
+			}
+		}
+		
+		/** Show above controlbar on mousemove and restart the countdown. **/
 		private function moveHandler(evt:MouseEvent=null):void {
 			if (alpha == 0) {
-				animations.fade(1, 0.5);
-			}
-			clearTimeout(hiding);
-			hiding = setTimeout(moveTimeout, 2000);
-			Mouse.show();
-		}
-		
+				stopFader();
+				startFader();
+			}
+		}
 		
 		/** Hide above controlbar again when move has timed out. **/
-		private function moveTimeout():void {
+		private function moveTimeout(evt:Event=null):void {
 			animations.fade(0, 0.5);
 			Mouse.hide();
+		}
+		
+		/** If the mouse leaves the stage, hide the controlbar if position is 'over' **/
+		private function mouseLeftStage(evt:Event=null):void {
+			if (fadeOnTimeout) {
+				if (_player.state == PlayerState.BUFFERING || _player.state == PlayerState.PLAYING || hideOnIdle)
+				animations.fade(0);
+			}
 		}
 		
@@ -202,5 +220,9 @@
 				case PlayerState.PAUSED:
 				case PlayerState.IDLE:
-					stopFader();
+					if (hideOnIdle) {
+						mouseLeftStage();
+					} else {
+						stopFader();
+					}
 					break;
 			}
@@ -656,5 +678,8 @@
 			_bgColorSheet.height = background.height;
 
-			stopFader();
+			if (_fullscreen && !_player.config.fullscreen) {
+				stopFader();
+			}
+			_fullscreen = _player.config.fullscreen;
 			stateHandler();
 			redraw();
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/view/View.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/view/View.as	(revision 1228)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/view/View.as	(revision 1238)
@@ -39,4 +39,5 @@
 	import flash.events.IOErrorEvent;
 	import flash.events.MouseEvent;
+	import flash.geom.Rectangle;
 	import flash.net.URLRequest;
 	import flash.system.LoaderContext;
@@ -268,7 +269,7 @@
 
 		protected function resizeHandler(event:Event):void {
-			var currentFSMode:Boolean = (RootReference.stage.displayState == StageDisplayState.FULL_SCREEN);
-			if (_model.fullscreen != currentFSMode) {
-				dispatchEvent(new ViewEvent(ViewEvent.JWPLAYER_VIEW_FULLSCREEN, currentFSMode));
+			_fullscreen = (RootReference.stage.displayState == StageDisplayState.FULL_SCREEN);
+			if (_model.fullscreen != _fullscreen) {
+				dispatchEvent(new ViewEvent(ViewEvent.JWPLAYER_VIEW_FULLSCREEN, _fullscreen));
 			}
 			dispatchEvent(new ViewEvent(ViewEvent.JWPLAYER_RESIZE, {width: RootReference.stage.stageWidth, height: RootReference.stage.stageHeight}));
@@ -305,5 +306,12 @@
 				_mediaLayer.x = _components.display.x;
 				_mediaLayer.y = _components.display.y;
-				_model.media.resize(_player.config.width, _player.config.height);
+				if (_fullscreen && _model.config.stretching == Stretcher.EXACTFIT) {
+					var dimensions:Rectangle = Stretcher.stretchDimensions(_model.media.display, _player.config.width, _player.config.height, Stretcher.UNIFORM);
+					_model.media.resize(dimensions.width, dimensions.height);
+					_mediaLayer.x = dimensions.x;
+					_mediaLayer.y = dimensions.y;
+				} else {
+					_model.media.resize(_player.config.width, _player.config.height);
+				}
 			}
 
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as	(revision 1228)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as	(revision 1238)
@@ -3,5 +3,5 @@
 	
 	public class PlayerVersion {
-		protected static var _version:String = "5.3.1228";
+		protected static var _version:String = "5.3.1238";
 		
 		public static function get version():String {
Index: /trunk/fl5/src/com/longtailvideo/jwplayer/player/IPlayer.as
===================================================================
--- /trunk/fl5/src/com/longtailvideo/jwplayer/player/IPlayer.as	(revision 1147)
+++ /trunk/fl5/src/com/longtailvideo/jwplayer/player/IPlayer.as	(revision 1238)
@@ -71,5 +71,5 @@
 		function fullscreen(on:Boolean):void;
 		function get controls():IPlayerComponents;
-		function overrideComponent(plugin:IPlayerComponent):void
+		function overrideComponent(plugin:IPlayerComponent):void;
 	}
 }
