summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-05-31 16:32:29 +0200
committerRemi Collet <fedora@famillecollet.com>2016-05-31 16:32:29 +0200
commit68dacf2b5b198dac82f38b09617175b4087f9af1 (patch)
treec839916c0d853583e91a2fc33781fcbe0632e645
parentaa9951a13707c9b7935bebcdc49057e7baaffe69 (diff)
owncloud: 9.0.2
-rw-r--r--owncloud-8.1.6-work-arround-nss-issue.patch50
-rw-r--r--owncloud-8.2.3-dont_warn_php54_eol.patch16
-rw-r--r--owncloud-8.2.3-icewind-streams-encryption.patch40
-rw-r--r--owncloud-8.2.5-videoviewer_noplugins.patch12
-rw-r--r--owncloud-9.0.1-dont_update_htacess.patch (renamed from owncloud-8.2.2-dont_update_htacess.patch)44
-rw-r--r--owncloud-9.0.1-dropbox-autoloader.patch (renamed from owncloud-8.2.3-dropbox-autoloader.patch)8
-rw-r--r--owncloud-9.0.1-google-autoloader.patch (renamed from owncloud-8.2.3-google-autoloader.patch)18
-rw-r--r--owncloud-9.0.2-default_integrity_check_disabled.patch13
-rw-r--r--owncloud-9.0.2-no_need_for_broken_updater_repair.patch12
-rw-r--r--owncloud-conf-nginx.conf4
-rw-r--r--owncloud-default-nginx.conf78
-rwxr-xr-xowncloud-delete-nonfree.sh21
-rw-r--r--owncloud-el7-php-fpm.conf24
-rw-r--r--owncloud-nginx.conf79
-rw-r--r--owncloud-php-fpm.conf25
-rw-r--r--owncloud.spec262
16 files changed, 411 insertions, 295 deletions
diff --git a/owncloud-8.1.6-work-arround-nss-issue.patch b/owncloud-8.1.6-work-arround-nss-issue.patch
new file mode 100644
index 0000000..5a10748
--- /dev/null
+++ b/owncloud-8.1.6-work-arround-nss-issue.patch
@@ -0,0 +1,50 @@
+diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php
+index f849e3e..acfbc4e 100644
+--- a/settings/controller/checksetupcontroller.php
++++ b/settings/controller/checksetupcontroller.php
+@@ -83,8 +83,8 @@ class CheckSetupController extends Controller {
+
+ try {
+ $client = $this->clientService->newClient();
+- $client->get('https://www.owncloud.org/');
+- $client->get('http://www.owncloud.org/');
++ $client->get('https://owncloud.org/');
++ $client->get('http://owncloud.org/');
+ return true;
+ } catch (\Exception $e) {
+ return false;
+@@ -162,13 +162,13 @@ class CheckSetupController extends Controller {
+ if(strpos($versionString, 'NSS/') === 0) {
+ try {
+ $firstClient = $this->clientService->newClient();
+- $firstClient->get('https://www.owncloud.org/');
++ $firstClient->get('https://api.owncloud.com/');
+
+ $secondClient = $this->clientService->newClient();
+- $secondClient->get('https://owncloud.org/');
++ $secondClient->get('https://apps.owncloud.com/');
+ } catch (ClientException $e) {
+ if($e->getResponse()->getStatusCode() === 400) {
+- return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['NSS', $versionString, $features]);
++ return (string) $this->l10n->t('cURL is using %s version (%s). There may be an issue with features such as %s, this is expected to fixed in the RHEL7.3 milestone - bz#1241172', ['NSS', $versionString, $features]);
+ }
+ }
+ }
+diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
+index 359b5b4..28370f1 100644
+--- a/lib/private/ocsclient.php
++++ b/lib/private/ocsclient.php
+@@ -344,7 +344,12 @@ class OCSClient {
+ $tmp = $data->data->content;
+ $app = [];
+ if (isset($tmp->downloadlink)) {
+- $app['downloadlink'] = (string)$tmp->downloadlink;
++ if (preg_match("/apps\.owncloud\.com/", (string)$tmp->downloadlink)) {
++ $downloadURL = preg_replace("/apps\.owncloud\.com/", "api.owncloud.com", (string)$tmp->downloadlink);
++ } else {
++ $downloadURL = (string)$tmp->downloadlink;
++ }
++ $app['downloadlink'] = $downloadURL;
+ } else {
+ $app['downloadlink'] = '';
+ }
diff --git a/owncloud-8.2.3-dont_warn_php54_eol.patch b/owncloud-8.2.3-dont_warn_php54_eol.patch
new file mode 100644
index 0000000..c3454b2
--- /dev/null
+++ b/owncloud-8.2.3-dont_warn_php54_eol.patch
@@ -0,0 +1,16 @@
+diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php
+index bd0737a..064058a 100644
+--- a/settings/controller/checksetupcontroller.php
++++ b/settings/controller/checksetupcontroller.php
+@@ -205,10 +205,7 @@ class CheckSetupController extends Controller {
+ private function isPhpSupported() {
+ $eol = false;
+
+- //PHP 5.4 is EOL on 14 Sep 2015
+- if (version_compare(PHP_VERSION, '5.5.0') === -1) {
+- $eol = true;
+- }
++ // Red Hat provide support for the system PHP so never eol
+
+ return ['eol' => $eol, 'version' => PHP_VERSION];
+ }
diff --git a/owncloud-8.2.3-icewind-streams-encryption.patch b/owncloud-8.2.3-icewind-streams-encryption.patch
deleted file mode 100644
index 177aad2..0000000
--- a/owncloud-8.2.3-icewind-streams-encryption.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
-index e0d263d..4c32899 100644
---- a/lib/private/files/stream/encryption.php
-+++ b/lib/private/files/stream/encryption.php
-@@ -471,4 +471,13 @@ protected function parentStreamSeek($position) {
- return parent::stream_seek($position);
- }
-
-+ /**
-+ * @param string $path
-+ * @param array $options
-+ * @return bool
-+ */
-+ public function dir_opendir($path, $options) {
-+ return false;
-+ }
-+
- }
-diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
-index 4c32899..585a697 100644
---- a/lib/private/files/stream/encryption.php
-+++ b/lib/private/files/stream/encryption.php
-@@ -167,7 +167,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
- )
- ));
-
-- return self::wrapSource($source, $mode, $context, 'ocencryption', $wrapper);
-+ return self::wrapSource($source, $context, 'ocencryption', $wrapper, $mode);
- }
-
- /**
-@@ -181,7 +181,7 @@ public static function wrap($source, $internalPath, $fullPath, array $header,
- * @return resource
- * @throws \BadMethodCallException
- */
-- protected static function wrapSource($source, $mode, $context, $protocol, $class) {
-+ protected static function wrapSource($source, $context, $protocol, $class, $mode = 'r+') {
- try {
- stream_wrapper_register($protocol, $class);
- if (@rewinddir($source) === false) {
diff --git a/owncloud-8.2.5-videoviewer_noplugins.patch b/owncloud-8.2.5-videoviewer_noplugins.patch
deleted file mode 100644
index 76397bc..0000000
--- a/owncloud-8.2.5-videoviewer_noplugins.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up ./apps/files_videoviewer/js/mediaelement-and-player.min.js.old ./apps/files_videoviewer/js/mediaelement-and-player.min.js
---- ./apps/files_videoviewer/js/mediaelement-and-player.min.js.old 2016-05-12 21:27:46.908612955 +0200
-+++ ./apps/files_videoviewer/js/mediaelement-and-player.min.js 2016-05-12 21:27:54.536649605 +0200
-@@ -12,7 +12,7 @@
- * License: MIT
- *
- */
--var mejs=mejs||{};mejs.version="2.21.2",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id),mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),("flash"===a.method||"silverlight"===a.method)&&(i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k,scheme:a.scheme},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+s+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+s+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var t=$f(o.childNodes[0]),u=-1;t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}t.playVideo=function(){t.api("play")},t.stopVideo=function(){t.api("unload")},t.pauseVideo=function(){t.api("pause")},t.seekTo=function(a){t.api("seekTo",a)},t.setVolume=function(a){t.api("setVolume",a)},t.setMuted=function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)},t.getPlayerState=function(){return u},t.addEvent("play",function(){u=1,a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){u=2,a(t,n,"pause")}),t.addEvent("finish",function(){u=0,a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),t.addEvent("seek",function(b){u=3,a(t,n,"seeked",b)}),t.addEvent("loadProgress",function(b){u=3,a(t,n,"progress",b)}),n.pluginElement=o,n.pluginApi=t,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0,wmode:"transparent"},events:{onReady:function(){c.setVideoSize=function(a,b){c.setSize(a,b)},a.pluginMediaElement.pluginApi=c,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c){"use strict";var d={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};d.getLanguage=function(){var a=d.locale.language||window.navigator.userLanguage||window.navigator.language;return d.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(d.locale.language=mejsL10n.language),d.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},d.methods.t=function(a,b){return d.locale.strings&&d.locale.strings[b.context]&&d.locale.strings[b.context][a]&&(a=d.locale.strings[b.context][a]),d.methods.checkPlain(a)},d.t=function(a,b){if("string"==typeof a&&a.length>0){var c=d.getLanguage();return b=b||{context:c},d.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=d}(document,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
-+var mejs=mejs||{};mejs.version="2.21.2",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id),mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),("flash"===a.method||"silverlight"===a.method)&&(i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k,scheme:a.scheme},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+s+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+s+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var t=$f(o.childNodes[0]),u=-1;t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}t.playVideo=function(){t.api("play")},t.stopVideo=function(){t.api("unload")},t.pauseVideo=function(){t.api("pause")},t.seekTo=function(a){t.api("seekTo",a)},t.setVolume=function(a){t.api("setVolume",a)},t.setMuted=function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)},t.getPlayerState=function(){return u},t.addEvent("play",function(){u=1,a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){u=2,a(t,n,"pause")}),t.addEvent("finish",function(){u=0,a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),t.addEvent("seek",function(b){u=3,a(t,n,"seeked",b)}),t.addEvent("loadProgress",function(b){u=3,a(t,n,"progress",b)}),n.pluginElement=o,n.pluginApi=t,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0,wmode:"transparent"},events:{onReady:function(){c.setVideoSize=function(a,b){c.setSize(a,b)},a.pluginMediaElement.pluginApi=c,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c){"use strict";var d={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};d.getLanguage=function(){var a=d.locale.language||window.navigator.userLanguage||window.navigator.language;return d.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(d.locale.language=mejsL10n.language),d.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},d.methods.t=function(a,b){return d.locale.strings&&d.locale.strings[b.context]&&d.locale.strings[b.context][a]&&(a=d.locale.strings[b.context][a]),d.methods.checkPlain(a)},d.t=function(a,b){if("string"==typeof a&&a.length>0){var c=d.getLanguage();return b=b||{context:c},d.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=d}(document,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
- *
- * MediaElementPlayer
- * http://mediaelementjs.com/
diff --git a/owncloud-8.2.2-dont_update_htacess.patch b/owncloud-9.0.1-dont_update_htacess.patch
index 4db8819..d6c4efe 100644
--- a/owncloud-8.2.2-dont_update_htacess.patch
+++ b/owncloud-9.0.1-dont_update_htacess.patch
@@ -1,25 +1,36 @@
diff --git a/lib/private/setup.php b/lib/private/setup.php
-index 8f1ae38..adc9f6a 100644
+index 6303d0d..7c30955 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
-@@ -369,12 +369,6 @@ class Setup {
+@@ -373,10 +373,6 @@ class Setup {
// out that this is indeed an ownCloud data directory
file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
-- // Update htaccess files for apache hosts
-- if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
-- self::updateHtaccess();
-- self::protectDataDirectory();
-- }
+- // Update .htaccess files
+- Setup::updateHtaccess();
+- Setup::protectDataDirectory();
-
//try to write logtimezone
if (date_default_timezone_get()) {
$config->setSystemValue('logtimezone', date_default_timezone_get());
diff --git a/lib/private/updater.php b/lib/private/updater.php
-index 9e5207c..6a169a6 100644
+index 0d567b8..6b0b1ad 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
-@@ -285,14 +285,6 @@ class Updater extends BasicEmitter {
+@@ -55,10 +55,10 @@ class Updater extends BasicEmitter {
+
+ /** @var ILogger $log */
+ private $log;
+-
++
+ /** @var \OC\HTTPHelper $helper */
+ private $httpHelper;
+-
++
+ /** @var IConfig */
+ private $config;
+
+@@ -294,14 +294,6 @@ class Updater extends BasicEmitter {
throw new \Exception('Updates between multiple major versions and downgrades are unsupported.');
}
@@ -34,18 +45,3 @@ index 9e5207c..6a169a6 100644
// create empty file in data dir, so we can later find
// out that this is indeed an ownCloud data directory
// (in case it didn't exist before)
-diff -up lib/private/setup.php.0 lib/private/setup.php
---- a/lib/private/setup.php.0 2016-03-23 08:12:31.399538916 +0100
-+++ b/lib/private/setup.php 2016-03-23 08:13:55.783981179 +0100
-@@ -415,6 +415,10 @@ class Setup {
- * @throws \OC\HintException If .htaccess does not include the current version
- */
- public static function updateHtaccess() {
-+
-+ // Should never be called, but for safety
-+ return;
-+
- $setupHelper = new \OC\Setup(\OC::$server->getConfig(), \OC::$server->getIniWrapper(),
- \OC::$server->getL10N('lib'), new \OC_Defaults(), \OC::$server->getLogger(),
- \OC::$server->getSecureRandom());
-
diff --git a/owncloud-8.2.3-dropbox-autoloader.patch b/owncloud-9.0.1-dropbox-autoloader.patch
index 8cfd754..8b94444 100644
--- a/owncloud-8.2.3-dropbox-autoloader.patch
+++ b/owncloud-9.0.1-dropbox-autoloader.patch
@@ -1,5 +1,5 @@
diff --git a/apps/files_external/ajax/oauth1.php b/apps/files_external/ajax/oauth1.php
-index 3d6736b..028d21a 100644
+index ea7db25..4279cec 100644
--- a/apps/files_external/ajax/oauth1.php
+++ b/apps/files_external/ajax/oauth1.php
@@ -23,7 +23,6 @@
@@ -11,12 +11,12 @@ index 3d6736b..028d21a 100644
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
-index 6a822c3..b8e7f27 100644
+index 8381ccb..174baec 100644
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
-@@ -31,8 +31,6 @@ namespace OC\Files\Storage;
-
+@@ -33,8 +33,6 @@ use GuzzleHttp\Exception\RequestException;
use Icewind\Streams\IteratorDirectory;
+ use Icewind\Streams\RetryWrapper;
-require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
-
diff --git a/owncloud-8.2.3-google-autoloader.patch b/owncloud-9.0.1-google-autoloader.patch
index bf94192..09f50e8 100644
--- a/owncloud-8.2.3-google-autoloader.patch
+++ b/owncloud-9.0.1-google-autoloader.patch
@@ -1,8 +1,8 @@
diff --git a/apps/files_external/ajax/oauth2.php b/apps/files_external/ajax/oauth2.php
-index fbe60e1..bc7d285 100644
+index b110cba..1367c7b 100644
--- a/apps/files_external/ajax/oauth2.php
+++ b/apps/files_external/ajax/oauth2.php
-@@ -25,9 +25,6 @@
+@@ -26,9 +26,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
@@ -13,12 +13,12 @@ index fbe60e1..bc7d285 100644
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
-index eba2ee7..9ed0de1 100644
+index 62d264d..45b87c6 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
-@@ -35,10 +35,6 @@ namespace OC\Files\Storage;
-
+@@ -37,10 +37,6 @@ use GuzzleHttp\Exception\RequestException;
use Icewind\Streams\IteratorDirectory;
+ use Icewind\Streams\RetryWrapper;
-set_include_path(get_include_path().PATH_SEPARATOR.
- \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
@@ -27,3 +27,11 @@ index eba2ee7..9ed0de1 100644
class Google extends \OC\Files\Storage\Common {
+@@ -445,7 +441,6 @@ class Google extends \OC\Files\Storage\Common {
+ $response = $client->get($downloadUrl, [
+ 'headers' => $httpRequest->getRequestHeaders(),
+ 'stream' => true,
+- 'verify' => __DIR__ . '/../3rdparty/google-api-php-client/src/Google/IO/cacerts.pem',
+ ]);
+ } catch (RequestException $e) {
+ if(!is_null($e->getResponse())) {
diff --git a/owncloud-9.0.2-default_integrity_check_disabled.patch b/owncloud-9.0.2-default_integrity_check_disabled.patch
new file mode 100644
index 0000000..5f48dfc
--- /dev/null
+++ b/owncloud-9.0.2-default_integrity_check_disabled.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/private/integritycheck/checker.php b/lib/private/integritycheck/checker.php
+index b991f66..e2111b7 100644
+--- a/lib/private/integritycheck/checker.php
++++ b/lib/private/integritycheck/checker.php
+@@ -107,7 +107,7 @@ class Checker {
+ * applicable for very specific scenarios and we should not advertise it
+ * too prominent. So please do not add it to config.sample.php.
+ */
+- $isIntegrityCheckDisabled = $this->config->getSystemValue('integrity.check.disabled', false);
++ $isIntegrityCheckDisabled = $this->config->getSystemValue('integrity.check.disabled', true);
+ if($isIntegrityCheckDisabled === true) {
+ return false;
+ }
diff --git a/owncloud-9.0.2-no_need_for_broken_updater_repair.patch b/owncloud-9.0.2-no_need_for_broken_updater_repair.patch
new file mode 100644
index 0000000..9661d1c
--- /dev/null
+++ b/owncloud-9.0.2-no_need_for_broken_updater_repair.patch
@@ -0,0 +1,12 @@
+diff --git a/lib/private/repair.php b/lib/private/repair.php
+index 63b569b..d8e213a 100644
+--- a/lib/private/repair.php
++++ b/lib/private/repair.php
+@@ -115,7 +115,6 @@ class Repair extends BasicEmitter {
+ new RemoveGetETagEntries(\OC::$server->getDatabaseConnection()),
+ new UpdateOutdatedOcsIds(\OC::$server->getConfig()),
+ new RepairInvalidShares(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()),
+- new BrokenUpdaterRepair(),
+ ];
+ }
+
diff --git a/owncloud-conf-nginx.conf b/owncloud-conf-nginx.conf
new file mode 100644
index 0000000..bd0c0e8
--- /dev/null
+++ b/owncloud-conf-nginx.conf
@@ -0,0 +1,4 @@
+upstream php-owncloud {
+ server unix:/run/php-fpm/owncloud.sock;
+}
+
diff --git a/owncloud-default-nginx.conf b/owncloud-default-nginx.conf
new file mode 100644
index 0000000..81459b9
--- /dev/null
+++ b/owncloud-default-nginx.conf
@@ -0,0 +1,78 @@
+ rewrite ^/owncloud$ /owncloud/ redirect;
+
+ location /owncloud/ {
+ root /usr/share/;
+
+ # Add headers to serve security related headers
+ # Before enabling Strict-Transport-Security headers please read into this topic first.
+ # add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
+ add_header X-Content-Type-Options nosniff;
+ add_header X-Frame-Options "SAMEORIGIN";
+ add_header X-XSS-Protection "1; mode=block";
+ add_header X-Robots-Tag none;
+
+ # set max upload size
+ client_max_body_size 10G;
+ fastcgi_buffers 64 4K;
+
+ # Disable gzip to avoid the removal of the ETag header
+ gzip off;
+
+ # Uncomment if your server is build with the ngx_pagespeed module
+ # This module is currently not supported.
+ #pagespeed off;
+
+ index index.php;
+
+ error_page 403 /owncloud/core/templates/403.php;
+ error_page 404 /owncloud/core/templates/404.php;
+
+ location ~ ^/owncloud/apps-appstore/(.*)$ {
+ alias /var/lib/owncloud/apps/$1;
+ }
+
+ location ~ ^/owncloud/assets/(.*)$ {
+ alias /var/lib/owncloud/assets/$1;
+ }
+
+ location ~ ^/owncloud/(build|tests|config|lib|3rdparty|templates|data)/ {
+ deny all;
+ }
+
+ location ~ ^/owncloud/(?:\.|autotest|occ|issue|indie|db_|console) {
+ deny all;
+ }
+
+ rewrite ^/owncloud/remote/(.*) /owncloud/remote.php last;
+ rewrite ^/owncloud/core/doc/([^\/]+)(?:$|/) /owncloud/core/doc/$1/index.html;
+
+ try_files $uri $uri/ =404;
+
+ location ~ \.php(?:$|/) {
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ # fastcgi_param HTTPS on;
+ fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
+ fastcgi_pass php-owncloud;
+ fastcgi_intercept_errors on;
+ }
+
+ # Adding the cache control header for js and css files
+ # Make sure it is BELOW the location ~ \.php(?:$|/) { block
+ location ~* \.(?:css|js)$ {
+ add_header Cache-Control "public, max-age=7200";
+ # Optional: Don't log access to assets
+ access_log off;
+ }
+
+ # Optional: Don't log access to other assets
+ location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|swf)$ {
+ access_log off;
+ }
+
+ }
+
+
+
diff --git a/owncloud-delete-nonfree.sh b/owncloud-delete-nonfree.sh
deleted file mode 100755
index fe6c53c..0000000
--- a/owncloud-delete-nonfree.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash -e
-
-SUFFIX=".tar.bz2"
-ORIG_SOURCE=$1
-REPACK_SOURCE="$(basename $ORIG_SOURCE $SUFFIX)-repack${SUFFIX}"
-
-[ -d owncloud ] && rm -rf owncloud
-
-tar -xf $1
-
-# delete jslint
-pushd owncloud/apps/files_texteditor/js/vendor/ace/src-noconflict/
-sed -i '/^ \* JSHint, by JSHint Community\.$/,/^})()$/d' worker-javascript.js
-popd
-
-# delete minify entirely as it's a mess that contains at least one instance
-# of JSMin, which is under the same problematic license as jslint
-rm -rf owncloud/3rdparty/mrclay/minify
-
-tar -cjf $REPACK_SOURCE owncloud
-rm -rf owncloud
diff --git a/owncloud-el7-php-fpm.conf b/owncloud-el7-php-fpm.conf
new file mode 100644
index 0000000..83857bf
--- /dev/null
+++ b/owncloud-el7-php-fpm.conf
@@ -0,0 +1,24 @@
+[owncloud]
+user = apache
+group = apache
+listen = /run/php-fpm/owncloud.sock
+listen.allowed_clients = 127.0.0.1
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 5
+pm.min_spare_servers = 5
+pm.max_spare_servers = 35
+slowlog = /var/log/php-fpm/owncloud-slow.log
+php_admin_value[error_log] = /var/log/php-fpm/owncloud-error.log
+php_admin_flag[log_errors] = on
+php_value[session.save_handler] = files
+php_value[session.save_path] = /var/lib/php/session
+php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
+php_value[upload_max_filesize] = 10G
+php_value[post_max_size] = 10G
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
+
diff --git a/owncloud-nginx.conf b/owncloud-nginx.conf
deleted file mode 100644
index 3bd235b..0000000
--- a/owncloud-nginx.conf
+++ /dev/null
@@ -1,79 +0,0 @@
-# server {
-# listen 80;
-# server_name cloud.example.com;
-# return 301 https://$server_name$request_uri; # enforce https
-# }
-
-server {
-# listen 443 ssl;
- listen 80;
- server_name localhost;
-
- allow 127.0.0.1;
- deny all;
-
-# ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
-# ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
-
- # Path to the root of your installation
- root /usr/share/owncloud/;
-
- client_max_body_size 10G; # set max upload size
- fastcgi_buffers 64 4K;
-
- rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
- rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
- rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
-
- index index.php;
- error_page 403 /core/templates/403.php;
- error_page 404 /core/templates/404.php;
-
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
-
- location ~ ^/apps-appstore/(.*)$ {
- alias /var/lib/owncloud/apps/$1;
- }
-
- location ~ ^/assets/(.*)$ {
- alias /var/lib/owncloud/assets/$1;
- }
-
- location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
- deny all;
- }
-
- location / {
- # The following 2 rules are only needed with webfinger
- rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
- rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
-
- rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
- rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
-
- rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
-
- try_files $uri $uri/ index.php;
- }
-
- location ~ ^(.+?\.php)(/.*)?$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
-# fastcgi_param HTTPS on;
- fastcgi_pass php-fpm;
- }
-
- # Optional: set long EXPIRES header on static assets
- location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
- expires 30d;
- # Optional: Don't log access to assets
- access_log off;
- }
-
-}
diff --git a/owncloud-php-fpm.conf b/owncloud-php-fpm.conf
new file mode 100644
index 0000000..7a79c1b
--- /dev/null
+++ b/owncloud-php-fpm.conf
@@ -0,0 +1,25 @@
+[owncloud]
+user = apache
+group = apache
+listen = /run/php-fpm/owncloud.sock
+listen.acl_users = apache,nginx
+listen.allowed_clients = 127.0.0.1
+pm = dynamic
+pm.max_children = 50
+pm.start_servers = 5
+pm.min_spare_servers = 5
+pm.max_spare_servers = 35
+slowlog = /var/log/php-fpm/owncloud-slow.log
+php_admin_value[error_log] = /var/log/php-fpm/owncloud-error.log
+php_admin_flag[log_errors] = on
+php_value[session.save_handler] = files
+php_value[session.save_path] = /var/lib/php/session
+php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
+php_value[upload_max_filesize] = 10G
+php_value[post_max_size] = 10G
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
+
diff --git a/owncloud.spec b/owncloud.spec
index b208249..ee56bd6 100644
--- a/owncloud.spec
+++ b/owncloud.spec
@@ -8,7 +8,7 @@
# Please preserve changelog entries
#
Name: owncloud
-Version: 8.2.5
+Version: 9.0.2
Release: 1%{?dist}
Summary: Private file sync and share server
Group: Applications/Internet
@@ -16,19 +16,16 @@ Group: Applications/Internet
License: AGPLv3+ and MIT and BSD and CC-BY and CC-BY-SA and GPLv3 and Public Domain and (MPLv1.1 or GPLv2+ or LGPLv2+) and (MIT or GPL+) and (MIT or GPLv2) and ASL 2.0 and LGPLv3
URL: http://owncloud.org
-# Tarball with non-free sources stripped. To generate:
-# ./owncloud-delete-nonfree.sh %%{name}-%%{version}.tar.bz2
-Source0: %{name}-%{version}-repack.tar.bz2
-# orig source: https://download.owncloud.org/community/%%{name}-%%{version}.tar.bz2
-# sha256sum: https://download.owncloud.org/community/%%{name}-%%{version}.tar.bz2.sha256
-
-# used to repack the source tarball
-Source42: %{name}-delete-nonfree.sh
-
+Source0: https://download.owncloud.org/community/%{name}-%{version}.tar.bz2
Source1: %{name}-httpd.conf
Source2: %{name}-access-httpd.conf.avail
-Source6: %{name}-nginx.conf
+
+Source200: %{name}-default-nginx.conf
+Source201: %{name}-conf-nginx.conf
+Source202: %{name}-php-fpm.conf
+Source203: %{name}-el7-php-fpm.conf
+
# Config snippets
Source100: %{name}-auth-any.inc
Source101: %{name}-auth-local.inc
@@ -45,20 +42,15 @@ Source7: %{name}-config.php
# Our autoloader for core
Source8: %{name}-fedora-autoloader.php
-# Adjust mediaelement not to use its SWF and Silverlight plugins. This
-# changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to
-# 'plugins:["youtube","vimeo"]'
-Patch1: %{name}-8.2.5-videoviewer_noplugins.patch
-
# Stop OC from trying to do stuff to .htaccess files. Just calm down, OC.
# Distributors are on the case.
-Patch2: %{name}-8.2.2-dont_update_htacess.patch
+Patch2: %{name}-9.0.1-dont_update_htacess.patch
# Remove explicit load of dropbox
-Patch3: %{name}-8.2.3-dropbox-autoloader.patch
+Patch3: %{name}-9.0.1-dropbox-autoloader.patch
# Remove explicit load of google
-Patch4: %{name}-8.2.3-google-autoloader.patch
+Patch4: %{name}-9.0.1-google-autoloader.patch
# Remove explicit load of aws
Patch5: %{name}-8.2.3-amazon-autoloader.patch
@@ -66,9 +58,17 @@ Patch5: %{name}-8.2.3-amazon-autoloader.patch
# Display the appropriate upgrade command for fedora/epel users bz#1321417
Patch6: %{name}-8.2.3-correct-cli-upgrade-command.patch
-# Backport commit ca6bd5c and cfdf2b9 since icewind/streams added function in 0.3.0+
-# breaking interface from 0.2.0 and OC method spamming logs
-Patch7: %{name}-8.2.3-icewind-streams-encryption.patch
+# The broken updater repair step gets upset we unbundle
+Patch7: %{name}-9.0.2-no_need_for_broken_updater_repair.patch
+
+# Disable the integrity checking whilst a better way to deal with it is found
+Patch8: %{name}-9.0.2-default_integrity_check_disabled.patch
+
+# Need to work around an NSS issue in el7.2, due to be fix el7.3 bz#1241172
+Patch9: %{name}-8.1.6-work-arround-nss-issue.patch
+
+# RH provide support for php54 so don't tell users it's EOL
+Patch10: %{name}-8.2.3-dont_warn_php54_eol.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -79,39 +79,40 @@ BuildRequires: php-pear
# For sanity check
BuildRequires: php-cli
-BuildRequires: php-composer(sabre/dav) >= 2.1.9
-BuildRequires: php-composer(sabre/dav) < 2.2
-BuildRequires: php-composer(doctrine/dbal) >= 2.5.1
+BuildRequires: php-composer(sabre/dav) >= 3.0.8
+BuildRequires: php-composer(sabre/dav) < 4.0
+BuildRequires: php-composer(doctrine/dbal) >= 2.5.2
BuildRequires: php-composer(doctrine/dbal) < 2.6
-BuildRequires: php-composer(mcnetic/zipstreamer) >= 0.7
+BuildRequires: php-composer(mcnetic/zipstreamer) >= 1.0
+BuildRequires: php-composer(mcnetic/zipstreamer) < 2.0
BuildRequires: php-composer(phpseclib/phpseclib) >= 2.0
BuildRequires: php-composer(phpseclib/phpseclib) < 3.0
BuildRequires: php-opencloud >= 1.9.2
BuildRequires: php-composer(james-heinrich/getid3) >= 1.9.12
-BuildRequires: php-composer(jeremeamia/superclosure) >= 2.0
+BuildRequires: php-composer(jeremeamia/superclosure) >= 2.1.0
BuildRequires: php-composer(ircmaxell/random-lib) >= 1.1
BuildRequires: php-composer(ircmaxell/random-lib) < 2.0
BuildRequires: php-composer(bantu/ini-get-wrapper) >= 1.0.1
BuildRequires: php-composer(natxet/CssMin) >= 3.0.4
-BuildRequires: php-composer(punic/punic) >= 1.1.0
-BuildRequires: php-composer(pear/archive_tar) >= 1.4
+BuildRequires: php-composer(punic/punic) >= 1.6.3
+BuildRequires: php-composer(pear/archive_tar) >= 1.4.1
BuildRequires: php-composer(pear/archive_tar) < 2.0
-BuildRequires: php-composer(patchwork/utf8) >= 1.1
+BuildRequires: php-composer(patchwork/utf8) >= 1.2.6
BuildRequires: php-composer(patchwork/utf8) < 2.0
-BuildRequires: php-composer(symfony/console) >= 2.6.4
-BuildRequires: php-composer(symfony/event-dispatcher) >= 2.6.4
-BuildRequires: php-composer(symfony/routing) >= 2.6.4
-BuildRequires: php-composer(symfony/process) >= 2.6.4
-BuildRequires: php-composer(pimple/pimple) >= 3.0
+BuildRequires: php-composer(symfony/console) >= 2.8.1
+BuildRequires: php-composer(symfony/event-dispatcher) >= 2.8.1
+BuildRequires: php-composer(symfony/routing) >= 2.8.1
+BuildRequires: php-composer(symfony/process) >= 2.8.1
+BuildRequires: php-composer(pimple/pimple) >= 3.0.2
BuildRequires: php-composer(pimple/pimple) < 4.0
BuildRequires: php-composer(ircmaxell/password-compat) >= 1.0.0
-BuildRequires: php-composer(nikic/php-parser) >= 1.0
+BuildRequires: php-composer(nikic/php-parser) >= 1.4.1
BuildRequires: php-composer(nikic/php-parser) < 2.0
-BuildRequires: php-composer(icewind/streams) >= 0.2
+BuildRequires: php-composer(icewind/streams) >= 0.4.0
BuildRequires: php-composer(swiftmailer/swiftmailer) >= 5.4.1
-BuildRequires: php-composer(guzzlehttp/guzzle) >= 5.0
+BuildRequires: php-composer(guzzlehttp/guzzle) >= 5.3.0
BuildRequires: php-composer(guzzlehttp/guzzle) < 6.0
-BuildRequires: php-composer(league/flysystem) >= 1.0.4
+BuildRequires: php-composer(league/flysystem) >= 1.0.16
BuildRequires: php-composer(interfasys/lognormalizer) >= 1.0
BuildRequires: php-composer(owncloud/tarstreamer) >= 0.1
BuildRequires: php-composer(patchwork/jsqueeze) >= 2.0
@@ -127,6 +128,12 @@ BuildRequires: php-aws-sdk >= 2.7.0
BuildRequires: php-composer(symfony/yaml) >= 2.6.0
BuildRequires: php-composer(symfony/yaml) < 3.0.0
BuildRequires: php-pear(pear.dropbox-php.com/Dropbox)
+BuildRequires: php-composer(symfony/polyfill-php70) >= 1.0
+BuildRequires: php-composer(symfony/polyfill-php70) < 2.0
+BuildRequires: php-composer(symfony/polyfill-php55) >= 1.0
+BuildRequires: php-composer(symfony/polyfill-php55) < 2.0
+BuildRequires: php-composer(symfony/polyfill-php56) >= 1.0
+BuildRequires: php-composer(symfony/polyfill-php56) < 2.0
Requires: %{name}-webserver = %{version}-%{release}
@@ -150,29 +157,22 @@ Requires: php-simplexml
Requires: php-xmlwriter
Requires: php-spl
Requires: php-zip
-%if 0%{?fedora} || 0%{?rhel} > 6
Requires: php-filter
-%endif
### External PHP libs required by OC core
-# Ordering requires to match composer.json
-
-# "sabre/dav" : "2.1.9"
-# pulls in sabre event, http and vobject as strict requires
-Requires: php-composer(sabre/dav) >= 2.1.9
-Requires: php-composer(sabre/dav) < 2.2
-# "doctrine/dbal": "2.5.1"
+# "doctrine/dbal": "2.5.2"
# pulls in doctrine/common as a strict requires
# which pulls in doctrine/{annotations,inflector,cache,collections,lexer} as strict requires
-Requires: php-composer(doctrine/dbal) >= 2.5.1
+Requires: php-composer(doctrine/dbal) >= 2.5.2
Requires: php-composer(doctrine/dbal) < 2.6
-#"mcnetic/zipstreamer": "v0.7"
-Requires: php-composer(mcnetic/zipstreamer) >= 0.7
+#"mcnetic/zipstreamer": "^1.0"
+Requires: php-composer(mcnetic/zipstreamer) >= 1.0
+Requires: php-composer(mcnetic/zipstreamer) < 2.0
-# "phpseclib/phpseclib": "~2.0@dev"
+# "phpseclib/phpseclib": "2.0.0"
Requires: php-composer(phpseclib/phpseclib) >= 2.0
Requires: php-composer(phpseclib/phpseclib) < 3.0
@@ -184,8 +184,8 @@ Requires: php-opencloud >= 1.9.2
#"james-heinrich/getid3": "dev-master"
Requires: php-composer(james-heinrich/getid3) >= 1.9.12
-# "jeremeamia/superclosure": "2.0.0"
-Requires: php-composer(jeremeamia/superclosure) >= 2.0
+# "jeremeamia/superclosure": "2.1.0"
+Requires: php-composer(jeremeamia/superclosure) >= 2.1.0
# "ircmaxell/random-lib": "~1.1"
# Also pulls in ircmaxell/security-lib which is a strict requires
@@ -198,62 +198,63 @@ Requires: php-composer(bantu/ini-get-wrapper) >= 1.0.1
# "natxet/CssMin": "dev-master"
Requires: php-composer(natxet/CssMin) >= 3.0.4
-# "punic/punic": "1.1.0"
-Requires: php-composer(punic/punic) >= 1.1.0
+# "punic/punic": "1.6.3"
+Requires: php-composer(punic/punic) >= 1.6.3
-# "pear/archive_tar": "~1.4"
-Requires: php-composer(pear/archive_tar) >= 1.4
+# "pear/archive_tar": "1.4.1"
+Requires: php-composer(pear/archive_tar) >= 1.4.1
Requires: php-composer(pear/archive_tar) < 2.0
-# "patchwork/utf8": "~1.1"
-Requires: php-composer(patchwork/utf8) >= 1.1
+# "patchwork/utf8": "1.2.6"
+Requires: php-composer(patchwork/utf8) >= 1.2.6
Requires: php-composer(patchwork/utf8) < 2.0
-# "symfony/console": "2.6.4"
-Requires: php-composer(symfony/console) >= 2.6.4
-# "symfony/event-dispatcher": "2.6.4"
-Requires: php-composer(symfony/event-dispatcher) >= 2.6.4
-# "symfony/routing": "2.6.4"
-Requires: php-composer(symfony/routing) >= 2.6.4
-# "symfony/process": "2.6.4"
-Requires: php-composer(symfony/process) >= 2.6.4
-
-# "pimple/pimple": "~3.0"
-Requires: php-composer(pimple/pimple) >= 3.0
+# "symfony/console": "2.8.1"
+Requires: php-composer(symfony/console) >= 2.8.1
+# "symfony/event-dispatcher": "2.8.1"
+Requires: php-composer(symfony/event-dispatcher) >= 2.8.1
+# "symfony/routing": "2.8.1"
+Requires: php-composer(symfony/routing) >= 2.8.1
+# "symfony/process": "2.8.1"
+Requires: php-composer(symfony/process) >= 2.8.1
+
+# "pimple/pimple": "3.0.2"
+Requires: php-composer(pimple/pimple) >= 3.0.2
Requires: php-composer(pimple/pimple) < 4.0
# "ircmaxell/password-compat": "1.0.*"
Requires: php-composer(ircmaxell/password-compat) >= 1.0.0
-# "nikic/php-parser": "~1.1"
-Requires: php-composer(nikic/php-parser) >= 1.0
+# "nikic/php-parser": "1.4.1"
+Requires: php-composer(nikic/php-parser) >= 1.4.1
Requires: php-composer(nikic/php-parser) < 2.0
-# "icewind/Streams": "0.2.0"
-Requires: php-composer(icewind/streams) >= 0.2
+# "icewind/Streams": "0.4.0"
+Requires: php-composer(icewind/streams) >= 0.4.0
# "swiftmailer/swiftmailer": "@stable"
# Version 5.4.1 for autoloader in /usr/share/php
Requires: php-composer(swiftmailer/swiftmailer) >= 5.4.1
-# "guzzlehttp/guzzle": "~5.0"
+# "guzzlehttp/guzzle": "5.3.0"
# pulls in guzzlehttp/ringphp as strict requires
# ringphp pulls in guzzlehttp/streams and react/promise as strict requires
-Requires: php-composer(guzzlehttp/guzzle) >= 5.0
+Requires: php-composer(guzzlehttp/guzzle) >= 5.3.0
Requires: php-composer(guzzlehttp/guzzle) < 6.0
-# "league/flysystem": "1.0.4"
-Requires: php-composer(league/flysystem) >= 1.0.4
+# "league/flysystem": "1.0.16"
+Requires: php-composer(league/flysystem) >= 1.0.16
-# "pear/pear-core-minimal": "v1.10.0alpha2"
+
+# "pear/pear-core-minimal": "v1.10.1"
# this includes pear/console_getopt and pear/PEAR
# which is not listed in composer.json unlike archive_tar
-Requires: php-composer(pear/pear-core-minimal) > 1.10
+Requires: php-composer(pear/pear-core-minimal) >= 1.10.1
-# "interfasys/lognormalizer": "dev-master@dev"
+# "interfasys/lognormalizer": "v1.0"
Requires: php-composer(interfasys/lognormalizer) >= 1.0
-# "deepdiver1975/TarStreamer": "v0.1-beta3"
+# "deepdiver1975/TarStreamer": "v0.1.0"
# Despite the difference in name this is correct
# https://github.com/owncloud/3rdparty/tree/master/deepdiver1975/tarstreamer
Requires: php-composer(owncloud/tarstreamer) >= 0.1
@@ -262,20 +263,38 @@ Requires: php-composer(owncloud/tarstreamer) >= 0.1
Requires: php-composer(patchwork/jsqueeze) >= 2.0
Requires: php-composer(patchwork/jsqueeze) < 3.0
-# "kriswallsmith/assetic": "^1.3"
-Requires: php-composer(kriswallsmith/assetic) >= 1.3
+# "kriswallsmith/assetic": "1.3.2"
+# Need release 3 for the autoloader fix to avoid it spamming the logs
+Requires: php-composer(kriswallsmith/assetic) >= 1.3.2-3
Requires: php-composer(kriswallsmith/assetic) < 2.0
-
+# "sabre/dav" : "3.0.8"
+# pulls in sabre event, http and vobject, xml, uri as strict requires
+Requires: php-composer(sabre/dav) >= 3.0.8
+Requires: php-composer(sabre/dav) < 4.0
+
+# symfony/polyfill-mbstring is not in composer.json but is in the 3rdparty folder
+# we don't need it though as we ship mbstring itself
+
+# "symfony/polyfill-php70": "^1.0",
+# pulls in s strict requires of paragonie/random_compat
+Requires: php-composer(symfony/polyfill-php70) >= 1.0
+Requires: php-composer(symfony/polyfill-php70) < 2.0
+# "symfony/polyfill-php55": "^1.0",
+Requires: php-composer(symfony/polyfill-php55) >= 1.0
+Requires: php-composer(symfony/polyfill-php55) < 2.0
+# "symfony/polyfill-php56": "^1.0"
+Requires: php-composer(symfony/polyfill-php56) >= 1.0
+Requires: php-composer(symfony/polyfill-php56) < 2.0
### For dependencies of apps/files_external
## SMB/CIFS external storage stuff
-#"icewind/smb": "1.0.4"
+#"icewind/smb": "1.0.8"
# note that streams is a dep but already required by core anyway
-Requires: php-composer(icewind/smb) >= 1.0.4
-# This makes smb external storage usable iin performance
+Requires: php-composer(icewind/smb) >= 1.0.8
+# This makes smb external storage usable in performance
# and doesn't break things like encryption due to timeouts
%if 0%{?rhel} != 5
Requires: php-pecl(smbclient) >= 0.8.0
@@ -403,13 +422,17 @@ work with an SQLite 3 database stored on the local system.
%prep
%setup -q -n %{name}
-%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%if 0%{?rhel}
+%patch9 -p1
+%patch10 -p1
+%endif
# prepare package doc
cp %{SOURCE3} README.fedora
@@ -419,7 +442,6 @@ cp %{SOURCE5} README.postgresql
# Explicitly remove the bundled libraries we're aware of
pushd 3rdparty
-rm -r sabre/{dav,event,http,vobject}
rm -r doctrine/{annotations,cache,collections,common,dbal,inflector,lexer}
rm -r mcnetic/zipstreamer
rm -r phpseclib/phpseclib
@@ -448,6 +470,10 @@ rm -r interfasys/lognormalizer
rm -r deepdiver1975/tarstreamer
rm -r patchwork/jsqueeze
rm -r kriswallsmith/assetic
+rm -r sabre/{dav,event,http,vobject,uri,xml}
+rm -r symfony/polyfill-{php55,php56,php70,mbstring,util}
+rm -r paragonie/random_compat
+rm README.md
# remove composer stuff
rm -r composer*
@@ -498,19 +524,9 @@ for f in {l10n.pl,init.sh,setup_owncloud.sh,image-optimization.sh,install_depend
done
find . -size 0 -type f -exec rm {} \;
-# Drop pre-compiled binary lumps: Flash and Silverlight
-# This means that Flash/Silverlight video/audio fallbacks in the
-# 'media' and 'videoviewer' apps are not available.
-# To re-introduce these they would have to be built from the
-# source as part of this package build, they cannot be shipped
-# pre-compiled. - AdamW, 2013/08
-# https://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries
-rm apps/files_videoviewer/js/flashmediaelement.swf
-rm apps/files_videoviewer/js/silverlightmediaelement.xap
-
-# let's not ship upstream's 'updater' app, which has zero chance of working and
+# let's not ship upstream's 'updatenotification' app, which has zero chance of working and
# a big chance of blowing things up
-rm -r apps/updater
+rm -r apps/updatenotification
%check
@@ -521,8 +537,8 @@ if [ $nb -gt 1 ]; then
fi
if grep -r 3rdparty %{buildroot}%{_datadir}/%{name}/apps/files_external \
- | grep -v 3rdparty/autoload.php; then
- false Patch needs to be adapted
+ | grep -v 3rdparty/autoload.php | grep -v signature.json; then
+ false App files_external needs to be adapted
fi
php %{buildroot}%{_datadir}/%{name}/apps/files_external/3rdparty/autoload.php
@@ -543,7 +559,6 @@ fi
php %{buildroot}%{_datadir}/%{name}/3rdparty/autoload.php
-
%build
# Nothing to build
@@ -587,11 +602,20 @@ install -Dpm 644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} \
%{buildroot}%{_sysconfdir}/httpd/conf.d/
# nginx config
-install -Dpm 644 %{SOURCE6} \
+install -Dpm 644 %{SOURCE200} \
+ %{buildroot}%{_sysconfdir}/nginx/default.d/%{name}.conf
+install -Dpm 644 %{SOURCE201} \
%{buildroot}%{_sysconfdir}/nginx/conf.d/%{name}.conf
+%if 0%{?rhel}
+install -Dpm 644 %{SOURCE203} \
+ %{buildroot}%{_sysconfdir}/php-fpm.d/%{name}.conf
+%else
+install -Dpm 644 %{SOURCE202} \
+ %{buildroot}%{_sysconfdir}/php-fpm.d/%{name}.conf
+%endif
-%if 0%{?rhel} < 7
+%if 0%{?fedora} < 21 && 0%{?rhel} < 7
%post
semanage fcontext -a -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}/config.php' 2>/dev/null || :
semanage fcontext -a -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}' 2>/dev/null || :
@@ -625,6 +649,14 @@ if [ $1 -eq 0 ]; then
fi
%post nginx
+%if 0%{?rhel}
+ # Work around missing php session directory for php-fpm in el7 bz#1338444
+ if [ ! -d /var/lib/php/session ]
+ then
+ mkdir /var/lib/php/session
+ fi
+ /usr/bin/chown apache /var/lib/php/session
+%endif
%if 0%{?fedora} || 0%{?rhel} > 6
/usr/bin/systemctl reload nginx.service > /dev/null 2>&1 || :
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
@@ -674,7 +706,9 @@ rm -rf %{buildroot}
%files nginx
%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/nginx/default.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/nginx/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/php-fpm.d/%{name}.conf
%files mysql
%defattr(-,root,root,-)
@@ -689,8 +723,16 @@ rm -rf %{buildroot}
%changelog
-* Thu May 12 2016 Remi Collet <remi@fedoraproject.org> - 8.2.5-1
-- Update to 8.2.5
+* Fri May 06 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.2-1
+- Update to 9.0.2
+- Need a better way to deal with the integrity checking stuff from upstream
+
+* Thu May 05 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.1-1
+- Remove el6 conditionals as it's no longer a supported platform
+- Change nginx configuration as per bz#1332900
+- Add php-fpm owncloud dedicated pool
+- No longer ships non-free jshint in aceeditor so don't need repack
+- Update to 9.0.1
* Thu May 5 2016 Remi Collet <remi@fedoraproject.org> - 8.2.4-1
- Update to 8.2.4