$.each(this.locks, function (k, v) {
if (v.unlocked === 1) {
- return;
+ return true;
}
res = k;
- return true;
+ return false;
});
- return res;
+ return parseInt(res);
},
setMaxPage: function (p, allowbackwards) {
var $this = this;
$.each(this.locks, function (k, v) {
if ($this.maxPage > k) {
- $this.locks.unlocked = 1;
+ $this.locks[k].unlocked = 1;
}
}
);
this.linksActions[linkId].push(action);
}
- console.log(this.linksActions);
-
this.testConditions();
},
testConditions: function () {
- var $this=this;
+ var $this = this;
var change = false;
$.each(this.locks, function (k, v) {
if (v.unlocked === 1) {
}
});
- if (change) {
+ if (change || this.getNextLockPage() !== this.getMaxPage()) {
this.setMaxPage(this.getNextLockPage(), false)
}
},
var $this = this;
$(e).find('.videoContainer').each(function () {
var id = $(this).data('id');
- var player = videojs(id);
- $this.disposeVideo(player);
+ try {
+ var player = videojs(id);
+ $this.disposeVideo(player);
+ }catch (e) {
+
+ }
});
},
};
\ No newline at end of file