[Pkg-javascript-commits] [jarisplayer] 39/80: added loadVideo() JsAPI call, call from JS new video

Jonas Smedegaard dr at jones.dk
Tue May 10 08:45:34 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 fc4d43593e3067712d2e4bfcd14649e6ec520e2e
Author: Rene K. Mueller <spiritdude at gmail.com>
Date:   Mon May 20 17:55:47 2013 +0200

    added loadVideo() JsAPI call, call from JS new video
---
 bin/JarisFLVPlayer.swf    | Bin 26245 -> 25973 bytes
 bin/index.html            | 126 ----------------------------------------------
 src/jaris/player/JsApi.hx |  14 +++++-
 3 files changed, 12 insertions(+), 128 deletions(-)

diff --git a/bin/JarisFLVPlayer.swf b/bin/JarisFLVPlayer.swf
old mode 100644
new mode 100755
index 467f2eb..03621b5
Binary files a/bin/JarisFLVPlayer.swf and b/bin/JarisFLVPlayer.swf differ
diff --git a/bin/index.html b/bin/index.html
deleted file mode 100644
index 0b4dede..0000000
--- a/bin/index.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-	<title>Jaris FLV Player</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="language" content="en" />
-	<meta name="description" content="" />
-	<meta name="keywords" content="" />
-	
-	<script src="js/swfobject.js" type="text/javascript"></script>
-	<script type="text/javascript">
-		var flashvarsVideo = {
-			source: "http://jaris.sourceforge.net/files/jaris-intro.flv",
-			type: "video",
-			streamtype: "file",
-			server: "",//Used for rtmp streams
-			duration: "52",
-			poster: "http://jaris.sourceforge.net/images/poster.png",
-			autostart: "false",
-			logo: "http://jaris.sourceforge.net/images/logo.png",
-			logoposition: "top left",
-			logoalpha: "30",
-			logowidth: "130",
-			logolink: "http://jaris.sourceforge.net",
-			hardwarescaling: "false",
-			darkcolor: "000000",
-			brightcolor: "4c4c4c",
-			controlcolor: "FFFFFF",
-			hovercolor: "67A8C1"
-		};
-		var flashvarsVideoNewControls = {
-			source: "http://jaris.sourceforge.net/files/jaris-intro.flv",
-			type: "video",
-			streamtype: "file",
-			server: "",//Used for rtmp streams
-			duration: "52",
-			poster: "http://jaris.sourceforge.net/images/poster.png",
-			autostart: "false",
-			logo: "http://jaris.sourceforge.net/images/logo.png",
-			logoposition: "top left",
-			logoalpha: "30",
-			logowidth: "130",
-			logolink: "http://jaris.sourceforge.net",
-			hardwarescaling: "false",
-			darkcolor: "000000",
-			brightcolor: "4c4c4c",
-			controlcolor: "FFFFFF",
-			hovercolor: "67A8C1",
-			controltype: 1
-		};
-		var flashvarsAudio = {
-			source: "http://jaris.sourceforge.net/files/audio.mp3",
-			type: "audio",
-			streamtype: "file",
-			server: "",//Used for rtmp streams
-			duration: "00:04:25",
-			poster: "http://jaris.sourceforge.net/images/poster.png",
-			autostart: "false",
-			logo: "http://jaris.sourceforge.net/images/logo.png",
-			logoposition: "top left",
-			logoalpha: "30",
-			logowidth: "130",
-			logolink: "http://jaris.sourceforge.net",
-			hardwarescaling: "false",
-			darkcolor: "D3D3D3",
-			brightcolor: "FFFFFF",
-			controlcolor: "000000",
-			hovercolor: "FF0000"
-		};
-		var params = {
-			menu: "false",
-			scale: "noScale",
-			allowFullscreen: "true",
-			allowScriptAccess: "always",
-			bgcolor: "#000000",
-			quality: "high",
-			wmode: "opaque"
-		};
-		var attributes = {
-			id:"JarisFLVPlayer"
-		};
-		swfobject.embedSWF("JarisFLVPlayer.swf", "altContentOne", "576px", "360px", "10.0.0", "expressInstall.swf", flashvarsVideo, params, attributes);
-		swfobject.embedSWF("JarisFLVPlayer.swf", "altContentOneNewControls", "576px", "360px", "10.0.0", "expressInstall.swf", flashvarsVideoNewControls, params, attributes);
-		swfobject.embedSWF("JarisFLVPlayer.swf", "altContentTwo", "576px", "360px", "10.0.0", "expressInstall.swf", flashvarsAudio, params, attributes);
-	</script>
-	<style>
-		html, body { height:100%; }
-		body { margin:0; }
-	</style>
-</head>
-<body>
-<br />
-	<center>
-	<h1>Video Example</h1>
-	<div id="altContentOne">
-		<h1>Jaris FLV Player</h1>
-		<p>Alternative content</p>
-		<p><a href="http://www.adobe.com/go/getflashplayer"><img 
-			src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
-			alt="Get Adobe Flash player" /></a></p>
-	</div>
-	
-	<br /><br />
-	
-	<h1>Video Example with New Controls</h1>
-	<div id="altContentOneNewControls">
-		<h1>Jaris FLV Player</h1>
-		<p>Alternative content</p>
-		<p><a href="http://www.adobe.com/go/getflashplayer"><img 
-			src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
-			alt="Get Adobe Flash player" /></a></p>
-	</div>
-	
-	<br /><br />
-	
-	<h1>Audio Example</h1>
-	<div id="altContentTwo">
-		<h1>Jaris FLV Player</h1>
-		<p>Alternative content</p>
-		<p><a href="http://www.adobe.com/go/getflashplayer"><img 
-			src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
-			alt="Get Adobe Flash player" /></a></p>
-	</div>
-	</center>
-</body>
-</html>
diff --git a/src/jaris/player/JsApi.hx b/src/jaris/player/JsApi.hx
old mode 100644
new mode 100755
index 59f7257..f122353
--- a/src/jaris/player/JsApi.hx
+++ b/src/jaris/player/JsApi.hx
@@ -109,7 +109,7 @@ class JsApi extends MovieClip {
 		ExternalInterface.addCallback("api_pause", setPause);
 		ExternalInterface.addCallback("api_seek", setSeek);
 		ExternalInterface.addCallback("api_volume", setVolume);
-	
+		ExternalInterface.addCallback("api_loadVideo", loadVideo);
 
 	}
 		
@@ -227,6 +227,16 @@ class JsApi extends MovieClip {
 		
 		_player.setVolume(vol);
 	}	
-		
+	
+	/**
+	 * Loads another video
+	 */
+	private function loadVideo(source:String, type:String="video", streamType:String="file", server:String=""):Void
+	{
+		if (_player.isPlaying()==true) {
+			_player.togglePlay();
+		}
+		_player.load(source, type, streamType, server);
+	}	
 	
 }
\ No newline at end of file

-- 
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