[Pkg-javascript-commits] [jarisplayer] 35/80: Added loop functionality and fixed wrong seek position on pseudostreaming
Jonas Smedegaard
dr at jones.dk
Tue May 10 08:45:33 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 d95d40c7641765aa988362a0ed275eb913f7a2d3
Author: jgmylm <jgmylm at edf201c3-a14d-0410-a11e-aa85364efa9f>
Date: Sun Mar 6 20:30:15 2011 +0000
Added loop functionality and fixed wrong seek position on pseudostreaming
git-svn-id: https://jaris.svn.sourceforge.net/svnroot/jaris/trunk@35 edf201c3-a14d-0410-a11e-aa85364efa9f
---
bin/JarisFLVPlayer.swf | Bin 23309 -> 23550 bytes
changes.txt | 8 +++++++-
documentation.txt | 3 +++
src/jaris/Main.hx | 9 ++++++++-
src/jaris/Version.hx | 8 ++++----
src/jaris/{Version.hx => player/Loop.hx} | 31 +++++++++++++++++++++++--------
src/jaris/player/Player.hx | 2 +-
7 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/bin/JarisFLVPlayer.swf b/bin/JarisFLVPlayer.swf
index 67caf3e..b7b467c 100644
Binary files a/bin/JarisFLVPlayer.swf and b/bin/JarisFLVPlayer.swf differ
diff --git a/changes.txt b/changes.txt
index 1e48135..cfc84b8 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,10 @@
-Jaris FLV Player v2.0.12 beta - 06/11/2010
+Jaris FLV Player v2.0.13 beta - 6/03/2011
+
+ * Implemented loop class
+ * Added loop functionality by passing loop=true or loop=1 as parameter
+ * Fixed reported bug "slider will show wrong position" on pseudostreaming seek (Thanks to Adam)
+
+Jaris FLV Player v2.0.12 beta - 06/11/2010
* Java Script Api to listen for events and control the player.
* More player events added to use on JSApi.
diff --git a/documentation.txt b/documentation.txt
index 02e0822..1c49b69 100644
--- a/documentation.txt
+++ b/documentation.txt
@@ -107,6 +107,9 @@ Here is the list of variables that you can pass to the player.
* jsapi:
Expose events to javascript functions and enable controlling the player from the outside. Set to any value to enable.
+
+ * loop:
+ As the variable says this keeps looping the video. Set to any value to enable.
==================
Keyboard Shortcuts
diff --git a/src/jaris/Main.hx b/src/jaris/Main.hx
index ecbeb4d..af2f269 100644
--- a/src/jaris/Main.hx
+++ b/src/jaris/Main.hx
@@ -39,6 +39,7 @@ import jaris.player.Player;
import jaris.player.StreamType;
import jaris.player.AspectRatio;
import jaris.player.UserSettings;
+import jaris.player.Loop;
/**
* Main jaris player starting point
@@ -157,7 +158,7 @@ class Main
}
//Draw Controls
- if (parameters.controls!="false")
+ if (parameters.controls != "false")
{
var duration:String = parameters.duration != "" && parameters.duration != null? parameters.duration : "0";
var controls:Controls = new Controls(player);
@@ -172,6 +173,12 @@ class Main
controls.setControlColors(controlColors);
movieClip.addChild(controls);
}
+
+ //Loop the video
+ if (parameters.loop != null)
+ {
+ var loop:Loop = new Loop(player);
+ }
//Expose events to javascript functions and enable controlling the player from the outside
if (parameters.jsapi != null)
diff --git a/src/jaris/Version.hx b/src/jaris/Version.hx
index c914a5c..81799ef 100644
--- a/src/jaris/Version.hx
+++ b/src/jaris/Version.hx
@@ -27,9 +27,9 @@ package jaris;
*/
class Version
{
- public static var NUMBER:String = "2.0.12";
+ public static var NUMBER:String = "2.0.13";
public static var STATUS:String = "beta";
- public static var DATE:String = "06";
- public static var MONTH:String = "11";
- public static var YEAR:String = "2010";
+ public static var DATE:String = "27";
+ public static var MONTH:String = "01";
+ public static var YEAR:String = "2011";
}
\ No newline at end of file
diff --git a/src/jaris/Version.hx b/src/jaris/player/Loop.hx
old mode 100644
new mode 100755
similarity index 63%
copy from src/jaris/Version.hx
copy to src/jaris/player/Loop.hx
index c914a5c..acd6dbd
--- a/src/jaris/Version.hx
+++ b/src/jaris/player/Loop.hx
@@ -20,16 +20,31 @@
* see <http://www.gnu.org/licenses/>.
*/
-package jaris;
+package jaris.player;
+
+//{Libraries
+import jaris.events.PlayerEvents;
+//}
/**
- * Actual jaris flv player version and date
+ * Implements a loop mechanism on the player
*/
-class Version
+class Loop
{
- public static var NUMBER:String = "2.0.12";
- public static var STATUS:String = "beta";
- public static var DATE:String = "06";
- public static var MONTH:String = "11";
- public static var YEAR:String = "2010";
+ private var _player:Player;
+
+ public function new(player:Player)
+ {
+ _player = player;
+ _player.addEventListener(PlayerEvents.PLAYBACK_FINISHED, onPlayerStop);
+ }
+
+ /**
+ * Everytime the player stops, the playback is restarted
+ * @param event
+ */
+ private function onPlayerStop(event:PlayerEvents):Void
+ {
+ _player.togglePlay();
+ }
}
\ No newline at end of file
diff --git a/src/jaris/player/Player.hx b/src/jaris/player/Player.hx
index 8bc13c6..6ba1a52 100644
--- a/src/jaris/player/Player.hx
+++ b/src/jaris/player/Player.hx
@@ -969,7 +969,7 @@ class Player extends EventDispatcher
if (canSeek(seekTime))
{
- _stream.seek(seekTime);
+ _stream.seek(seekTime - _startTime);
}
else if(seekTime != _startTime)
{
--
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