Permalink
Browse files

youtu.be min file update & some small css fix

  • Loading branch information...
1 parent 0439c17 commit 55ef790e25572a1beab6d3213ec3c53e7a870e79 @emposha committed Oct 4, 2011
Showing with 20 additions and 6 deletions.
  1. +4 −3 css/jqvideobox.css
  2. +15 −2 js/jqvideobox.js
  3. +1 −1 js/jqvideobox.min.js
View
@@ -1,12 +1,13 @@
#lbOverlay {
- position: absolute;
- left: 0;
+ position: fixed;
+ left: 0px;
+ top: 0px;
width: 100%;
background-color: #000;
cursor: pointer;
}
#lbCenter, #lbBottomContainer {
- position: absolute;
+ position: fixed;
left: 50%;
overflow: hidden;
background-color: #fff;
View
@@ -75,6 +75,11 @@ jQuery( function ($) {
path = 'http://i2.ytimg.com/vi/'+videoId[1]+'/default.jpg';
break;
+ case 'youtu.be':
+ var videoId = href.split('=');
+ path = 'http://i2.ytimg.com/vi/'+videoId[3]+'/default.jpg';
+ break;
+
case 'metacafe':
var videoId = href.split('/');
path = 'http://gen.metacafe.com/thumb/'+videoId[4]+'/0/0/0/0/'+videoId[5]+'.jpg';
@@ -126,6 +131,9 @@ jQuery( function ($) {
if (href.match(/youtube\.com\/watch/i)) {
type = 'youtube';
}
+ else if (href.match(/youtu\.be/i)) {
+ type = 'youtu.be';
+ }
else if (href.match(/metacafe\.com\/watch/i)) {
type = 'metacafe';
}
@@ -210,7 +218,7 @@ jQuery( function ($) {
}
});
var object = setup(href);
- top = $(window).scrollTop() + (($(window).height() / 2) - (options.height / 2));
+ top = (($(window).height() / 2) - (options.height / 2));
left= (($(window).width() / 2) - (options.width / 2));
center.css({'top': top + 'px','left': left + 'px','display': 'none','background': '#fff url(css/loading.gif) no-repeat center','height': options.contentsHeight,'width': options.contentsWidth});
overlay.css('display','block').fadeTo("fast",options.defaultOverLayFade);
@@ -252,7 +260,6 @@ jQuery( function ($) {
aDim = rel.match(/[0-9]+/g);
}
overlay.css({
- 'top': $(window).scrollTop()+'px',
'height': $(window).height()+'px'
});
options.contentsWidth = (aDim && (aDim[0] > 0)) ? aDim[0] : options.width;
@@ -267,6 +274,12 @@ jQuery( function ($) {
var videoId = href.split('=');
other = '<iframe frameborder="0" width="' + options.contentsWidth + '" height="' + options.contentsHeight + '" src="http://www.youtube.com/embed/' + videoId[1] + '"></iframe>';
break;
+
+ case 'youtu.be':
+ flash = false;
+ var videoId = href.split('/');
+ other = '<iframe frameborder="0" width="' + options.contentsWidth + '" height="' + options.contentsHeight + '" src="http://www.youtube.com/embed/' + videoId[3] + '"></iframe>';
+ break;
case 'metacafe':
flash = true;
Oops, something went wrong.

0 comments on commit 55ef790

Please sign in to comment.