(function(d,f){if("object"===typeof exports&&"undefined"!==typeof module){var e=require("video.js");module.exports=f(e.default||e)}else"function"===typeof define&&define.amd?define(["videojs"],function(e){return d.Youtube=f(e)}):d.Youtube=f(d.videojs)})(this,function(d){function f(){YT.ready(function(){c.isApiReady=!0;for(var a=0;a=b.naturalHeight||120>=b.naturalWidth)return}else if(90>=b.height||120>=b.width)return;this.poster_=a;this.trigger("posterchange")}.bind(this);b.onerror=function(){};b.src=a}catch(l){}}});c.isSupported=function(){return!0};c.canPlaySource=function(a){return c.canPlayType(a.type)};c.canPlayType=function(a){return"video/youtube"=== a};c.parseUrl=function(a){var b={videoId:null},c=a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&\?]*).*/);c&&11===c[2].length&&(b.videoId=c[2]);(c=a.match(/[?&]list=([^#&\?]+)/))&&c[1]&&(b.listId=c[1]);return b};c.apiReadyQueue=[];"undefined"!==typeof document&&(e("https://www.youtube.com/iframe_api",f),k());"undefined"!==typeof d.registerTech?d.registerTech("Youtube",c):d.registerComponent("Youtube",c)});