[Pkg-javascript-commits] [jarisplayer] 51/80: Re-added fix to player by replacing switch with if constructor.

Jonas Smedegaard dr at jones.dk
Tue May 10 08:45:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository jarisplayer.

commit fb826005b2a793f6507e6efbdc068c4864133eb5
Author: jgmdev <jgmdev at gmail.com>
Date:   Thu Sep 11 18:09:31 2014 -0400

    Re-added fix to player by replacing switch with if constructor.
---
 bin/JarisFLVPlayer.swf     | Bin 24686 -> 24713 bytes
 src/jaris/player/Player.hx |  61 +++++++++++++++++++++++++--------------------
 2 files changed, 34 insertions(+), 27 deletions(-)

diff --git a/bin/JarisFLVPlayer.swf b/bin/JarisFLVPlayer.swf
index e7d6429..29ca65c 100644
Binary files a/bin/JarisFLVPlayer.swf and b/bin/JarisFLVPlayer.swf differ
diff --git a/src/jaris/player/Player.hx b/src/jaris/player/Player.hx
index 660ee1c..deff6e0 100644
--- a/src/jaris/player/Player.hx
+++ b/src/jaris/player/Player.hx
@@ -317,34 +317,41 @@ class Player extends EventDispatcher
 		var M_KEY:UInt = 77;
 		var X_KEY:UInt = 88;
 		
-		switch(event.keyCode)
+		if(event.keyCode == Keyboard.TAB)
 		{
-			case Keyboard.TAB:
-				toggleAspectRatio();
-			
-			case F_KEY:
-				toggleFullscreen();
-				
-			case M_KEY:
-				toggleMute();
-				
-			case Keyboard.UP:
-				volumeUp();
-				
-			case Keyboard.DOWN:
-				volumeDown();
-				
-			case Keyboard.RIGHT:
-				forward();
-				
-			case Keyboard.LEFT:
-				rewind();
-				
-			case Keyboard.SPACE:
-				togglePlay();
-				
-			case X_KEY:
-				stopAndClose();
+			toggleAspectRatio();
+		}
+		else if(event.keyCode == F_KEY)
+		{
+			toggleFullscreen();
+		}
+		else if(event.keyCode == M_KEY)
+		{
+			toggleMute();
+		}
+		else if(event.keyCode == Keyboard.UP)
+		{
+			volumeUp();
+		}
+		else if(event.keyCode == Keyboard.DOWN)
+		{
+			volumeDown();
+		}
+		else if(event.keyCode == Keyboard.RIGHT)
+		{
+			forward();
+		}
+		else if(event.keyCode == Keyboard.LEFT)
+		{
+			rewind();
+		}
+		else if(event.keyCode == Keyboard.SPACE)
+		{
+			togglePlay();
+		}
+		else if(event.keyCode == X_KEY)
+		{
+			stopAndClose();
 		}
 	}
 	

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jarisplayer.git



More information about the Pkg-javascript-commits mailing list