if ( ~~self.currentTime() === options.start ||
self.currentTime() === options.start ) {
- setup.start.call(self, event);
+ setup.start.call(self, event, options);
}
if ( self.currentTime() > options.start &&
self.currentTime() < options.end ) {
- setup.timeupdate.call(self, event);
+ setup.timeupdate.call(self, event, options);
}
if ( ~~self.currentTime() === options.end ||
self.currentTime() === options.end ) {
- setup.end.call(self, event);
+ setup.end.call(self, event, options);
}
});
- Popcorn.plugin( "complicator", {
+ Popcorn.plugin( "complicator", (function () {
-
-
- start: function () {
+ //create your fucking dom elements here.
+
+
+ return {
+
+ start: function () {
+
+ },
+
+ end: function () {
+
+ },
+
+ timeupdate: function () {
+
+ }
+ };
- var $qhead = document.getElementById("qunit-header");
-
- $qhead.innerHTML = "complicator STARTED!";
-
- },
-
-
-
- end: function () {
-
- var $qhead = document.getElementById("qunit-header");
-
- $qhead.innerHTML = "complicator ENDED!";
-
- },
-
-
-
- timeupdate: function () {
-
- var $qhead = document.getElementById("qunit-header");
-
- $qhead.innerHTML = $qhead.innerHTML + " " + this.currentTime();
-
- }
-
-
- });
+ })()
+ );