UNPKG

@odopod/odo-video

Version:
3 lines (2 loc) 19.7 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("screenfull")):"function"==typeof define&&define.amd?define(["screenfull"],t):e.OdoVideo=t(e.screenfull)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={Classes:{BASE:"odo-video",IS_PLAYING:"odo-video--playing",IS_FULLSCREEN:"odo-video--fullscreen",IS_MUTED:"odo-video--muted",IS_BUFFERING:"odo-video--buffering",IS_IDLE:"odo-video--idle",NO_FLEXBOX:"odo-video--no-flexbox",CONTROLS_STACKED:"odo-video__controls--stacked",CONTROLS_HIDDEN:"odo-video__controls--hidden",CONTROLS:"odo-video__controls",PLAY_TOGGLE:"odo-video__play-toggle",PLAY_CONTROL:"odo-video__play-control",PAUSE_CONTROL:"odo-video__pause-control",PROGRESS_CONTAINER:"odo-video__progress-container",PROGRESS_HOLDER:"odo-video__progress-holder",BUFFER:"odo-video__buffer",PROGRESS:"odo-video__progress",CURRENT_TIME:"odo-video__current-time",VOLUME:"odo-video__volume",MUTE_CONTROL:"odo-video__mute-control",UNMUTE_CONTROL:"odo-video__unmute-control",FULLSCREEN:"odo-video__fullscreen",FULLSCREEN_CONTROL:"odo-video__fullscreen-control",EXIT_FULLSCREEN_CONTROL:"odo-video__exit-fullscreen-control",FLEXIBLE_SPACE:"odo-video__flexible-space"},Icons:{FULLSCREEN:'<svg viewBox="0 0 16 16" enable-background="new 0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2H8v2h2.586L8 6.587 9.414 8 12 5.415V8h2V2zM8 9.414L6.586 8 4 10.586V8H2v6h6v-2H5.415z"/></svg>',EXIT_FULLSCREEN:'<svg viewBox="0 0 16 16" enable-background="new 0 0 16 16"><path d="M15 2.4L13.6 1 11 3.6V1H9v6h6V5h-2.6L15 2.4zM5 9H1v2h2.6L1 13.6 2.4 15 5 12.4V15h2V9H5z"/></svg>',AUDIO_ON:'<svg viewBox="0 0 16 16" enable-background="new 0 0 16 16"><path d="M1 5.366v5.294c0 .177.142.32.317.32h2.89c.093 0 .18.034.254.093l4.505 3.743c.16.135.4.018.402-.19l.002-13.25c0-.21-.243-.325-.403-.193L4.47 4.923c-.077.064-.173.098-.27.098H1.33c-.235 0-.33.17-.33.346zm10.292-1.03c-.295-.296-.76-.296-1.057 0-.292.296-.292.775.002 1.07v-.002c.642.652 1.04 1.55 1.04 2.54 0 .992-.396 1.884-1.04 2.535-.294.295-.294.774 0 1.07.143.148.334.222.526.222.19 0 .388-.074.528-.22.91-.922 1.476-2.202 1.476-3.606 0-1.41-.567-2.69-1.476-3.61h.002zm1.71-1.732c-.294-.296-.76-.296-1.053 0-.294.296-.293.772 0 1.066 1.08 1.096 1.754 2.602 1.754 4.273s-.667 3.176-1.753 4.273c-.294.294-.294.77 0 1.067.142.146.337.222.53.222.19 0 .386-.076.526-.222 1.35-1.366 2.19-3.257 2.19-5.34-.008-2.08-.843-3.975-2.194-5.34z"/></svg>',AUDIO_OFF:'<svg viewBox="0 0 16 16" enable-background="new 0 0 16 16"><path d="M1 5.366v5.294c0 .177.142.32.317.32h2.89c.093 0 .18.034.254.093l4.505 3.743c.16.135.4.018.402-.19l.002-13.25c0-.21-.243-.325-.403-.193L4.47 4.923c-.077.064-.173.098-.27.098H1.33c-.235 0-.33.17-.33.346z"/></svg>'},IDLE_TIMEOUT:2e3,Defaults:{controls:1,layoutControls:null,updateControls:null,pauseOnClick:!0},Controls:{NONE:0,INLINE_PROGRESS:1,STACKED_PROGRESS:2,CUSTOM:3},VideoEvents:{LOADED_METADATA:{name:"loadedmetadata",readyState:1},LOADED_DATA:{name:"loadeddata",readyState:2},CAN_PLAY:{name:"canplay",readyState:3},CAN_PLAYTHROUGH:{name:"canplaythrough",readyState:4}}};function s(e){if(s.HAS_LOCAL_STORAGE&&"true"===window.localStorage.getItem("odovideoautoplay"))return Promise.resolve(!0);var t=s.HAS_LOCAL_STORAGE&&parseInt(window.localStorage.getItem("odovideoautoplaytries"),10)||0;return t>2?Promise.resolve(!1):new Promise(function(A){var o=void 0,i=document.createElement("video"),n=function(e){s.HAS_LOCAL_STORAGE&&(window.localStorage.setItem("odovideoautoplay",e),window.localStorage.setItem("odovideoautoplaytries",t+1)),A(e)},l=function e(t){clearTimeout(o),i.removeEventListener("playing",e),n(t&&"playing"===t.type||0!==i.currentTime),i.parentNode.removeChild(i)};e&&"autoplay"in i?(i.style.cssText="position:fixed;top:0;left:0;height:1px;width:1px;opacity:0;",i.src="data:video/mp4;base64,AAAAFGZ0eXBNU05WAAACAE1TTlYAAAOUbW9vdgAAAGxtdmhkAAAAAM9ghv7PYIb+AAACWAAACu8AAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAnh0cmFrAAAAXHRraGQAAAAHz2CG/s9ghv4AAAABAAAAAAAACu8AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAFAAAAA4AAAAAAHgbWRpYQAAACBtZGhkAAAAAM9ghv7PYIb+AAALuAAANq8AAAAAAAAAIWhkbHIAAAAAbWhscnZpZGVBVlMgAAAAAAABAB4AAAABl21pbmYAAAAUdm1oZAAAAAAAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAVdzdGJsAAAAp3N0c2QAAAAAAAAAAQAAAJdhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAFAAOABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAEmNvbHJuY2xjAAEAAQABAAAAL2F2Y0MBTUAz/+EAGGdNQDOadCk/LgIgAAADACAAAAMA0eMGVAEABGjuPIAAAAAYc3R0cwAAAAAAAAABAAAADgAAA+gAAAAUc3RzcwAAAAAAAAABAAAAAQAAABxzdHNjAAAAAAAAAAEAAAABAAAADgAAAAEAAABMc3RzegAAAAAAAAAAAAAADgAAAE8AAAAOAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA4AAAAOAAAAFHN0Y28AAAAAAAAAAQAAA7AAAAA0dXVpZFVTTVQh0k/Ou4hpXPrJx0AAAAAcTVREVAABABIAAAAKVcQAAAAAAAEAAAAAAAAAqHV1aWRVU01UIdJPzruIaVz6ycdAAAAAkE1URFQABAAMAAAAC1XEAAACHAAeAAAABBXHAAEAQQBWAFMAIABNAGUAZABpAGEAAAAqAAAAASoOAAEAZABlAHQAZQBjAHQAXwBhAHUAdABvAHAAbABhAHkAAAAyAAAAA1XEAAEAMgAwADAANQBtAGUALwAwADcALwAwADYAMAA2ACAAMwA6ADUAOgAwAAABA21kYXQAAAAYZ01AM5p0KT8uAiAAAAMAIAAAAwDR4wZUAAAABGjuPIAAAAAnZYiAIAAR//eBLT+oL1eA2Nlb/edvwWZflzEVLlhlXtJvSAEGRA3ZAAAACkGaAQCyJ/8AFBAAAAAJQZoCATP/AOmBAAAACUGaAwGz/wDpgAAAAAlBmgQCM/8A6YEAAAAJQZoFArP/AOmBAAAACUGaBgMz/wDpgQAAAAlBmgcDs/8A6YEAAAAJQZoIBDP/AOmAAAAACUGaCQSz/wDpgAAAAAlBmgoFM/8A6YEAAAAJQZoLBbP/AOmAAAAACkGaDAYyJ/8AFBAAAAAKQZoNBrIv/4cMeQ==",i.setAttribute("autoplay",""),i.setAttribute("muted",""),i.setAttribute("playsinline",""),document.documentElement.appendChild(i),setTimeout(function(){i.addEventListener("playing",l),o=setTimeout(l,1e3)},0)):n(!1)})}s.HAS_LOCAL_STORAGE=function(){try{return window.localStorage.setItem("test","1"),window.localStorage.removeItem("test"),!0}catch(e){return!1}}();var A=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function e(){A(this,e)}return e.prototype.createElement=function(e,t){var s=document.createElement(e);return Object.keys(t).forEach(function(e){s[e]=t[e]}),s},e.prototype.createElements=function(){return{controls:this.createElement("div",{className:t.Classes.CONTROLS}),playToggle:this.createElement("button",{className:t.Classes.PLAY_TOGGLE,title:e.LABEL.PLAY_TOGGLE}),playControl:this.createElement("span",{className:t.Classes.PLAY_CONTROL}),pauseControl:this.createElement("span",{className:t.Classes.PAUSE_CONTROL}),progressContainer:this.createElement("div",{className:t.Classes.PROGRESS_CONTAINER}),progressHolder:this.createElement("div",{className:t.Classes.PROGRESS_HOLDER}),buffer:this.createElement("div",{className:t.Classes.BUFFER}),progress:this.createElement("div",{className:t.Classes.PROGRESS}),currentTime:this.createElement("div",{className:t.Classes.CURRENT_TIME}),volumeToggle:this.createElement("button",{className:t.Classes.VOLUME,title:e.LABEL.VOLUME}),muteControl:this.createElement("span",{className:t.Classes.MUTE_CONTROL,innerHTML:t.Icons.AUDIO_ON}),unmuteControl:this.createElement("span",{className:t.Classes.UNMUTE_CONTROL,innerHTML:t.Icons.AUDIO_OFF}),fullScreenToggle:this.createElement("button",{className:t.Classes.FULLSCREEN,title:e.LABEL.FULLSCREEN}),enterFullscreen:this.createElement("span",{className:t.Classes.FULLSCREEN_CONTROL,innerHTML:t.Icons.FULLSCREEN}),exitFullscreen:this.createElement("span",{className:t.Classes.EXIT_FULLSCREEN_CONTROL,innerHTML:t.Icons.EXIT_FULLSCREEN}),flexibleSpace:this.createElement("div",{className:t.Classes.FLEXIBLE_SPACE})}},e.prototype.create=function(e,s){var A=this.createElements();switch(A.playToggle.appendChild(A.playControl),A.playToggle.appendChild(A.pauseControl),A.volumeToggle.appendChild(A.muteControl),A.volumeToggle.appendChild(A.unmuteControl),A.fullScreenToggle.appendChild(A.enterFullscreen),A.fullScreenToggle.appendChild(A.exitFullscreen),A.progressHolder.appendChild(A.buffer),A.progressHolder.appendChild(A.progress),A.progressContainer.appendChild(A.progressHolder),e){case t.Controls.INLINE_PROGRESS:this._createInline(A);break;case t.Controls.NONE:this._createInline(A),A.controls.classList.add(t.Classes.CONTROLS_HIDDEN);break;case t.Controls.STACKED_PROGRESS:this._createStacked(A);break;case t.Controls.CUSTOM:s(A)}return A.controls},e.prototype._createInline=function(e){e.controls.appendChild(e.playToggle),e.controls.appendChild(e.progressContainer),e.controls.appendChild(e.currentTime),e.controls.appendChild(e.volumeToggle),e.controls.appendChild(e.fullScreenToggle)},e.prototype._createStacked=function(e){e.controls.appendChild(e.progressContainer),e.controls.appendChild(e.playToggle),e.controls.appendChild(e.flexibleSpace),e.controls.appendChild(e.currentTime),e.controls.appendChild(e.volumeToggle),e.controls.appendChild(e.fullScreenToggle),e.controls.classList.add(t.Classes.CONTROLS_STACKED)},e}();o.LABEL={PLAY_TOGGLE:"toggle video playback.",VOLUME:"toggle mute for video.",FULLSCREEN:"toggle video fullscreen mode."};var i,n,l=function(){function e(t,s){A(this,e),this.element=t,this.videoEl=this._findVideoElement(),this.id=Math.random().toString(36).substring(7),this.options=Object.assign({},e.Defaults,s),this.isPlaying=this._isPlaying(),this.isFullscreen=!1,this._idleTimeout=null,this._noFullscreen=!1,this.element.classList.toggle(e.Classes.NO_FLEXBOX,e.NO_FLEXBOX),this._setSourceIds(),this._createControls(),this._saveElements(),this.bindEvents(),this._isMetadataLoaded()&&(this._setProgressDisplay(),this._setBufferDisplay()),this.autoplay=Promise.resolve(e.autoplay)}return e.prototype._bindListeners=function(){this._onMetadataLoaded=this._handleMetadataLoaded.bind(this),this._onClick=this._handleClick.bind(this),this._onPlay=this._handlePlaying.bind(this),this._onPause=this._handlePaused.bind(this),this._onTimeUpdate=this._handleTimeUpdate.bind(this),this._onProgress=this._handleProgress.bind(this),this._onFullscreenToggle=this.toggleFullscreen.bind(this),this._onFullscreenChange=this._fullscreenChanged.bind(this),this._onVolumeToggle=this.toggleVolume.bind(this),this._onProgressClick=this._handleProgressClick.bind(this),this._onSeeking=this._handleSeeking.bind(this),this._onSeeked=this._handleSeeked.bind(this),this._onMouseMove=this._returnFromIdle.bind(this),this._onIdleTimeout=this._wentIdle.bind(this),this._onKeyboardPlaybackToggle=this._handleKeyboardPlaybackToggle.bind(this)},e.prototype.bindEvents=function(){this._bindListeners(),this._waitForMetadata(),this.options.pauseOnClick&&this.videoEl.addEventListener("click",this._onClick),this.videoEl.addEventListener("pause",this._onPause),this.videoEl.addEventListener("playing",this._onPlay),this.videoEl.addEventListener("timeupdate",this._onTimeUpdate),this.videoEl.addEventListener("progress",this._onProgress),this.videoEl.addEventListener("seeking",this._onSeeking),this.videoEl.addEventListener("seeked",this._onSeeked),this.getElementByClass(e.Classes.PLAY_TOGGLE).addEventListener("click",this._onClick),this.getElementByClass(e.Classes.VOLUME).addEventListener("click",this._onVolumeToggle),this.getElementByClass(e.Classes.PROGRESS_HOLDER).addEventListener("click",this._onProgressClick),this.getElementByClass(e.Classes.FULLSCREEN).addEventListener("click",this._onFullscreenToggle),e.screenfull.enabled?(document.addEventListener(e.screenfull.raw.fullscreenchange,this._onFullscreenChange),document.addEventListener(e.screenfull.raw.fullscreenerror,this._onFullscreenChange)):this.videoEl.webkitSupportsFullscreen?(this.videoEl.addEventListener("webkitbeginfullscreen",this._onFullscreenChange),this.videoEl.addEventListener("webkitendfullscreen",this._onFullscreenChange)):this._noFullscreen=!0},e.prototype._isMetadataLoaded=function(){return this.videoEl.readyState>0},e.prototype._waitForMetadata=function(){this._isMetadataLoaded()?this._handleMetadataLoaded():this.videoEl.addEventListener("loadedmetadata",this._onMetadataLoaded)},e.prototype._saveElements=function(){this.currentTimeEl=this.getElementByClass(e.Classes.CURRENT_TIME),this.progressEl=this.getElementByClass(e.Classes.PROGRESS),this.bufferEl=this.getElementByClass(e.Classes.BUFFER)},e.prototype._findVideoElement=function(){return this.element.getElementsByTagName("video")[0]},e.prototype._isPlaying=function(){return!this.videoEl.ended&&!this.videoEl.paused},e.prototype._setSourceIds=function(){var e=this;this.getSourceElements().forEach(function(t){t.id=e.id+t.type.split("/")[1]})},e.prototype.getSourceElements=function(){return Array.from(this.videoEl.getElementsByTagName("source"))},e.prototype.getElement=function(){return this.element},e.prototype.getVideoElement=function(){return this.videoEl},e.prototype.getElementByClass=function(e){return this.element.getElementsByClassName(e)[0]},e.prototype.play=function(){return this.videoEl.play()},e.prototype.pause=function(){this.videoEl.pause()},e.prototype.togglePlayback=function(){this.isPlaying?this.pause():this.play()},e.prototype.getCurrentTime=function(){return this.videoEl.currentTime},e.prototype.setCurrentTime=function(e){this.videoEl.currentTime=e},e.prototype.mute=function(){this.videoEl.volume=0,this.element.classList.add(e.Classes.IS_MUTED)},e.prototype.unmute=function(){this.videoEl.volume=1,this.element.classList.remove(e.Classes.IS_MUTED)},e.prototype.isMuted=function(){return 0===this.videoEl.volume},e.prototype.toggleVolume=function(){this.isMuted()?this.unmute():this.mute()},e.prototype.updateSource=function(t){var s=this,A=e.getVideoType().extension,o=this.getSourceElements().filter(function(e){return e.id===s.id+A})[0],i=t+"."+A;o.setAttribute("src",i),this.videoEl.load(),this._setProgressDisplay(),this._setBufferDisplay(),this._waitForMetadata()},e.prototype.showBuffering=function(){this.element.classList.add(e.Classes.IS_BUFFERING)},e.prototype.hideBuffering=function(){this.element.classList.remove(e.Classes.IS_BUFFERING)},e.getPrettyTime=function(e){var t=Math.floor(e/3600),s=Math.floor((e-3600*t)/60),A=e-3600*t-60*s;A<10&&(A="0"+A);var o=s+":"+A;return t>0&&(s<10&&(o="0"+o),o=t+":"+o),o},e.prototype._createControls=function(){var t=(new e.ControlsCreator).create(this.options.controls,this.options.layoutControls);this.element.appendChild(t)},e.prototype._updateControls=function(){var e=this.getCurrentTime();this._setCurrentTimeDisplay(e),this._setProgressDisplay(),this.options.updateControls&&this.options.updateControls(e)},e.prototype._setCurrentTimeDisplay=function(t){this.currentTimeEl.textContent=e.getPrettyTime(Math.round(t))},e.prototype._setProgressDisplay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.videoEl.currentTime/this.videoEl.duration;this.progressEl.style.width=100*e+"%"},e.prototype._setBufferDisplay=function(){var e=this.videoEl.buffered.length>0?this.videoEl.buffered.end(0)/this.videoEl.duration:0;this.bufferEl.style.width=100*e+"%"},e.prototype.toggleFullscreen=function(){e.screenfull?e.screenfull.toggle(this.element):this._noFullscreen?this._fullscreenChanged():this.videoEl.webkitEnterFullscreen()},e.prototype._fullscreenChanged=function(){this.isFullscreen=!this.isFullscreen,this._toggleFullscreenState()},e.prototype._toggleFullscreenState=function(){this.element.classList.toggle(e.Classes.IS_FULLSCREEN,this.isFullscreen),this.isFullscreen?(this._startIdleTimer(),document.activeElement.blur(),this.element.focus(),this.element.addEventListener("mousemove",this._onMouseMove),document.addEventListener("keyup",this._onKeyboardPlaybackToggle)):(this._returnFromIdle(),clearTimeout(this._idleTimeout),this.element.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("keyup",this._onKeyboardPlaybackToggle))},e.prototype._wentIdle=function(){this.element.classList.add(e.Classes.IS_IDLE)},e.prototype._returnFromIdle=function(){clearTimeout(this._idleTimeout),this._startIdleTimer(),this.element.classList.remove(e.Classes.IS_IDLE)},e.prototype._startIdleTimer=function(){this._idleTimeout=setTimeout(this._onIdleTimeout,e.IDLE_TIMEOUT)},e._getClickOffset=function(e){if("offsetX"in e)return{x:e.offsetX,y:e.offsetY};var t=e.currentTarget.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},e.prototype._handleMetadataLoaded=function(){this.videoEl.removeEventListener("loadedmetadata",this._onMetadataLoaded),this._setCurrentTimeDisplay(this.videoEl.duration)},e.prototype._handleClick=function(){this.togglePlayback()},e.prototype._handlePlaying=function(){this.isPlaying=!0,this.element.classList.toggle(e.Classes.IS_PLAYING,this.isPlaying)},e.prototype._handlePaused=function(){this.isPlaying=!1,this.element.classList.toggle(e.Classes.IS_PLAYING,this.isPlaying)},e.prototype._handleTimeUpdate=function(){this._updateControls()},e.prototype._handleProgress=function(){this._setBufferDisplay()},e.prototype._handleProgressClick=function(t){var s=e._getClickOffset(t),A=t.currentTarget.offsetWidth,o=s.x/A;this._setProgressDisplay(o),this.setCurrentTime(o*this.videoEl.duration)},e.prototype._handleSeeking=function(){(0===this.videoEl.buffered.length||this.videoEl.buffered.end(0)<this.videoEl.currentTime)&&this.showBuffering()},e.prototype._handleSeeked=function(){this.hideBuffering()},e.prototype._handleKeyboardPlaybackToggle=function(t){this._returnFromIdle(),32===e._getWhichKey(t)&&(this.togglePlayback(),t.preventDefault())},e._getWhichKey=function(e){return e.which?e.which:e.charCode||e.keyCode},e.prototype.listenOnData=function(e,t){var s=this,A=void 0;this.videoEl.readyState>e.readyState?t():this.videoEl.addEventListener(e.name,A=function(){s.videoEl.removeEventListener(e.name,A),t()})},e.prototype.dispose=function(){this.videoEl.removeEventListener("click",this._onClick),this.videoEl.removeEventListener("pause",this._onPause),this.videoEl.removeEventListener("playing",this._onPlay),this.videoEl.removeEventListener("timeupdate",this._onTimeUpdate),this.videoEl.removeEventListener("progress",this._onProgress),this.videoEl.removeEventListener("seeking",this._onSeeking),this.videoEl.removeEventListener("seeked",this._onSeeked),this.videoEl.removeEventListener("loadedmetadata",this._onMetadataLoaded),this.getElementByClass(e.Classes.PLAY_TOGGLE).removeEventListener("click",this._onClick),this.getElementByClass(e.Classes.VOLUME).removeEventListener("click",this._onVolumeToggle),this.getElementByClass(e.Classes.PROGRESS_HOLDER).removeEventListener("click",this._onProgressClick),this.getElementByClass(e.Classes.FULLSCREEN).removeEventListener("click",this._onFullscreenToggle);var t=this._onFullscreenChange;e.screenfull.enabled?(document.removeEventListener(e.screenfull.raw.fullscreenchange,t),document.removeEventListener(e.screenfull.raw.fullscreenerror,t)):this.videoEl.webkitSupportsFullscreen&&(this.videoEl.removeEventListener("webkitbeginfullscreen",t),this.videoEl.removeEventListener("webkitendfullscreen",t)),this.element.removeChild(this.getElementByClass(e.Classes.CONTROLS)),this.currentTimeEl=null,this.progressEl=null,this.bufferEl=null,this.element=null,this.videoEl=null},e.getVideoType=function(){return e.support.webm?{extension:"webm",type:"video/webm"}:{extension:"mp4",type:"video/mp4"}},e}();return Object.assign(l,t),l.support=(i=document.createElement("video"),(n=!!i.canPlayType)&&((n=new Boolean(n)).ogg=i.canPlayType('video/ogg; codecs="theora"'),n.h264=i.canPlayType('video/mp4; codecs="avc1.42E01E"'),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"'),n.vp9=i.canPlayType('video/webm; codecs="vp9"'),n.hls=i.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"')),n),l.autoplay=s(l.support),l._autoplayTest=s,l.ControlsCreator=o,l.NO_FLEXBOX=document.all&&document.addEventListener&&!window.atob,l.screenfull=e,l}); //# sourceMappingURL=odo-video.min.js.map