!function(e){function n(n){for(var i,o,l=n[0],r=n[1],a=0,s=[];a * * @author 2018 Christoph Wurst * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ i.nc=btoa(OC.requestToken),i.p=OC.filePath("files_videoplayer","","js/");var t=null,o={UI:{show:function(){var e=document.createElement("source");e.src=escapeHTML(o.location).replace("&","&"),o.mime&&(e.type=escapeHTML(o.mime));var n=document.createElement("video");if(n.id="my_video_1",n.classList.add("video-js"),n.classList.add("vjs-fill"),n.classList.add("vjs-big-play-centered"),n.controls=!0,n.preload="auto",n.width="100%",n.height="100%",n.poster=OC.filePath("files_videoplayer","","img")+"/poster.png",n.setAttribute("data-setup",'{"techOrder": ["html5"]}'),n.appendChild(e),null===o.inline){var i=document.createElement("div");i.id="videoplayer_overlay";var l=document.createElement("div");l.id="videoplayer_outer_container";var r=document.createElement("div");r.id="videoplayer_container";var a=document.createElement("div");a.id="videoplayer",r.appendChild(a),l.appendChild(r),i.appendChild(l),a.appendChild(n),document.body.appendChild(i),i.addEventListener("click",function(e){e.target===this&&o.hidePlayer()}),setTimeout(function(){i.className="show"},0)}else{var d=document.createElement("div");d.id="videoplayer_view",d.appendChild(n),o.inline.appendChild(d)}t("my_video_1",{fill:!0}).ready(function(){if(o.player=this,null===o.inline){var e=document.createElement("a");e.className="icon-view-close",e.id="box-close",e.href="#",e.addEventListener("click",function(){o.hidePlayer()}),document.getElementById("my_video_1").appendChild(e)}null===document.getElementById("body-public")&&o.player.play()})},hide:function(){var e=document.getElementById("videoplayer_overlay");e.className="",setTimeout(function(){e.parentElement.removeChild(e)},500)}},mime:null,file:null,location:null,player:null,inline:null,mimeTypes:["video/mp4","video/x-m4v","video/webm","video/x-flv","video/ogg","video/quicktime","video/x-matroska"],mimeTypeAliasses:{"video/x-matroska":"video/webm"},onView:function(e,n){o.file=e,o.dir=n.dir,o.location=n.fileList.getDownloadUrl(e,o.dir),o.mime=n.$file.attr("data-mime"),o.mimeTypeAliasses.hasOwnProperty(o.mime)&&(o.mime=o.mimeTypeAliasses[o.mime]),o.showPlayer()},onViewInline:function(e,n,i){o.location=n,o.mime=i,o.mimeTypeAliasses.hasOwnProperty(o.mime)&&(o.mime=o.mimeTypeAliasses[o.mime]),o.inline=e,o.showPlayer()},showPlayer:function(){Promise.all([i.e(1),i.e(2)]).then(i.bind(null,3)).then(function(e){t=e.default,Promise.all([Promise.all([i.e(1),i.e(2)]).then(i.t.bind(null,1,7)),Promise.all([i.e(1),i.e(2)]).then(i.t.bind(null,2,7))]).then(function(){o.UI.show()})})},hidePlayer:function(){null!==o.player&&!1!==o.player&&null===o.inline&&(o.player.dispose(),o.player=!1,o.UI.hide())},log:function(e){console.log(e)}};document.addEventListener("DOMContentLoaded",function(){if(document.addEventListener("keyup",function(e){(void 0!==e.key&&"Escape"===e.key||void 0!==e.keyCode&&27===e.keyCode)&&o.hidePlayer()}),"undefined"!=typeof FileActions&&!OCA.Viewer)for(var e=0;e