[Pkg-javascript-commits] [jarisplayer] 40/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 1b11328b88ca7b589d0aa16dc89b753cdbf29a3b
Author: Rene K. Mueller <spiritdude at gmail.com>
Date: Mon May 20 17:57:30 2013 +0200
added loadVideo() JsAPI call, call from JS new video
---
bin/index.html | 126 +++++++++++++++++++++++++++++++++++++++++++++++
bin/js/jarisflvplayer.js | 118 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 244 insertions(+)
diff --git a/bin/index.html b/bin/index.html
new file mode 100644
index 0000000..0b4dede
--- /dev/null
+++ b/bin/index.html
@@ -0,0 +1,126 @@
+<!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/bin/js/jarisflvplayer.js b/bin/js/jarisflvplayer.js
new file mode 100644
index 0000000..b2408ff
--- /dev/null
+++ b/bin/js/jarisflvplayer.js
@@ -0,0 +1,118 @@
+/**
+ * @author Jefferson Gonzalez
+ * @copyright 2010 Jefferson Gonzalez
+ *
+ * @license
+ * This file is part of Jaris FLV Player.
+ *
+ * Jaris FLV Player is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License or GNU LESSER GENERAL
+ * PUBLIC LICENSE as published by the Free Software Foundation, either version
+ * 3 of the License, or (at your option) any later version.
+ *
+ * Jaris FLV Player is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License and
+ * GNU LESSER GENERAL PUBLIC LICENSE along with Jaris FLV Player. If not,
+ * see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ *Interface for the JarisFLVPlayer JavaScript API implemented
+ *by Sascha from http://projekktor.com/
+ *@param id The id of the flash object
+*/
+function JarisFLVPlayer(id){
+
+ this.playerId = id; //Stores the id of the player
+ this.player = null; //Object that points to the player
+}
+
+//Event constants
+JarisFLVPlayer.event = {
+ MOUSE_HIDE: "onMouseHide",
+ MOUSE_SHOW: "onMouseShow",
+ MEDIA_INITIALIZED: "onDataInitialized",
+ BUFFERING: "onBuffering",
+ NOT_BUFFERING: "onNotBuffering",
+ RESIZE: "onResize",
+ PLAY_PAUSE: "onPlayPause",
+ PLAYBACK_FINISHED: "onPlaybackFinished",
+ CONNECTION_FAILED: "onConnectionFailed",
+ ASPECT_RATIO: "onAspectRatio",
+ VOLUME_UP: "onVolumeUp",
+ VOLUME_DOWN: "onVolumeDown",
+ VOLUME_CHANGE: "onVolumeChange",
+ MUTE: "onMute",
+ TIME: "onTimeUpdate",
+ PROGRESS: "onProgress",
+ SEEK: "onSeek",
+ ON_ALL: "on*"
+};
+
+JarisFLVPlayer.prototype.isBuffering = function(){
+ this.setPlayer();
+ return this.player.api_get("isBuffering");
+}
+
+JarisFLVPlayer.prototype.isPlaying = function(){
+ this.setPlayer();
+ return this.player.api_get("isPlaying");
+}
+
+JarisFLVPlayer.prototype.getCurrentTime = function(){
+ this.setPlayer();
+ return this.player.api_get("time");
+}
+
+JarisFLVPlayer.prototype.getBytesLoaded = function(){
+ this.setPlayer();
+ return this.player.api_get("loaded");
+}
+
+JarisFLVPlayer.prototype.getVolume = function(){
+ this.setPlayer();
+ return this.player.api_get("volume");
+}
+
+JarisFLVPlayer.prototype.addListener = function(event, listener){
+ this.setPlayer();
+ this.player.api_addlistener(event, listener);
+}
+
+JarisFLVPlayer.prototype.removeListener = function(event){
+ this.setPlayer();
+ this.player.api_removelistener(event);
+}
+
+JarisFLVPlayer.prototype.play = function(){
+ this.setPlayer();
+ this.player.api_play();
+}
+
+JarisFLVPlayer.prototype.pause = function(){
+ this.setPlayer();
+ this.player.api_pause();
+}
+
+JarisFLVPlayer.prototype.seek = function(seconds){
+ this.setPlayer();
+ this.player.api_seek(seconds);
+}
+
+JarisFLVPlayer.prototype.volume = function(value){
+ this.setPlayer();
+ this.player.api_volume(value);
+}
+
+JarisFLVPlayer.prototype.loadVideo = function(url,type,streamType,server){
+ this.setPlayer();
+ this.player.api_loadVideo(url,type,streamType,server);
+}
+
+JarisFLVPlayer.prototype.setPlayer = function(){
+ this.player = document.getElementById(this.playerId);
+}
--
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