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

Your preferred username that is used when logging in.

cuepoint appears to be triggering twice Created Apr 1, 2009

This thread is solved

Views: 3405     Replies: 13     Last reply Jun 10, 2011  
You must login first before you can use this feature

parawing742

Posts: 53

Registered:
Nov 11, 2008

cuepoint appears to be triggering twice

Posted: Apr 1, 2009

On a client installation of flowplayer, there is a cuepoint set at 1000 to pause the video. When the play button is then first clicked, the video plays for a couple more frames and pauses AGAIN. After that, it will play normally.

Any ideas what might be causing this behavior? The function in the code is below:


        onCuepoint: [[1000], function() {
                $f().pause();
        }]

parawing742

Posts: 53

Registered:
Nov 11, 2008

» cuepoint appears to be triggering twice

Posted: Apr 3, 2009

Reply to: cuepoint appears to be triggering twice, from parawing742
It turns out that when removing everything else on the page so that it is just bare HTML, the cuepoint works correctly without having to click multiple times.

When additional content is loaded on the page, that is what causes the problem. There is no other javascript items or dynamic code running on the page...just lots of tables and graphics.

Any possible solutions or something else I should try?

parawing742

Posts: 53

Registered:
Nov 11, 2008

» cuepoint appears to be triggering twice

Posted: Apr 9, 2009

Reply to: cuepoint appears to be triggering twice, from parawing742
Has nobody ever run into this same problem before?

thelightning

Posts: 5

Registered:
Jan 20, 2009

» » cuepoint appears to be triggering twice

Posted: Apr 9, 2009

Reply to: » cuepoint appears to be triggering twice, from parawing742
Same here.

I'm trying to toggle content plugin in for example 4000, 8000 cuepoints. Cuepoints are fired even on 2000, or sometimes else. Not consistent.

flowmark

Posts: 7

Registered:
Nov 3, 2009

» » » cuepoint appears to be triggering twice

Posted: Nov 11, 2009

Reply to: » » cuepoint appears to be triggering twice, from thelightning
Any progress on this? It is happening for me too. Are there any known workarounds?

flowmark

Posts: 7

Registered:
Nov 3, 2009

» » » » cuepoint appears to be triggering twice

Posted: Nov 13, 2009

Reply to: » » » cuepoint appears to be triggering twice, from flowmark
OK, this sad bit of work-around code seems to do the trick....


var cueCount = 0;
							        onCuepoint: [[2500], function() { 
							            cueCount = cueCount + 1;
							            if (cueCount== 1) {
	  										$f().pause(); 							            
	  									}
  										
						               
						            }], 

 

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » » » » cuepoint appears to be triggering twice

Posted: Nov 13, 2009

Reply to: » » » » cuepoint appears to be triggering twice, from flowmark
Well, for me it works:

Flowplayer forum example

HTML setup for the player

<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.6.js"></script>

<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
	<img src="path/to/splash_image" />
</a>


JavaScript coding

Following script will install Flowplayer into our player container


<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{
clip: {
  onCuepoint: [[2500], function () {
    this.pause();
  }]
}
});
</script>


Crystal ball mode: do you have set onCuepoint as a player property? This might cause the problem. It is a clip property.

bitman

Posts: 43

Registered:
Sep 26, 2008

» » » » » » cuepoint appears to be triggering twice

Posted: Nov 21, 2009

Reply to: » » » » » cuepoint appears to be triggering twice, from blacktrash
We're having the exact same problem.

After debugging all morning, I noticed this "re-triggering" is persistent but doesn't happen on every cuepoint... so the only way to really experience the problem is to setup an example with at least 4 cuepoints.

I posted a forum topic about this issue along with a couple demonstrations of the problem.

I'm anxious to resolve this bug, for sure.

flowmark

Posts: 7

Registered:
Nov 3, 2009

» » » » » » » cuepoint appears to be triggering twice

Posted: Nov 30, 2009

Reply to: » » » » » » cuepoint appears to be triggering twice, from bitman
What I notice is that sometimes the cuepoints trigger at slightly different times than they were set - perhaps due to variations of buffering time. When the files are smaller, and there is less buffering, this happens less often.

I think that this is the underlying issue. It get triggered once at the wrong time; and once at the right time.

cortot

Posts: 1

Registered:
Dec 4, 2009

rounded time values

Posted: Dec 4, 2009

Reply to: » » » » » » » cuepoint appears to be triggering twice, from flowmark
I'm not quite sure whether this helps: The time values of cuepoints are rounded - to 100 Miliseconds. Maybe there is an underlying javascriptprob with int/float conversion.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » » » » » cuepoint appears to be triggering twice

Posted: Dec 4, 2009

Reply to: » » » » » cuepoint appears to be triggering twice, from blacktrash
I can reproduce it now, also with the example above. It does indeed not happen every time.

I also tried to completely unset the cuepoints onBeforeResume and to reset them onResume to no avail.

I do not think it is a rounding problem as this happens with full second cuepoints too. I can only speculate that the interaction between metadata retrieval and player actions is not precise enough. But it certainly is not the advertised behaviour, i.e. it is a bug ;-)

bitman

Posts: 43

Registered:
Sep 26, 2008

» » » » » » » cuepoint appears to be triggering twice

Posted: Dec 10, 2009

Reply to: » » » » » » cuepoint appears to be triggering twice, from blacktrash
An undesirable workaround is to add a full second to the scrubber during the pause so you can "hurdle" any time issues between the metadata and player:

onPause:


current_time = $f().getTime();
new_time = Math.ceil(current_time) + 1;
$f().seek(new_time);

I found that adding less than a second (0.5) doesn't work.

Unfortunately, the flow of the movie or mp3 becomes choppy ("Bonasera, what have I done to... [pause][resume]... so disrespectfully?")

KZeni

Posts: 8

Registered:
Jun 27, 2009

» cuepoint appears to be triggering twice

Posted: May 21, 2010

Reply to: cuepoint appears to be triggering twice, from parawing742
I found a way that worked where the desired effect of the cuepoint is to pause the video that doesn't involve skipping any of the content.

I setup an onPause function on the clip that sets a global variable to the current timestamp of the video. The onCuepoint function then checks to see if that global variable is either undefined (hasn't been set yet) or if the cuepoint doesn't match the paused timestamp.

onPause: function(){
	pauseTimeStamp = this.getTime();
}

onCuepoint: [
	[**whatever your cuepoints are**],
	function(clip, cuepoint) {
		if(typeof pauseTimeStamp == 'undefined' || cuepoint != (pauseTimeStamp * 1000)){
			this.pause();
		}
	}
]

I multiplied the pauseTimeStamp by 1,000 because the getTime() function outputs seconds, and the cuepoint is set as milliseconds.

This method should work on any other player & clip actions that relate to the action you're trying to execute in the onCuepoint action. We're trying to pause the clip and onPause is available, so this might be the only case where this method works.

wacom

Posts: 12

Registered:
Sep 16, 2010

» » cuepoint appears to be triggering twice

Posted: Jun 10, 2011

Reply to: » cuepoint appears to be triggering twice, from KZeni
This is incredibly helpful. Thanks!