I am using jQuery to bind event listeners to Flowplayer 5.2 videos, as follows:
$(document).ready(function() {
$(".flowplayer").each (function() {
console.log("Got a flowplayer: " + $(this));
$(this).bind("ready", function(event, api) {
console.log("Flowplayer ready");
}).bind("pause", function(event, api) {
console.log("Flowplayer pause");
var time = {?}.getTime();
console.log("Time: " + time);
});
});
});
I'd like to get the current time/duration of the video when events such as pause occur. What should the ${?}
in the code above be replaced with?
I've tried replacing the {$}
in the code above with $(this)
, $(this).getClip()
, $f(0)
, and $f()
and none of those worked. I'm wondering if I can get it off of the event
or api
parameters in the callback function, but I figured I'd ask instead of randomly trying to access parameters that don't exist.
I've been digging through all of the Flowplayer documentation I can find, but I haven't seen how to do this from a bound event handler (unless you're using a custom configuration and binding the events at config time as shown here).
Thanks!