Skip to content

Commit

Permalink
tic mozilla#127 remove secon argument to update
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottDowne committed Oct 19, 2010
1 parent 420cf6a commit a79c916
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions popcorn.js
Expand Up @@ -28,7 +28,7 @@
this.videoElement = videoElement;
videoElement.videoManager = this;
popcorn.addInstance(this);
videoElement.setAttribute("ontimeupdate", "popcorn.update(this, this.videoManager);");
videoElement.setAttribute("ontimeupdate", "popcorn.update(this);");
};

popcorn.VideoManager.prototype.addCommand = function(command) {
Expand Down Expand Up @@ -65,12 +65,12 @@
var inactiveTarget = {};

// Update is called on the video every time it's time changes.
popcorn.update = function(vid, manager) {
popcorn.update = function(vid) {
var t = vid.currentTime,
commandObject = {}; // Loops through all commands in the manager, preloading data, and calling onIn() or onOut().
for (var i in manager.commandObjects) {
if (manager.commandObjects.hasOwnProperty(i)) {
commandObject = manager.commandObjects[i];
for (var i in vid.videoManager.commandObjects) {
if (vid.videoManager.commandObjects.hasOwnProperty(i)) {
commandObject = vid.videoManager.commandObjects[i];
if (commandObject.running && (commandObject.params["in"] > t || commandObject.params["out"] < t)) {
commandObject.running = false;
if (inactiveTarget[commandObject.params.target] <= 0 || --inactiveTarget[commandObject.params.target] <= 0) {
Expand All @@ -81,9 +81,9 @@
}
}
}
for (var j in manager.commandObjects) {
if (manager.commandObjects.hasOwnProperty(j)) {
commandObject = manager.commandObjects[j];
for (var j in vid.videoManager.commandObjects) {
if (vid.videoManager.commandObjects.hasOwnProperty(j)) {
commandObject = vid.videoManager.commandObjects[j];
if (!commandObject.loaded && (commandObject.params["in"] - 5) < t && commandObject.params["out"] > t) {
commandObject.loaded = true;
commandObject.preload();
Expand Down

0 comments on commit a79c916

Please sign in to comment.