Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Created July 21, 2011 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runemadsen/1098075 to your computer and use it in GitHub Desktop.
Save runemadsen/1098075 to your computer and use it in GitHub Desktop.
var davids_data = {
timeline : {
name : "My Timeline",
annotations : [
{ start: 1, end : 34, type : "highlight", text : "Lorem Ipsum" },
// a2,
// a3,
// a4
]
}
};
player.addData(davids_data);
player.addEventListener("annotation", function(e) {
console.log(e.data); // Annotation object
});
// or
player.addEventListener("annotation.highlight", function(e) {
console.log(e.data); // Annotation object
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment