[Pkg-javascript-commits] [jarisplayer] 09/80: added id3 info to player events
Jonas Smedegaard
dr at jones.dk
Tue May 10 08:45:30 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 35aafcf8dd049192a9a4daf3b0607317fbe6e84b
Author: jgmylm <jgmylm at edf201c3-a14d-0410-a11e-aa85364efa9f>
Date: Wed Mar 10 05:33:50 2010 +0000
added id3 info to player events
git-svn-id: https://jaris.svn.sourceforge.net/svnroot/jaris/trunk@9 edf201c3-a14d-0410-a11e-aa85364efa9f
---
bin/JarisFLVPlayer.swf | Bin 18786 -> 18861 bytes
src/jaris/events/PlayerEvents.hx | 2 ++
src/jaris/player/Player.hx | 13 +++++++++++++
3 files changed, 15 insertions(+)
diff --git a/bin/JarisFLVPlayer.swf b/bin/JarisFLVPlayer.swf
index 0c107be..a939b7d 100644
Binary files a/bin/JarisFLVPlayer.swf and b/bin/JarisFLVPlayer.swf differ
diff --git a/src/jaris/events/PlayerEvents.hx b/src/jaris/events/PlayerEvents.hx
index c6ff26c..9211fd3 100644
--- a/src/jaris/events/PlayerEvents.hx
+++ b/src/jaris/events/PlayerEvents.hx
@@ -23,6 +23,7 @@
package jaris.events;
import flash.events.Event;
+import flash.media.ID3Info;
import flash.media.Sound;
import flash.net.NetStream;
@@ -60,6 +61,7 @@ class PlayerEvents extends Event
public var stream:NetStream;
public var sound:Sound;
public var time:Float;
+ public var id3Info:ID3Info;
public function new(type:String, bubbles:Bool=false, cancelable:Bool=false)
{
diff --git a/src/jaris/player/Player.hx b/src/jaris/player/Player.hx
index e346322..398e1b3 100644
--- a/src/jaris/player/Player.hx
+++ b/src/jaris/player/Player.hx
@@ -37,6 +37,7 @@ import flash.events.ProgressEvent;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.Lib;
+import flash.media.ID3Info;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
@@ -74,6 +75,7 @@ class Player extends EventDispatcher
private var _server:String; //For future use on rtmp
private var _sound:Sound;
private var _soundChannel:SoundChannel;
+ private var _id3Info:ID3Info;
private var _video:Video;
private var _videoWidth:Float;
private var _videoHeight:Float;
@@ -470,6 +472,7 @@ class Player extends EventDispatcher
_mediaDuration = ((_sound.bytesTotal / _sound.bytesLoaded) * _sound.length) / 1000;
_aspectRatio = AspectRatio.getAspectRatio(_videoWidth, _videoHeight);
_originalAspectRatio = _aspectRatio;
+ _id3Info = _sound.id3;
callEvents(PlayerEvents.CONNECTION_SUCCESS);
callEvents(PlayerEvents.MEDIA_INITIALIZED);
@@ -527,6 +530,7 @@ class Player extends EventDispatcher
playerEvent.stream = getNetStream();
playerEvent.sound = getSound();
playerEvent.time = getCurrentTime();
+ playerEvent.id3Info = getId3Info();
dispatchEvent(playerEvent);
}
@@ -1262,6 +1266,15 @@ class Player extends EventDispatcher
}
/**
+ * The id3 info of sound object
+ * @return
+ */
+ public function getId3Info():ID3Info
+ {
+ return _id3Info;
+ }
+
+ /**
* The current sound state
* @return true if mute otherwise false
*/
--
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