vimeo.min.js000064400000014500147200254000006775 0ustar00/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */ !function a(o,s,u){function c(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return c(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var l="function"==typeof require&&require,e=0;e 0) { bufferedTime = duration * loadProgress; if (mediaElement.originalNode.autoplay) { paused = false; ended = false; var event = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(event); } } }).catch(function (error) { errorHandler(error, vimeo); }); }); vimeoPlayer.on('progress', function () { vimeoPlayer.getDuration().then(function (loadProgress) { duration = loadProgress; if (duration > 0) { bufferedTime = duration * loadProgress; if (mediaElement.originalNode.autoplay) { var initEvent = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(initEvent); var playingEvent = mejs.Utils.createEvent('playing', vimeo); mediaElement.dispatchEvent(playingEvent); } } var event = mejs.Utils.createEvent('progress', vimeo); mediaElement.dispatchEvent(event); }).catch(function (error) { return errorHandler(error); }); }); vimeoPlayer.on('timeupdate', function () { vimeoPlayer.getCurrentTime().then(function (seconds) { currentTime = seconds; var event = mejs.Utils.createEvent('timeupdate', vimeo); mediaElement.dispatchEvent(event); }).catch(function (error) { return errorHandler(error); }); }); vimeoPlayer.on('play', function () { paused = false; ended = false; var event = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(event); var playingEvent = mejs.Utils.createEvent('playing', vimeo); mediaElement.dispatchEvent(playingEvent); }); vimeoPlayer.on('pause', function () { paused = true; ended = false; var event = mejs.Utils.createEvent('pause', vimeo); mediaElement.dispatchEvent(event); }); vimeoPlayer.on('ended', function () { paused = false; ended = true; var event = mejs.Utils.createEvent('ended', vimeo); mediaElement.dispatchEvent(event); }); events = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay']; for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) { var event = mejs.Utils.createEvent(events[_i4], vimeo); mediaElement.dispatchEvent(event); } }; var height = mediaElement.originalNode.height, width = mediaElement.originalNode.width, vimeoContainer = document.createElement('iframe'), standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src); var queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : ''; var args = []; if (mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) { args.push('autoplay=1'); } if (mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) { args.push('loop=1'); } queryArgs = '' + queryArgs + (queryArgs ? '&' : '?') + args.join('&'); vimeoContainer.setAttribute('id', vimeo.id); vimeoContainer.setAttribute('width', width); vimeoContainer.setAttribute('height', height); vimeoContainer.setAttribute('frameBorder', '0'); vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs); vimeoContainer.setAttribute('webkitallowfullscreen', 'true'); vimeoContainer.setAttribute('mozallowfullscreen', 'true'); vimeoContainer.setAttribute('allowfullscreen', 'true'); vimeoContainer.setAttribute('allow', 'autoplay'); mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode); mediaElement.originalNode.style.display = 'none'; VimeoApi.load({ iframe: vimeoContainer, id: vimeo.id }); vimeo.hide = function () { vimeo.pause(); if (vimeoPlayer) { vimeoContainer.style.display = 'none'; } }; vimeo.setSize = function (width, height) { vimeoContainer.setAttribute('width', width); vimeoContainer.setAttribute('height', height); }; vimeo.show = function () { if (vimeoPlayer) { vimeoContainer.style.display = ''; } }; vimeo.destroy = function () {}; return vimeo; } }; mejs.Utils.typeChecks.push(function (url) { return (/(\/\/player\.vimeo|vimeo\.com)/i.test(url) ? 'video/x-vimeo' : null ); }); mejs.Renderers.add(vimeoIframeRenderer); },{}]},{},[1]);