diff --git a/package.json b/package.json index e350316..604b10b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "strip", "title": "Strip", - "version": "1.1.0", + "version": "1.1.0.1", "description": "A Less Intrusive Responsive Lightbox", "author": { "name": "Nick Stakenburg", diff --git a/src/js/page.js b/src/js/page.js index 2c65c9b..8c53242 100644 --- a/src/js/page.js +++ b/src/js/page.js @@ -237,6 +237,12 @@ $.extend(Page.prototype, { insertVideo: function(callback) { + // don't insert a video twice + if (this._videoInserted) { + if (callback) callback(); + return; + } + switch (this.view.type) { case 'vimeo': var playerVars = $.extend({}, this.view.options.vimeo || {}), @@ -266,6 +272,8 @@ $.extend(Page.prototype, { if (callback) callback(); break; } + + this._videoInserted = true; },