Skip to content

Commit

Permalink
Release v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Nov 14, 2014
1 parent 1eaa991 commit 3f74d08
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vide",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "http://vodkabears.github.io/vide/",
"authors": [
"Ilya Makarov <[email protected]>"
Expand Down
20 changes: 14 additions & 6 deletions dist/jquery.vide.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Vide - v0.2.1
* Vide - v0.3.0
* Easy as hell jQuery plugin for video backgrounds.
* http://vodkabears.github.io/vide/
*
Expand All @@ -21,7 +21,8 @@
loop: true,
autoplay: true,
position: "50% 50%",
posterType: "detect"
posterType: "detect",
resizing: true
},

// is iOs?
Expand Down Expand Up @@ -303,12 +304,15 @@
vide.$video.bind("loadedmetadata." + pluginName, function() {
vide.$video.css("visibility", "visible");
vide.resize();
vide.$wrapper.css("background-image", "none");
});

// resize event is available only for 'window',
// use another code solutions to detect DOM elements resizing
vide.$element.bind("resize." + pluginName, function() {
vide.resize();
if (vide.settings.resizing) {
vide.resize();
}
});
}
};
Expand Down Expand Up @@ -342,13 +346,17 @@

if (wrapperWidth / videoWidth > wrapperHeight / videoHeight) {
this.$video.css({
"width": wrapperWidth + 2, // +2 pixels to prevent empty space after transformation
"width": wrapperWidth + 2,

// +2 pixels to prevent empty space after transformation
"height": "auto"
});
} else {
this.$video.css({
"width": "auto",
"height": wrapperHeight + 2 // +2 pixels to prevent empty space after transformation

// +2 pixels to prevent empty space after transformation
"height": wrapperHeight + 2
});
}
};
Expand Down Expand Up @@ -413,7 +421,7 @@
for (var len = $[pluginName].lookup.length, i = 0, instance; i < len; i++) {
instance = $[pluginName].lookup[i];

if (instance) {
if (instance && instance.settings.resizing) {
instance.resize();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.vide.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vide.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"responsive",
"declarative"
],
"version": "0.2.1",
"version": "0.3.0",
"author": {
"name": "Ilya Makarov",
"email": "[email protected]",
Expand Down

0 comments on commit 3f74d08

Please sign in to comment.