You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

onStart event not working with audio!! Created Mar 13, 2009

This thread is solved

Views: 3919     Replies: 11     Last reply Aug 7, 2011  
You must login first before you can use this feature

killebrewj

Posts: 83

Registered:
May 26, 2008

onStart event not working with audio!!

Posted: Mar 13, 2009

I'm using FP 3.0.7 and audio plugin 3.0.4. It seems that the onStart event is never triggered when playing an MP3. Ive tried serveral other events and they all seem to work so its just this one that is not working. Because of this, I cannot track audio playback starts with google analytics.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» onStart event not working with audio!!

Posted: Mar 13, 2009

Reply to: onStart event not working with audio!!, from killebrewj
I've found the audio support so far only working with simple setups, playlists etc. For more complicated stuff (callbacks, onCuepoint etc.) I use mp3 wrapped in a flv container. This works perfectly fine - but is, admittedly, a workaround.

If you're not scared of ffmpeg, just do this:


ffmpeg -i song.mp3 -f flv -acodec copy song.flv

flexer

Posts: 21

Registered:
Dec 6, 2008

» onStart event not working with audio!!

Posted: Apr 9, 2009

Reply to: onStart event not working with audio!!, from killebrewj
Yes, that is a bug... You can track onBegin

killebrewj

Posts: 83

Registered:
May 26, 2008

» » onStart event not working with audio!!

Posted: Apr 9, 2009

Reply to: » onStart event not working with audio!!, from flexer
Thanks, I'll try that. Im hoping for a real fix but unfortunately it appears that the next version is a paid upgrade so I'll probably switch to another product shortly. Since the existing 3.0.x I paid for wont be supported or updated, I guess I paid $50 to use flowplayer for a few months during which I discovered and reported many bugs, only a few of which were fixed. You're welcome for that btw. ;)

Anssi
Flowplayer Flash & video streaming developer

Posts: 1194

Registered:
Jul 24, 2007

» » » onStart event not working with audio!!

Posted: Apr 9, 2009

Reply to: » » onStart event not working with audio!!, from killebrewj
This is now fixed and this fix will be out next week.

jaddle

Posts: 8

Registered:
Feb 6, 2008

not fixed yet?

Posted: Apr 18, 2009

Reply to: » » » onStart event not working with audio!!, from Anssi
I assume this fix was supposed to be included in 3.1.0? It's still not working for me though, even with the latest version... onBegin is a usable workaround for now though - especially since the buffer doesn't seem to be working properly anyway (see the note inhttp://flowplayer.org/forum/5/18198).

becca

Posts: 6

Registered:
May 28, 2009

fixed in my implementation

Posted: Jun 26, 2009

Reply to: not fixed yet?, from jaddle
I fixed this in my implementation by adding an event listener in the audio plugin for the Sound.complete event and using that to trigger the START event rather than triggering it using the ID3 event.

bfcam

Posts: 1

Registered:
Jul 8, 2009

confirmed

Posted: Jul 8, 2009

Reply to: fixed in my implementation, from becca
I can confirm this bug. Files without ID3 tags will not fire start events. Files with ID3 tags will.

Why does onId3 dispatch the start event? Doesn't make a lot of sense to me?

makiro

Posts: 2

Registered:
Feb 5, 2010

metaData on Audio files

Posted: Feb 5, 2010

Reply to: confirmed, from bfcam
I'm completely stuck. I can't load the metaData object. It keeps being returned as <undefined>.

I checked that my mp3 file has v.2.2 ID3 tags in it. Everything else seems to work when I use "alert("hey").

I also tried this using the mp3 file in the demo to make sure it's not the ID3 tags that are creating an error, but got the same result.

Does anyone have an idea what I'm doing wrong? Or is this indeed a bug?

Is the issue that I'm trying to get a javascript plugin to talk to a Flash plugin?

Any help would be appreciated.


$(function() {

	// setup player 
	$f("player", "flowplayer/flowplayer-3.1.5.swf", {
		clip: {
			onBegin: function(song) {
				alert(song.metaData.TIT2);
			}
		}
	// playlist plugin 
	}).playlist("#playlist", {loop:true});
	
});

and the playlist:


<div id="playlist">

<a href="av/elgarLaCapricieuse.mp3">
<img src="/img/composers/elgar.jpg" />
<strong>Elgar: La Capricieuse</strong><br>
Montevideo 2008<br>
<em>4:14 min</em>
</a> 


http://orikam.com/index.php?page=audio

yonghow

Posts: 2

Registered:
Apr 8, 2010

MP3 onStart event not working on version 3.1.5

Posted: Apr 8, 2010

Reply to: » » » onStart event not working with audio!!, from Anssi
Hi I tried onStart event for MP3 on version 3.1.5, but not working. It only works with FLV file.

orikam

Posts: 1

Registered:
Mar 20, 2009

solution

Posted: Apr 8, 2010

Reply to: MP3 onStart event not working on version 3.1.5, from yonghow
I hope this helps...
The mistake was using onBegin instead of onStart.


$(function() {

	var info = document.getElementById("info");
	
	// setup player 
	$f("player", "flowplayer/flowplayer-3.1.5.swf", {
		clip: {
			onStart: function(song) {
				var meta = song.metaData;
				this.getPlugin("myContent").setHtml(
					"<img src="" + meta.TENC + "" hspace="0" vspace="0" align="right">" +
					"<p class="artist">" + meta.TPE1 + "<br></p>" +
					"<p class="composer">" + meta.TCOM + "</p>" +
					"<p class="title">" + meta.TIT2 + "<br></p>" +
					"<p class="piece">" + ((meta.TALB) ? meta.TALB : " ") + "<br></p>" +
					"<p class="comments">" + meta.COMM + "</p>"
				);
			}
		},
		plugins: {
			myContent: {
				url: 'flowplayer.content-3.1.0.swf',
				backgroundColor: '#000000',
				top: 0, left: 0, width: 425, height: 272,
				borderRadius: 0,
				stylesheet: '/css/flowplayer_content.css'
			}
		}
	}).playlist("#playlist", {loop:true});
	
});