!function(e){function n(n){for(var i,o,l=n[0],r=n[1],a=0,s=[];a<l.length;a++)o=l[a],t[o]&&s.push(t[o][0]),t[o]=0;for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);for(d&&d(n);s.length;)s.shift()()}var i={},t={0:0};function o(n){if(i[n])return i[n].exports;var t=i[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=[],i=t[e];if(0!==i)if(i)n.push(i[2]);else{var l=new Promise(function(n,o){i=t[e]=[n,o]});n.push(i[2]=l);var r,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({1:"vendors~videojs",2:"videojs"}[e]||e)+".js"}(e),r=function(n){a.onerror=a.onload=null,clearTimeout(d);var i=t[e];if(0!==i){if(i){var o=n&&("load"===n.type?"missing":n.type),l=n&&n.target&&n.target.src,r=new Error("Loading chunk "+e+" failed.\n("+o+": "+l+")");r.type=o,r.request=l,i[1](r)}t[e]=void 0}};var d=setTimeout(function(){r({type:"timeout",target:a})},12e4);a.onerror=a.onload=r,document.head.appendChild(a)}return Promise.all(n)},o.m=e,o.c=i,o.d=function(e,n,i){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)o.d(i,t,function(n){return e[n]}.bind(null,t));return i},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/js/",o.oe=function(e){throw console.error(e),e};var l=window.webpackJsonp=window.webpackJsonp||[],r=l.push.bind(l);l.push=n,l=l.slice();for(var a=0;a<l.length;a++)n(l[a]);var d=r;o(o.s=0)}([function(e,n,i){
/*
 * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @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 <http://www.gnu.org/licenses/>.
 */
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("&amp;","&"),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<o.mimeTypes.length;++e){var n=o.mimeTypes[e];OCA.Files.fileActions.register(n,"View",OC.PERMISSION_READ,"",o.onView),OCA.Files.fileActions.setDefault(n,"View"),n===i&&(isSupportedMimetype=!0)}if(document.getElementById("body-public")&&document.getElementById("imgframe")){var i=document.getElementById("mimetype").value;for(e=0;e<o.mimeTypes.length;++e)if(o.mimeTypes[e]===i){var t=window.location.href.split("?")[0]+"/download";o.onViewInline(document.getElementById("imgframe"),t,i);break}}})}]);
//# sourceMappingURL=main.js.map