Permalink
Browse files

[#1250] Added new cue( id, time, fn )

  • Loading branch information...
1 parent 792a80c commit a61161d1a8e6ffd2fb98ed6594e36d6551ffd261 @ScottDowne ScottDowne committed Jul 30, 2012
Showing with 9 additions and 4 deletions.
  1. +1 −2 plugins/footnote/popcorn.footnote.html
  2. +2 −1 popcorn.js
  3. +6 −1 test/popcorn.unit.js
@@ -20,8 +20,7 @@
end: 45,
text: "Visit webmademovies.org for more details",
target: "footnotediv"
- })
-
+ });
}, false);
</script>
View
@@ -649,8 +649,9 @@
}
// p.cue( "b", 11 );
+ // p.cue( "b", 11, function() {} );
if ( typeof time === "number" ) {
- fn = Popcorn.nop();
+ fn = fn || Popcorn.nop();
}
// p.cue( "c", function() {});
View
@@ -4478,7 +4478,7 @@ asyncTest( "Cue API", 12, function() {
});
-asyncTest( "Modify cue or track event after creation", 6, function() {
+asyncTest( "Modify cue or track event after creation", 7, function() {
var p = Popcorn( "#video" ),
passed = 0;
@@ -4540,6 +4540,11 @@ asyncTest( "Modify cue or track event after creation", 6, function() {
// now I want to change that cue to 12:
p.cue( "cue-id", 12 );
+ // set a cue with id, time and function
+ p.cue( "cue-id2", 10, function() {
+ ok( true, "Cue with id, time and function is created and fired" );
+ });
+
// now change the function...
p.cue( "cue-id", function() {
ok( true, "Cue at 12 seconds fired, it was changed from 10 to 12" );

0 comments on commit a61161d

Please sign in to comment.