Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_videoplayer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index 936fe20..889ecac 100644
--- a/js/main.js
+++ b/js/main.js
@@ -19,5 +19,5 @@
* 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)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+"/download";o.onViewInline(document.getElementById("imgframe"),t,i);break}}})}]);
+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+"/download";o.onViewInline(document.getElementById("imgframe"),t,i);break}}})}]);
//# sourceMappingURL=main.js.map \ No newline at end of file