-
-
Save netconstructor/8860790 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$f("", {}, | |
{ | |
clip: { | |
onMetaData: function(c) { | |
var fd = c.duration; | |
//create a cue point for 25, 50 and 75% of player progress | |
var cues = [ | |
{ | |
time: fd * .25 * c.cuepointMultiplier, | |
name: "25%" | |
}, | |
{ | |
time: fd * .5 * c.cuepointMultiplier, | |
name: "50%" | |
}, | |
{ | |
time: fd * .75 * c.cuepointMultiplier, | |
name: "75%" | |
} | |
]; | |
c.onCuepoint( | |
// each integer represents milliseconds in the timeline cues, | |
// this function is triggered when a cuepoint is reached | |
function(clip, cuepoint) { | |
console.log("progress : " + cuepoint.name); | |
} | |
); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment