1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +02:00
Oinktube/view/js/videojs-vimeo/videojs-vimeo.min.js
2020-01-14 11:27:40 -03:00

1 line
No EOL
25 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function e(t,n,o){function r(u,a){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return r(n||e)},l,l.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(e,t,n){(function(e,o){!function(e,o){"object"==typeof n&&void 0!==t?t.exports=o():"function"==typeof define&&define.amd?define(o):(e.Vimeo=e.Vimeo||{},e.Vimeo.Player=o())}(this,function(){"use strict";function t(e,t){return 0===e.indexOf(t.toLowerCase())?e:""+t.toLowerCase()+e.substr(0,1).toUpperCase()+e.substr(1)}function n(e){return e instanceof window.HTMLElement}function r(e){return!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e}function i(e){return/^(https?:)?\/\/((player|www).)?vimeo.com(?=$|\/)/.test(e)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.url,o=t||n;if(!o)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(r(o))return"https://vimeo.com/"+o;if(i(o))return o.replace("http:","https:");if(t)throw new TypeError("“"+t+"” is not a valid video id.");throw new TypeError("“"+o+"” is not a vimeo.com url.")}function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e,t,n){var o=S.get(e.element)||{};t in o||(o[t]=[]),o[t].push(n),S.set(e.element,o)}function c(e,t){return(S.get(e.element)||{})[t]||[]}function l(e,t,n){var o=S.get(e.element)||{};if(!o[t])return!0;if(!n)return o[t]=[],S.set(e.element,o),!0;var r=o[t].indexOf(n);return-1!==r&&o[t].splice(r,1),S.set(e.element,o),o[t]&&0===o[t].length}function f(e,t){var n=c(e,t);if(n.length<1)return!1;var o=n.shift();return l(e,t,o),o}function d(e,t){var n=S.get(e);S.set(t,n),S.delete(e)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x.reduce(function(t,n){var o=e.getAttribute("data-vimeo-"+n);return(o||""===o)&&(t[n]=""===o?1:o),t},t)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,o){if(!i(e))throw new TypeError("“"+e+"” is not a vimeo.com url.");var r="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e);for(var u in t)t.hasOwnProperty(u)&&(r+="&"+u+"="+encodeURIComponent(t[u]));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",r,!0),a.onload=function(){if(404===a.status)return void o(new Error("“"+e+"” was not found."));if(403===a.status)return void o(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(a.responseText);n(t)}catch(e){o(e)}},a.onerror=function(){var e=a.status?" ("+a.status+")":"";o(new Error("There was an error fetching the embed code from Vimeo"+e+"."))},a.send()})}function v(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var o=document.createElement("div");return o.innerHTML=n,t.appendChild(o.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function y(e){return"string"==typeof e&&(e=JSON.parse(e)),e}function m(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var o={method:t};void 0!==n&&(o.value=n);var r=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));r>=8&&r<10&&(o=JSON.stringify(o)),e.element.contentWindow.postMessage(o,e.origin)}}function g(e,t){t=y(t);var n=[],o=void 0;if(t.event){if("error"===t.event){c(e,t.data.method).forEach(function(n){var o=new Error(t.data.message);o.name=t.data.name,n.reject(o),l(e,t.data.method,n)})}n=c(e,"event:"+t.event),o=t.data}else if(t.method){var r=f(e,t.method);r&&(n.push(r),o=t.value)}n.forEach(function(t){try{if("function"==typeof t)return void t.call(e,o);t.resolve(o)}catch(e){}})}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _=void 0!==e&&"[object global]"==={}.toString.call(e),T=void 0!==Array.prototype.indexOf,b="undefined"!=typeof window&&void 0!==window.postMessage;if(!(_||T&&b))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var E="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},k=(a(function(e,t){!function(e){function t(e,t){function o(e){if(!this||this.constructor!==o)return new o(e);this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,e&&n.call(this,e)}return t||w(e,"size",{get:y}),e.constructor=o,o.prototype=e,o}function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function o(e){return this.has(e)&&(this._keys.splice(g,1),this._values.splice(g,1),this._itp.forEach(function(e){g<e[0]&&e[0]--})),-1<g}function r(e){return this.has(e)?this._values[g]:void 0}function i(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(g=e.length;g--&&!_(e[g],t););else g=e.indexOf(t);return-1<g}function u(e){return i.call(this,this._values,e)}function a(e){return i.call(this,this._keys,e)}function s(e,t){return this.has(e)?this._values[g]=t:this._values[this._keys.push(e)-1]=t,this}function c(e){return this.has(e)||this._values.push(e),this}function l(){(this._keys||0).length=this._values.length=0}function f(){return v(this._itp,this._keys)}function d(){return v(this._itp,this._values)}function h(){return v(this._itp,this._keys,this._values)}function p(){return v(this._itp,this._values,this._values)}function v(e,t,n){var o=[0],r=!1;return e.push(o),{next:function(){var i,u=o[0];return!r&&u<t.length?(i=n?[t[u],n[u]]:t[u],o[0]++):(r=!0,e.splice(e.indexOf(o),1)),{done:r,value:i}}}}function y(){return this._values.length}function m(e,t){for(var n=this.entries();;){var o=n.next();if(o.done)break;e.call(t,o.value[1],o.value[0],this)}}var g,w=Object.defineProperty,_=function(e,t){return e===t||e!==e&&t!==t};"undefined"==typeof WeakMap&&(e.WeakMap=t({delete:o,clear:l,get:r,has:a,set:s},!0)),"undefined"!=typeof Map&&"function"==typeof(new Map).values&&(new Map).values().next||(e.Map=t({delete:o,has:a,get:r,set:s,keys:f,values:d,entries:h,forEach:m,clear:l})),"undefined"!=typeof Set&&"function"==typeof(new Set).values&&(new Set).values().next||(e.Set=t({has:u,add:c,delete:o,clear:l,keys:d,values:d,entries:p,forEach:m})),"undefined"==typeof WeakSet&&(e.WeakSet=t({delete:o,add:c,clear:l,has:u},!0))}(void 0!==E?E:window)}),a(function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t,n,o){n[t]=n[t]||o(),e.exports&&(e.exports=n[t])}("Promise",E,function(){function e(e,t){p.add(e,t),h||(h=y(p.drain))}function n(e){var n,o=void 0===e?"undefined":t(e);return null==e||"object"!=o&&"function"!=o||(n=e.then),"function"==typeof n&&n}function r(){for(var e=0;e<this.chain.length;e++)i(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function i(e,t,o){var r,i;try{!1===t?o.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg),r===o.promise?o.reject(TypeError("Promise-chain cycle")):(i=n(r))?i.call(r,o.resolve,o.reject):o.resolve(r))}catch(e){o.reject(e)}}function u(t){var o,i=this;if(!i.triggered){i.triggered=!0,i.def&&(i=i.def);try{(o=n(t))?e(function(){var e=new c(i);try{o.call(t,function(){u.apply(e,arguments)},function(){a.apply(e,arguments)})}catch(t){a.call(e,t)}}):(i.msg=t,i.state=1,i.chain.length>0&&e(r,i))}catch(e){a.call(new c(i),e)}}}function a(t){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=t,n.state=2,n.chain.length>0&&e(r,n))}function s(e,t,n,o){for(var r=0;r<t.length;r++)!function(r){e.resolve(t[r]).then(function(e){n(r,e)},o)}(r)}function c(e){this.def=e,this.triggered=!1}function l(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function f(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var n=new l(this);this.then=function(t,o){var i={success:"function"!=typeof t||t,failure:"function"==typeof o&&o};return i.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");i.resolve=e,i.reject=t}),n.chain.push(i),0!==n.state&&e(r,n),i.promise},this.catch=function(e){return this.then(void 0,e)};try{t.call(void 0,function(e){u.call(n,e)},function(e){a.call(n,e)})}catch(e){a.call(n,e)}}var d,h,p,v=Object.prototype.toString,y=void 0!==o?function(e){return o(e)}:setTimeout;try{Object.defineProperty({},"x",{}),d=function(e,t,n,o){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==o})}}catch(e){d=function(e,t,n){return e[t]=n,e}}p=function(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,n,o;return{add:function(r,i){o=new e(r,i),n?n.next=o:t=o,n=o,o=void 0},drain:function(){var e=t;for(t=n=h=void 0;e;)e.fn.call(e.self),e=e.next}}}();var m=d({},"constructor",f,!1);return f.prototype=m,d(m,"__NPO__",0,!1),d(f,"resolve",function(e){var n=this;return e&&"object"==(void 0===e?"undefined":t(e))&&1===e.__NPO__?e:new n(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),d(f,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),d(f,"all",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,o){if("function"!=typeof n||"function"!=typeof o)throw TypeError("Not a function");var r=e.length,i=Array(r),u=0;s(t,e,function(e,t){i[e]=t,++u===r&&n(i)},o)})}),d(f,"race",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):new t(function(n,o){if("function"!=typeof n||"function"!=typeof o)throw TypeError("Not a function");s(t,e,function(e,t){n(t)},o)})}),f})})),S=new WeakMap,x=["autopause","autoplay","background","byline","color","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","title","transparent","url","width"],j=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),M=new WeakMap,P=new WeakMap,O=function(){function e(t){var o=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(w(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!n(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var a=t.querySelector("iframe");a&&(t=a)}if("IFRAME"===t.nodeName&&!i(t.getAttribute("src")||""))throw new Error("The player element passed isnt a Vimeo embed.");if(M.has(t))return M.get(t);this.element=t,this.origin="*";var s=new k(function(e,n){var a=function(t){if(i(t.origin)&&o.element.contentWindow===t.source){"*"===o.origin&&(o.origin=t.origin);var n=y(t.data),r="event"in n&&"ready"===n.event,u="method"in n&&"ping"===n.method;if(r||u)return o.element.setAttribute("data-ready","true"),void e();g(o,n)}};if(window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a),"IFRAME"!==o.element.nodeName){var s=h(t,r);p(u(s),s).then(function(e){var n=v(e,t);return o.element=n,o._originalElement=t,d(t,n),M.set(o.element,o),e}).catch(function(e){return n(e)})}});return P.set(this,s),M.set(this.element,this),"IFRAME"===this.element.nodeName&&m(this,"ping"),this}return j(e,[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new k(function(o,r){return t.ready().then(function(){s(t,e,{resolve:o,reject:r}),m(t,e,n)}).catch(function(e){r(e)})})}},{key:"get",value:function(e){var n=this;return new k(function(o,r){return e=t(e,"get"),n.ready().then(function(){s(n,e,{resolve:o,reject:r}),m(n,e)})})}},{key:"set",value:function(e,n){var o=this;return k.resolve(n).then(function(n){if(e=t(e,"set"),void 0===n||null===n)throw new TypeError("There must be a value to set.");return o.ready().then(function(){return new k(function(t,r){s(o,e,{resolve:t,reject:r}),m(o,e,n)})})})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===c(this,"event:"+e).length&&this.callMethod("addEventListener",e).catch(function(){}),s(this,"event:"+e,t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");l(this,"event:"+e,t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=P.get(this)||new k(function(e,t){t("Unknown player. Probably unloaded.")});return k.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new k(function(t){P.delete(e),M.delete(e.element),e._originalElement&&(M.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.remove(),t()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}]),e}();return _||!window.Vimeo||window.Vimeo.Player||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: "+e)};t.forEach(function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=h(e);p(u(t),t).then(function(t){return v(t,e)}).catch(n)}catch(e){n(e)}})}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(t){if(i(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),o=0;o<n.length;o++)if(n[o].contentWindow===t.source){var r=n[o].parentElement;r.style.paddingBottom=t.data.data[0].bottom+"px";break}};window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent&&window.attachEvent("onmessage",t)}()),O})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e(2).setImmediate)},{}],2:[function(e,t,n){(function(t,o){function r(e,t){this._id=e,this._clearFn=t}var i=e(3).nextTick,u=Function.prototype.apply,a=Array.prototype.slice,s={},c=0;n.setTimeout=function(){return new r(u.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new r(u.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,o=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(o?e.apply(null,o):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof o?o:function(e){delete s[e]}}).call(this,e(2).setImmediate,e(2).clearImmediate)},{}],3:[function(e,t,n){function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===o||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function u(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){y&&p&&(y=!1,p.length?v=p.concat(v):m=-1,v.length&&s())}function s(){if(!y){var e=i(a);y=!0;for(var t=v.length;t;){for(p=v,v=[];++m<t;)p&&p[m].run();m=-1,t=v.length}p=null,y=!1,u(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var f,d,h=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:o}catch(e){f=o}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var p,v=[],y=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];v.push(new c(e,t)),1!==v.length||y||i(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],4:[function(e,t,n){(function(t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(){if(!p){p=!0;var e="\n .vjs-vimeo iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n ",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}n.__esModule=!0;var s="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,c=o(s),l=e(1),f=o(l),d=c.default.getComponent("Component"),h=c.default.getTech("Tech"),p=!1,v=function(e){function t(n,o){r(this,t);var u=i(this,e.call(this,n,o));return a(),u.setPoster(n.poster),u.initVimeoPlayer(),u}return u(t,e),t.prototype.initVimeoPlayer=function(){var e=this,t={url:this.options_.source.src,byline:!1,portrait:!1,title:!1};this.options_.autoplay&&(t.autoplay=!0),this.options_.height&&(t.height=this.options_.height),this.options_.width&&(t.width=this.options_.width),this.options_.maxheight&&(t.maxheight=this.options_.maxheight),this.options_.maxwidth&&(t.maxwidth=this.options_.maxwidth),this.options_.loop&&(t.loop=this.options_.loop),this.options_.color&&(t.color=this.options_.color.replace(/^#/,"")),this._player=new f.default(this.el(),t),this.initVimeoState(),this._player.on("loaded",function(){e.trigger("loadedmetadata")}),["play","pause","ended","timeupdate","progress","seeked"].forEach(function(t){e._player.on(t,function(n){e._vimeoState.progress.duration!==n.duration&&e.trigger("durationchange"),"progress"===t?(e._vimeoState.progress.buffered=n.seconds,e._vimeoState.progress.duration=n.duration):(e._vimeoState.progress.seconds=n.seconds,e._vimeoState.progress.percent=n.percent,e._vimeoState.progress.duration=n.duration,n.seconds>e._vimeoState.progress.buffered&&(e._vimeoState.progress.buffered=n.seconds)),e.trigger(t)})}),this._player.on("loaded",function(){e.trigger("loadstart"),e.trigger("loadedmetadata")}),this._player.on("pause",function(){return e._vimeoState.playing=!1}),this._player.on("play",function(){e._vimeoState.playing=!0,e._vimeoState.ended=!1}),this._player.on("ended",function(){e._vimeoState.playing=!1,e._vimeoState.ended=!0}),this._player.on("volumechange",function(t){return e._vimeoState.volume=t}),this._player.on("error",function(t){return e.trigger("error",t)}),this.triggerReady()},t.prototype.initVimeoState=function(){var e=this._vimeoState={ended:!1,playing:!1,volume:0,progress:{seconds:0,percent:0,duration:0,buffered:0}};this._player.getCurrentTime().then(function(t){return e.progress.seconds=t}),this._player.getDuration().then(function(t){return e.progress.duration=t}),this._player.getPaused().then(function(t){return e.playing=!t}),this._player.getVolume().then(function(t){return e.volume=t})},t.prototype.createEl=function(){var e=c.default.dom.createEl("div",{id:this.options_.techId});return e.style.cssText="width:100%;height:100%;top:0;left:0;position:absolute",e.className="vjs-vimeo",e},t.prototype.controls=function(){return!0},t.prototype.supportsFullScreen=function(){return!0},t.prototype.src=function(){return this.options_.source},t.prototype.currentSrc=function(){return this.options_.source.src},t.prototype.currentTime=function(){return this._vimeoState.progress.seconds},t.prototype.setCurrentTime=function(e){this._player.setCurrentTime(e)},t.prototype.volume=function(){return this._vimeoState.volume},t.prototype.setVolume=function(e){return this._player.setVolume(e)},t.prototype.duration=function(){return this._vimeoState.progress.duration},t.prototype.buffered=function(){var e=this._vimeoState.progress;return c.default.createTimeRange(0,e.buffered)},t.prototype.paused=function(){return!this._vimeoState.playing},t.prototype.pause=function(){this._player.pause()},t.prototype.play=function(){return this._player.play()},t.prototype.muted=function(){return 0===this._vimeoState.volume},t.prototype.ended=function(){return this._vimeoState.ended},t.prototype.preload=function(){},t.prototype.load=function(){},t.prototype.reset=function(){},t}(h);v.prototype.featuresTimeupdateEvents=!0,v.isSupported=function(){return!0},h.withSourceHandlers(v),v.nativeSourceHandler={},v.nativeSourceHandler.canPlayType=function(e){return"video/vimeo"===e?"maybe":""},v.nativeSourceHandler.canHandleSource=function(e){return e.type?v.nativeSourceHandler.canPlayType(e.type):e.src?v.nativeSourceHandler.canPlayType(e.src):""},v.nativeSourceHandler.handleSource=function(e,t){t.src(e.src)},v.nativeSourceHandler.dispose=function(){},v.registerSourceHandler(v.nativeSourceHandler),void 0!==h.registerTech?h.registerTech("Vimeo",v):d.registerComponent("Vimeo",v),v.VERSION="0.0.1",n.default=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[4]);