var video = { load: function (objs) { var objplay = jwplayer(objs.vcontainer).setup({ flashplayer: 'js/video/flashplay.swf', html5player: 'js/video/html5player.js', file: objs.vfiles, image: objs.vfimg, width: '100%', height:'100%', aspectratio:'16:9', stretching:'fill', controls: 'true', autostart: objs.isautoplay }); return objplay; }, create: function(boxstyle){ var defaultstyle = { width:660, height:400 }; for(var a in boxstyle){ defaultstyle[a] = boxstyle[a]; } var str = '
'; $("body").append(str); $('.theme-popover .close,.theme-popover-mask').click(function () { $('.theme-popover-mask').fadeout(100); $('.theme-popover').slideup(200); $('#videocontainer').html(""); }); }, show: function(){ $('.theme-popover-mask').fadein(100); $('.theme-popover').slidedown(200); }, resizestyle: function(w,h){ $(".theme-popover").css({width:w,height:h,margin:(-h/2)+"px 0 0 "+(-w/2)+"px"}); } } /* video.create({width:900,height:500}); $(function(){ video.create({width:900,height:500}); $('.video a').click(function () { video.load({ vcontainer: 'videocontainer', //视频容器 vfiles: $(this).attr("postvideo"), //视频地址 vfimg: $(this).attr("postimgul"), //视频缩略图(封面) isautoplay: 'true' }); video.show(); return false; }); })*/