Current Path : C:/xampp/htdocs/moodle/media/player/videojs/amd/build/ |
Current File : C:/xampp/htdocs/moodle/media/player/videojs/amd/build/Youtube-lazy.min.js.map |
{"version":3,"sources":["../src/Youtube-lazy.js"],"names":["root","factory","exports","module","videojs","require","default","define","amd","Youtube","_isOnMobile","browser","IS_IOS","IS_NATIVE_ANDROID","Tech","getTech","extend","constructor","options","ready","call","setPoster","poster","setSrc","options_","source","setTimeout","el_","parentNode","className","isApiReady","initYTPlayer","apiReadyQueue","push","bind","dispose","ytPlayer","stopVideo","destroy","index","indexOf","splice","replace","removeChild","prototype","createEl","div","document","createElement","setAttribute","techId","divWrapper","appendChild","ytControls","divBlocker","onclick","pause","playerVars","controls","modestbranding","rel","showinfo","loop","autohide","disablekb","color","fs","src","srcEndTime","match","end","parseInt","hl","language","substr","list","url","listId","listType","playlist","playsinline","srcStartTime","start","theme","customVars","Object","keys","forEach","key","activeVideoId","videoId","activeList","playerConfig","events","onReady","onPlayerReady","onPlaybackQualityChange","onPlayerPlaybackQualityChange","onPlaybackRateChange","onPlayerPlaybackRateChange","onStateChange","onPlayerStateChange","onVolumeChange","onPlayerVolumeChange","onError","onPlayerError","enablePrivacyEnhancedMode","host","YT","Player","muted","mute","playbackRates","getAvailablePlaybackRates","length","featuresPlaybackRate","playerReady_","triggerReady","playOnReady","play","cueOnReady","cueVideoById_","trigger","e","state","data","lastState","errorNumber","PlayerState","ENDED","PLAYING","isSeeking","onSeeked","PAUSED","BUFFERING","player_","error","code","message","loadVideoById_","id","startSeconds","endSeconds","loadVideoById","cueVideoById","poster_","parseUrl","checkHighResPoster","autoplay","isReady_","setAutoplay","val","setLoop","wasPausedBeforeSeek","playVideo","loadPlaylist","pauseVideo","paused","currentTime","getCurrentTime","setCurrentTime","seconds","timeBeforeSeek","seekTo","clearInterval","checkSeekedInPauseInterval","setInterval","seeking","seekable","createTimeRange","getDuration","playbackRate","getPlaybackRate","setPlaybackRate","suggestedRate","duration","currentSrc","ended","volume","getVolume","setVolume","percentAsDecimal","isMuted","setMuted","unMute","buffered","getVideoLoadedFraction","bufferedEnd","preload","load","reset","networkState","getPlayerState","readyState","supportsFullScreen","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","uri","image","Image","onload","naturalHeight","naturalWidth","height","width","onerror","isSupported","canPlaySource","canPlayType","type","result","apiLoaded","i","loadScript","callback","loaded","tag","firstScriptTag","getElementsByTagName","insertBefore","onreadystatechange","injectCss","head","style","styleSheet","cssText","createTextNode","registerTech","registerComponent"],"mappings":"mSAsBC,UAAUA,CAAV,CAAgBC,CAAhB,CAAyB,CACxB,GAAoB,QAAjB,uBAAOC,CAAAA,OAAP,qBAAOA,OAAP,IAA6C,WAAhB,QAAOC,CAAAA,MAAvC,CAA6D,CAC3D,GAAIC,CAAAA,CAAO,CAAGC,OAAO,CAAC,UAAD,CAArB,CACAF,MAAM,CAACD,OAAP,CAAiBD,CAAO,CAACG,CAAO,CAACE,OAAR,EAAmBF,CAApB,CACzB,CAHD,IAGO,IAAqB,UAAlB,QAAOG,CAAAA,MAAP,EAAgCA,MAAM,CAACC,GAA1C,CAA+C,CACpDD,OAAM,8BAAC,CAAC,0BAAD,CAAD,CAA+B,SAASH,CAAT,CAAiB,CACpD,MAAQJ,CAAAA,CAAI,CAACS,OAAL,CAAeR,CAAO,CAACG,CAAD,CAC/B,CAFK,CAGP,CAJM,IAIA,CACLJ,CAAI,CAACS,OAAL,CAAeR,CAAO,CAACD,CAAI,CAACI,OAAN,CACvB,CACF,CAXA,EAWC,IAXD,CAWO,SAASA,CAAT,CAAkB,CACxB,aADwB,GAGpBM,CAAAA,CAAW,CAAGN,CAAO,CAACO,OAAR,CAAgBC,MAAhB,EAA0BR,CAAO,CAACO,OAAR,CAAgBE,iBAHpC,CAIpBC,CAAI,CAAGV,CAAO,CAACW,OAAR,CAAgB,MAAhB,CAJa,CAMpBN,CAAO,CAAGL,CAAO,CAACY,MAAR,CAAeF,CAAf,CAAqB,CAEjCG,WAA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CAAQ,EACT,CACF,CALD,CAMAE,CAAG,CAACvJ,GAAJ,CAAUA,CACX,CAED,QAAS4J,CAAAA,CAAT,EAAqB,IAOfC,CAAAA,CAAI,CAAGjL,QAAQ,CAACiL,IAAT,EAAiBjL,QAAQ,CAAC6K,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,CAPT,CASfK,CAAK,CAAGlL,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CATO,CAUnBiL,CAAK,CAACd,IAAN,CAAa,UAAb,CAEA,GAAIc,CAAK,CAACC,UAAV,CAAqB,CACnBD,CAAK,CAACC,UAAN,CAAiBC,OAAjB,2OACD,CAFD,IAEO,CACLF,CAAK,CAAC7K,WAAN,CAAkBL,QAAQ,CAACqL,cAAT,4OAAlB,CACD,CAEDJ,CAAI,CAAC5K,WAAL,CAAiB6K,CAAjB,CACD,CAEDxN,CAAO,CAACuB,aAAR,CAAwB,EAAxB,CAEA,GAAwB,WAApB,QAAOe,CAAAA,QAAX,CAAoC,CAClCwK,CAAU,CAAC,oCAAD,CAAuCF,CAAvC,CAAV,CACAU,CAAS,EACV,CAGD,GAAoC,WAAhC,QAAO3N,CAAAA,CAAO,CAACiO,YAAnB,CAAiD,CAC/CjO,CAAO,CAACiO,YAAR,CAAqB,SAArB,CAAgC5N,CAAhC,CACD,CAFD,IAEO,CACLL,CAAO,CAACkO,iBAAR,CAA0B,SAA1B,CAAqC7N,CAArC,CACD,CACF,CAvwBA,CAAD","sourcesContent":["/* The MIT License (MIT)\n\nCopyright (c) 2014-2015 Benoit Tremblay <trembl.ben@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE. */\n/*global define, YT*/\n(function (root, factory) {\n if(typeof exports==='object' && typeof module!=='undefined') {\n var videojs = require('video.js');\n module.exports = factory(videojs.default || videojs);\n } else if(typeof define === 'function' && define.amd) {\n define(['media_videojs/video-lazy'], function(videojs){\n return (root.Youtube = factory(videojs));\n });\n } else {\n root.Youtube = factory(root.videojs);\n }\n}(this, function(videojs) {\n 'use strict';\n\n var _isOnMobile = videojs.browser.IS_IOS || videojs.browser.IS_NATIVE_ANDROID;\n var Tech = videojs.getTech('Tech');\n\n var Youtube = videojs.extend(Tech, {\n\n constructor: function(options, ready) {\n Tech.call(this, options, ready);\n\n this.setPoster(options.poster);\n this.setSrc(this.options_.source, true);\n\n // Set the vjs-youtube class to the player\n // Parent is not set yet so we have to wait a tick\n this.setTimeout(function() {\n if (this.el_) {\n this.el_.parentNode.className += ' vjs-youtube';\n\n if (_isOnMobile) {\n this.el_.parentNode.className += ' vjs-youtube-mobile';\n }\n\n if (Youtube.isApiReady) {\n this.initYTPlayer();\n } else {\n Youtube.apiReadyQueue.push(this);\n }\n }\n }.bind(this));\n },\n\n dispose: function() {\n if (this.ytPlayer) {\n //Dispose of the YouTube Player\n if (this.ytPlayer.stopVideo) {\n this.ytPlayer.stopVideo();\n }\n if (this.ytPlayer.destroy) {\n this.ytPlayer.destroy();\n }\n } else {\n //YouTube API hasn't finished loading or the player is already disposed\n var index = Youtube.apiReadyQueue.indexOf(this);\n if (index !== -1) {\n Youtube.apiReadyQueue.splice(index, 1);\n }\n }\n this.ytPlayer = null;\n\n this.el_.parentNode.className = this.el_.parentNode.className\n .replace(' vjs-youtube', '')\n .replace(' vjs-youtube-mobile', '');\n this.el_.parentNode.removeChild(this.el_);\n\n //Needs to be called after the YouTube player is destroyed, otherwise there will be a null reference exception\n Tech.prototype.dispose.call(this);\n },\n\n createEl: function() {\n var div = document.createElement('div');\n div.setAttribute('id', this.options_.techId);\n div.setAttribute('style', 'width:100%;height:100%;top:0;left:0;position:absolute');\n div.setAttribute('class', 'vjs-tech');\n\n var divWrapper = document.createElement('div');\n divWrapper.appendChild(div);\n\n if (!_isOnMobile && !this.options_.ytControls) {\n var divBlocker = document.createElement('div');\n divBlocker.setAttribute('class', 'vjs-iframe-blocker');\n divBlocker.setAttribute('style', 'position:absolute;top:0;left:0;width:100%;height:100%');\n\n // In case the blocker is still there and we want to pause\n divBlocker.onclick = function() {\n this.pause();\n }.bind(this);\n\n divWrapper.appendChild(divBlocker);\n }\n\n return divWrapper;\n },\n\n initYTPlayer: function() {\n var playerVars = {\n controls: 0,\n modestbranding: 1,\n rel: 0,\n showinfo: 0,\n loop: this.options_.loop ? 1 : 0\n };\n\n // Let the user set any YouTube parameter\n // https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#Parameters\n // To use YouTube controls, you must use ytControls instead\n // To use the loop or autoplay, use the video.js settings\n\n if (typeof this.options_.autohide !== 'undefined') {\n playerVars.autohide = this.options_.autohide;\n }\n\n if (typeof this.options_['cc_load_policy'] !== 'undefined') {\n playerVars['cc_load_policy'] = this.options_['cc_load_policy'];\n }\n\n if (typeof this.options_.ytControls !== 'undefined') {\n playerVars.controls = this.options_.ytControls;\n }\n\n if (typeof this.options_.disablekb !== 'undefined') {\n playerVars.disablekb = this.options_.disablekb;\n }\n\n if (typeof this.options_.color !== 'undefined') {\n playerVars.color = this.options_.color;\n }\n\n if (!playerVars.controls) {\n // Let video.js handle the fullscreen unless it is the YouTube native controls\n playerVars.fs = 0;\n } else if (typeof this.options_.fs !== 'undefined') {\n playerVars.fs = this.options_.fs;\n }\n\n if (this.options_.source.src.indexOf('end=') !== -1) {\n var srcEndTime = this.options_.source.src.match(/end=([0-9]*)/);\n this.options_.end = parseInt(srcEndTime[1]);\n }\n\n if (typeof this.options_.end !== 'undefined') {\n playerVars.end = this.options_.end;\n }\n\n if (typeof this.options_.hl !== 'undefined') {\n playerVars.hl = this.options_.hl;\n } else if (typeof this.options_.language !== 'undefined') {\n // Set the YouTube player on the same language than video.js\n playerVars.hl = this.options_.language.substr(0, 2);\n }\n\n if (typeof this.options_['iv_load_policy'] !== 'undefined') {\n playerVars['iv_load_policy'] = this.options_['iv_load_policy'];\n }\n\n if (typeof this.options_.list !== 'undefined') {\n playerVars.list = this.options_.list;\n } else if (this.url && typeof this.url.listId !== 'undefined') {\n playerVars.list = this.url.listId;\n }\n\n if (typeof this.options_.listType !== 'undefined') {\n playerVars.listType = this.options_.listType;\n }\n\n if (typeof this.options_.modestbranding !== 'undefined') {\n playerVars.modestbranding = this.options_.modestbranding;\n }\n\n if (typeof this.options_.playlist !== 'undefined') {\n playerVars.playlist = this.options_.playlist;\n }\n\n if (typeof this.options_.playsinline !== 'undefined') {\n playerVars.playsinline = this.options_.playsinline;\n }\n\n if (typeof this.options_.rel !== 'undefined') {\n playerVars.rel = this.options_.rel;\n }\n\n if (typeof this.options_.showinfo !== 'undefined') {\n playerVars.showinfo = this.options_.showinfo;\n }\n\n if (this.options_.source.src.indexOf('start=') !== -1) {\n var srcStartTime = this.options_.source.src.match(/start=([0-9]*)/);\n this.options_.start = parseInt(srcStartTime[1]);\n }\n\n if (typeof this.options_.start !== 'undefined') {\n playerVars.start = this.options_.start;\n }\n\n if (typeof this.options_.theme !== 'undefined') {\n playerVars.theme = this.options_.theme;\n }\n\n // Allow undocumented options to be passed along via customVars\n if (typeof this.options_.customVars !== 'undefined') {\n var customVars = this.options_.customVars;\n Object.keys(customVars).forEach(function(key) {\n playerVars[key] = customVars[key];\n });\n }\n\n this.activeVideoId = this.url ? this.url.videoId : null;\n this.activeList = playerVars.list;\n\n var playerConfig = {\n videoId: this.activeVideoId,\n playerVars: playerVars,\n events: {\n onReady: this.onPlayerReady.bind(this),\n onPlaybackQualityChange: this.onPlayerPlaybackQualityChange.bind(this),\n onPlaybackRateChange: this.onPlayerPlaybackRateChange.bind(this),\n onStateChange: this.onPlayerStateChange.bind(this),\n onVolumeChange: this.onPlayerVolumeChange.bind(this),\n onError: this.onPlayerError.bind(this)\n }\n };\n\n if (typeof this.options_.enablePrivacyEnhancedMode !== 'undefined' && this.options_.enablePrivacyEnhancedMode) {\n playerConfig.host = 'https://www.youtube-nocookie.com';\n }\n\n this.ytPlayer = new YT.Player(this.options_.techId, playerConfig);\n },\n\n onPlayerReady: function() {\n if (this.options_.muted) {\n this.ytPlayer.mute();\n }\n\n var playbackRates = this.ytPlayer.getAvailablePlaybackRates();\n if (playbackRates.length > 1) {\n this.featuresPlaybackRate = true;\n }\n\n this.playerReady_ = true;\n this.triggerReady();\n\n if (this.playOnReady) {\n this.play();\n } else if (this.cueOnReady) {\n this.cueVideoById_(this.url.videoId);\n this.activeVideoId = this.url.videoId;\n }\n },\n\n onPlayerPlaybackQualityChange: function() {\n\n },\n\n onPlayerPlaybackRateChange: function() {\n this.trigger('ratechange');\n },\n\n onPlayerStateChange: function(e) {\n var state = e.data;\n\n if (state === this.lastState || this.errorNumber) {\n return;\n }\n\n this.lastState = state;\n\n switch (state) {\n case -1:\n this.trigger('loadstart');\n this.trigger('loadedmetadata');\n this.trigger('durationchange');\n this.trigger('ratechange');\n break;\n\n case YT.PlayerState.ENDED:\n this.trigger('ended');\n break;\n\n case YT.PlayerState.PLAYING:\n this.trigger('timeupdate');\n this.trigger('durationchange');\n this.trigger('playing');\n this.trigger('play');\n\n if (this.isSeeking) {\n this.onSeeked();\n }\n break;\n\n case YT.PlayerState.PAUSED:\n this.trigger('canplay');\n if (this.isSeeking) {\n this.onSeeked();\n } else {\n this.trigger('pause');\n }\n break;\n\n case YT.PlayerState.BUFFERING:\n this.player_.trigger('timeupdate');\n this.player_.trigger('waiting');\n break;\n }\n },\n\n onPlayerVolumeChange: function() {\n this.trigger('volumechange');\n },\n\n onPlayerError: function(e) {\n this.errorNumber = e.data;\n this.trigger('pause');\n this.trigger('error');\n },\n\n error: function() {\n var code = 1000 + this.errorNumber; // as smaller codes are reserved\n switch (this.errorNumber) {\n case 5:\n return { code: code, message: 'Error while trying to play the video' };\n\n case 2:\n case 100:\n return { code: code, message: 'Unable to find the video' };\n\n case 101:\n case 150:\n return {\n code: code,\n message: 'Playback on other Websites has been disabled by the video owner.'\n };\n }\n\n return { code: code, message: 'YouTube unknown error (' + this.errorNumber + ')' };\n },\n\n loadVideoById_: function(id) {\n var options = {\n videoId: id\n };\n if (this.options_.start) {\n options.startSeconds = this.options_.start;\n }\n if (this.options_.end) {\n options.endSeconds = this.options_.end;\n }\n this.ytPlayer.loadVideoById(options);\n },\n\n cueVideoById_: function(id) {\n var options = {\n videoId: id\n };\n if (this.options_.start) {\n options.startSeconds = this.options_.start;\n }\n if (this.options_.end) {\n options.endSeconds = this.options_.end;\n }\n this.ytPlayer.cueVideoById(options);\n },\n\n src: function(src) {\n if (src) {\n this.setSrc({ src: src });\n }\n\n return this.source;\n },\n\n poster: function() {\n // You can't start programmaticlly a video with a mobile\n // through the iframe so we hide the poster and the play button (with CSS)\n if (_isOnMobile) {\n return null;\n }\n\n return this.poster_;\n },\n\n setPoster: function(poster) {\n this.poster_ = poster;\n },\n\n setSrc: function(source) {\n if (!source || !source.src) {\n return;\n }\n\n delete this.errorNumber;\n this.source = source;\n this.url = Youtube.parseUrl(source.src);\n\n if (!this.options_.poster) {\n if (this.url.videoId) {\n // Set the low resolution first\n this.poster_ = 'https://img.youtube.com/vi/' + this.url.videoId + '/0.jpg';\n this.trigger('posterchange');\n\n // Check if their is a high res\n this.checkHighResPoster();\n }\n }\n\n if (this.options_.autoplay && !_isOnMobile) {\n if (this.isReady_) {\n this.play();\n } else {\n this.playOnReady = true;\n }\n } else if (this.activeVideoId !== this.url.videoId) {\n if (this.isReady_) {\n this.cueVideoById_(this.url.videoId);\n this.activeVideoId = this.url.videoId;\n } else {\n this.cueOnReady = true;\n }\n }\n },\n\n autoplay: function() {\n return this.options_.autoplay;\n },\n\n setAutoplay: function(val) {\n this.options_.autoplay = val;\n },\n\n loop: function() {\n return this.options_.loop;\n },\n\n setLoop: function(val) {\n this.options_.loop = val;\n },\n\n play: function() {\n if (!this.url || !this.url.videoId) {\n return;\n }\n\n this.wasPausedBeforeSeek = false;\n\n if (this.isReady_) {\n if (this.url.listId) {\n if (this.activeList === this.url.listId) {\n this.ytPlayer.playVideo();\n } else {\n this.ytPlayer.loadPlaylist(this.url.listId);\n this.activeList = this.url.listId;\n }\n }\n\n if (this.activeVideoId === this.url.videoId) {\n this.ytPlayer.playVideo();\n } else {\n this.loadVideoById_(this.url.videoId);\n this.activeVideoId = this.url.videoId;\n }\n } else {\n this.trigger('waiting');\n this.playOnReady = true;\n }\n },\n\n pause: function() {\n if (this.ytPlayer) {\n this.ytPlayer.pauseVideo();\n }\n },\n\n paused: function() {\n return (this.ytPlayer) ?\n (this.lastState !== YT.PlayerState.PLAYING && this.lastState !== YT.PlayerState.BUFFERING)\n : true;\n },\n\n currentTime: function() {\n return this.ytPlayer ? this.ytPlayer.getCurrentTime() : 0;\n },\n\n setCurrentTime: function(seconds) {\n if (this.lastState === YT.PlayerState.PAUSED) {\n this.timeBeforeSeek = this.currentTime();\n }\n\n if (!this.isSeeking) {\n this.wasPausedBeforeSeek = this.paused();\n }\n\n this.ytPlayer.seekTo(seconds, true);\n this.trigger('timeupdate');\n this.trigger('seeking');\n this.isSeeking = true;\n\n // A seek event during pause does not return an event to trigger a seeked event,\n // so run an interval timer to look for the currentTime to change\n if (this.lastState === YT.PlayerState.PAUSED && this.timeBeforeSeek !== seconds) {\n clearInterval(this.checkSeekedInPauseInterval);\n this.checkSeekedInPauseInterval = setInterval(function() {\n if (this.lastState !== YT.PlayerState.PAUSED || !this.isSeeking) {\n // If something changed while we were waiting for the currentTime to change,\n // clear the interval timer\n clearInterval(this.checkSeekedInPauseInterval);\n } else if (this.currentTime() !== this.timeBeforeSeek) {\n this.trigger('timeupdate');\n this.onSeeked();\n }\n }.bind(this), 250);\n }\n },\n\n seeking: function () {\n return this.isSeeking;\n },\n\n seekable: function () {\n if(!this.ytPlayer) {\n return videojs.createTimeRange();\n }\n\n return videojs.createTimeRange(0, this.ytPlayer.getDuration());\n },\n\n onSeeked: function() {\n clearInterval(this.checkSeekedInPauseInterval);\n this.isSeeking = false;\n\n if (this.wasPausedBeforeSeek) {\n this.pause();\n }\n\n this.trigger('seeked');\n },\n\n playbackRate: function() {\n return this.ytPlayer ? this.ytPlayer.getPlaybackRate() : 1;\n },\n\n setPlaybackRate: function(suggestedRate) {\n if (!this.ytPlayer) {\n return;\n }\n\n this.ytPlayer.setPlaybackRate(suggestedRate);\n },\n\n duration: function() {\n return this.ytPlayer ? this.ytPlayer.getDuration() : 0;\n },\n\n currentSrc: function() {\n return this.source && this.source.src;\n },\n\n ended: function() {\n return this.ytPlayer ? (this.lastState === YT.PlayerState.ENDED) : false;\n },\n\n volume: function() {\n return this.ytPlayer ? this.ytPlayer.getVolume() / 100.0 : 1;\n },\n\n setVolume: function(percentAsDecimal) {\n if (!this.ytPlayer) {\n return;\n }\n\n this.ytPlayer.setVolume(percentAsDecimal * 100.0);\n },\n\n muted: function() {\n return this.ytPlayer ? this.ytPlayer.isMuted() : false;\n },\n\n setMuted: function(mute) {\n if (!this.ytPlayer) {\n return;\n }\n else{\n this.muted(true);\n }\n\n if (mute) {\n this.ytPlayer.mute();\n } else {\n this.ytPlayer.unMute();\n }\n this.setTimeout( function(){\n this.trigger('volumechange');\n }, 50);\n },\n\n buffered: function() {\n if(!this.ytPlayer || !this.ytPlayer.getVideoLoadedFraction) {\n return videojs.createTimeRange();\n }\n\n var bufferedEnd = this.ytPlayer.getVideoLoadedFraction() * this.ytPlayer.getDuration();\n\n return videojs.createTimeRange(0, bufferedEnd);\n },\n\n // TODO: Can we really do something with this on YouTUbe?\n preload: function() {},\n load: function() {},\n reset: function() {},\n networkState: function () {\n if (!this.ytPlayer) {\n return 0; //NETWORK_EMPTY\n }\n switch (this.ytPlayer.getPlayerState()) {\n case -1: //unstarted\n return 0; //NETWORK_EMPTY\n case 3: //buffering\n return 2; //NETWORK_LOADING\n default:\n return 1; //NETWORK_IDLE\n }\n },\n readyState: function () {\n if (!this.ytPlayer) {\n return 0; //HAVE_NOTHING\n }\n switch (this.ytPlayer.getPlayerState()) {\n case -1: //unstarted\n return 0; //HAVE_NOTHING\n case 5: //video cued\n return 1; //HAVE_METADATA\n case 3: //buffering\n return 2; //HAVE_CURRENT_DATA\n default:\n return 4; //HAVE_ENOUGH_DATA\n }\n },\n\n supportsFullScreen: function() {\n return document.fullscreenEnabled ||\n document.webkitFullscreenEnabled ||\n document.mozFullScreenEnabled ||\n document.msFullscreenEnabled;\n },\n\n // Tries to get the highest resolution thumbnail available for the video\n checkHighResPoster: function(){\n var uri = 'https://img.youtube.com/vi/' + this.url.videoId + '/maxresdefault.jpg';\n\n try {\n var image = new Image();\n image.onload = function(){\n // Onload may still be called if YouTube returns the 120x90 error thumbnail\n if('naturalHeight' in image){\n if (image.naturalHeight <= 90 || image.naturalWidth <= 120) {\n return;\n }\n } else if(image.height <= 90 || image.width <= 120) {\n return;\n }\n\n this.poster_ = uri;\n this.trigger('posterchange');\n }.bind(this);\n image.onerror = function(){};\n image.src = uri;\n }\n catch(e){}\n }\n });\n\n Youtube.isSupported = function() {\n return true;\n };\n\n Youtube.canPlaySource = function(e) {\n return Youtube.canPlayType(e.type);\n };\n\n Youtube.canPlayType = function(e) {\n return (e === 'video/youtube');\n };\n\n Youtube.parseUrl = function(url) {\n var result = {\n videoId: null\n };\n\n var regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/;\n var match = url.match(regex);\n\n if (match && match[2].length === 11) {\n result.videoId = match[2];\n }\n\n var regPlaylist = /[?&]list=([^#\\&\\?]+)/;\n match = url.match(regPlaylist);\n\n if(match && match[1]) {\n result.listId = match[1];\n }\n\n return result;\n };\n\n function apiLoaded() {\n YT.ready(function() {\n Youtube.isApiReady = true;\n\n for (var i = 0; i < Youtube.apiReadyQueue.length; ++i) {\n Youtube.apiReadyQueue[i].initYTPlayer();\n }\n });\n }\n\n function loadScript(src, callback) {\n var loaded = false;\n var tag = document.createElement('script');\n var firstScriptTag = document.getElementsByTagName('script')[0];\n if (!firstScriptTag) {\n // when loaded in jest without jsdom setup it doesn't get any element.\n // In jest it doesn't really make sense to do anything, because no one is watching youtube in jest\n return;\n }\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n tag.onload = function () {\n if (!loaded) {\n loaded = true;\n callback();\n }\n };\n tag.onreadystatechange = function () {\n if (!loaded && (this.readyState === 'complete' || this.readyState === 'loaded')) {\n loaded = true;\n callback();\n }\n };\n tag.src = src;\n }\n\n function injectCss() {\n var css = // iframe blocker to catch mouse events\n '.vjs-youtube .vjs-iframe-blocker { display: none; }' +\n '.vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }' +\n '.vjs-youtube .vjs-poster { background-size: cover; }' +\n '.vjs-youtube-mobile .vjs-big-play-button { display: none; }';\n\n var head = document.head || document.getElementsByTagName('head')[0];\n\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (style.styleSheet){\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n\n Youtube.apiReadyQueue = [];\n\n if (typeof document !== 'undefined'){\n loadScript('https://www.youtube.com/iframe_api', apiLoaded);\n injectCss();\n }\n\n // Older versions of VJS5 doesn't have the registerTech function\n if (typeof videojs.registerTech !== 'undefined') {\n videojs.registerTech('Youtube', Youtube);\n } else {\n videojs.registerComponent('Youtube', Youtube);\n }\n}));\n"],"file":"Youtube-lazy.min.js"}