UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

3 lines 22.2 kB
/* @license */ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`kendo.slider.min.js`),require(`kendo.toolbar.min.js`),require(`kendo.dropdownlist.min.js`),require(`kendo.tooltip.min.js`),require(`kendo.icons.min.js`)):typeof define==`function`&&define.amd?define([`exports`,`kendo.slider.min`,`kendo.toolbar.min`,`kendo.dropdownlist.min`,`kendo.tooltip.min`,`kendo.icons.min`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.Mediaplayer={}),e.kendo._globals.Slider,e.kendo._globals.Toolbar,e.kendo._globals.Dropdownlist,e.kendo._globals.Tooltip,e.kendo._globals.Icons))})(this,function(e,t,n,r,i,a){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let o={id:`mediaplayer`,name:`MediaPlayer`,category:`web`,description:``,depends:[`slider`,`toolbar`,`dropdownlist`,`tooltip`,`icons`]};(function(e,t){var n=window.kendo,r=`end`,i=`pause`,a=`play`,o=`ready`,s=`timeChange`,c=`volumeChange`,l=`fullscreen`,u=`fullscreen-exit`,d=`volume-mute`,f=`volume-down`,p=`volume-up`,m=`k-mediaplayer-quality`,h=`play`,g=`pause`,_=`k-mediaplayer-titlebar`,v=`k-title`,y=`k-mediaplayer-toolbar-wrap`,b=`k-mediaplayer-toolbar`,x=`k-mediaplayer-seekbar`,S=`k-mediaplayer-volume`,C=`k-mediaplayer-media`,w=`k-mediaplayer-overlay`,T=`k-mediaplayer-yt`,E=`.`,D=`span[class*="i-`+h+`"]`,O=`span[class*="i-`+g+`"]`,k=`span[class*="i-`+l+`"]`,A=`span[class*="i-`+u+`"]`,j=`span[class*="i-`+d+`"]`,M=`span[class*="i-`+f+`"]`,N=`span[class*="i-`+p+`"]`,P=`.k-draghandle.k-selected`,F=n.ui,I=`.kendoMediaPlayer`,L=new Date(1970,0,1),R=L.getTimezoneOffset()*60,z=n.ui.Widget,B=Array.isArray,V={shortTime:`mm:ss`,longTime:`HH:mm:ss`},H=n.template,U=n.keys,W={htmlPlayer:()=>`<video class='`+C+`'> </video>`,titleBar:H(()=>`<div class='`+_+`'><span class='`+v+`'>Video Title</span></div>`),toolBar:()=>`<div class='`+y+`'><div class='`+b+`'></div></div>`,youtubePlayer:()=>`<div class='`+T+`'> </div>`,toolBarTime:()=>`<span class='k-mediaplayer-currenttime'>00:00:00</span> / <span class='k-mediaplayer-duration'>00:00:00</span>`,slider:()=>`<input class='`+x+`' value='0' title='seekbar' />`,volumeSlider:()=>`<input class='`+S+`' title='volume'/>`,qualityDropDown:()=>`<input class='`+m+`' title='video quality' />`,toolTip:({value:e})=>`${n.toString(new Date(e),`HH:mm:ss`)}`},G=z.extend({init:function(t,r){this.wrapper=e(t),z.fn.init.call(this,t,r),this.wrapper.addClass(`k-mediaplayer k-widget`),r=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),r.fullScreen&&this.fullScreen(!0),r.media&&this.media(this.options.media),n.notify(this)},events:[r,i,a,o,s,c],options:{name:`MediaPlayer`,autoPlay:!1,autoRepeat:!1,volume:100,fullScreen:!1,mute:!1,navigatable:!1,forwardSeek:!0,media:null,messages:{pause:`Pause`,play:`Play`,mute:`Mute`,unmute:`Unmute`,quality:`Quality`,fullscreen:`Full Screen`}},_msToTime:function(e){var t=new Date(L.getTime());return t.setSeconds(e),t},_timeToSec:function(e){return new Date(e).getTime()/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(E+_),this._titleBar.length===0&&(this.wrapper.append(W.titleBar),this._titleBar=this.wrapper.find(E+_))},_createSlider:function(){var e=this.wrapper.find(E+x);this._slider||=(this._sliderDragChangeHandler=this._sliderDragChange.bind(this),this._sliderDraggingHandler=this._sliderDragging.bind(this),e=this.wrapper.find(E+x),new F.Slider(e[0],{smallStep:1e3,tickPlacement:`none`,showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:W.toolTip},dragHandleTitle:this.options.messages.time}))},_createVolumeSlider:function(){var e=this.wrapper.find(E+S);this._volumeSlider||=(this._volumeDraggingHandler=this._volumeDragging.bind(this),this._volumeChangeHandler=this._volumeChange.bind(this),e.width(87),new F.Slider(e[0],{smallStep:1,min:0,max:100,value:this.options.volume,slide:this._volumeDraggingHandler,change:this._volumeChangeHandler,tickPlacement:`none`,showButtons:!1,tooltip:{enabled:!1},dragHandleTitle:this.options.messages.volume}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),e.grep(this._toolBar.options.items,function(e){return!!e.template}).template=W.toolBarTime},_currentUrl:function(){var e=this.media();return B(e.source)?e.source[this._currentIndex].url:e.source},_isYouTubeUrl:function(){return!!this._currentUrl().match(`youtube.com/|youtu.be/`)},_setPlayerUrl:function(){var e=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),e!==this._youTubeVideo&&(this.wrapper.find(E+T).toggle(),this.wrapper.find(E+C).toggle());var t=this._media||this._ytmedia;this._initializePlayer(),t&&(this.mute(this.mute()),this.volume(this.volume())),this._youTubeVideo?this._ytmedia&&(this._videoOverlay&&this._videoOverlay.hide(),this.options.autoPlay?(this._ytmedia.loadVideoById(this._getMediaId()),this._playStateToggle(!0)):(this._ytmedia.cueVideoById(this._getMediaId()),this._playStateToggle(!1))):(this._videoOverlay.show(),this.wrapper.find(E+C+` > source`).remove(),this.wrapper.find(E+C).attr(`src`,this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(E+b);t.length===0&&(this._toolbarClickHandler=this._toolbarClick.bind(this),this.wrapper.append(W.toolBar),t=this.wrapper.find(E+b),t.width(this.wrapper.find(E+C).width()),this._toolBar=new F.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:`button`,attributes:{class:`k-play-button`},icon:`play`,fillMode:`flat`},{template:W.toolBarTime,attributes:{class:`k-mediaplayer-currenttime-wrap`}},{type:`spacer`},{type:`button`,attributes:{class:`k-volume-button`},icon:`volume-up`,fillMode:`flat`},{template:W.volumeSlider,attributes:{class:`k-mediaplayer-volume-wrap`}},{template:W.qualityDropDown,attributes:{class:`k-mediaplayer-quality-wrap`}},{type:`button`,attributes:{class:`k-fullscreen-button`},icon:`fullscreen`,fillMode:`flat`}]}),this._toolBar.wrapper.off(`keydown`),t.before(W.slider),this._volumeButton=t.find(`.k-volume-button`),this._fullscreenButton=t.find(`.k-fullscreen-button`),this._volumeButton.attr(`title`,this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._volumeButton.attr(`aria-label`,this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._fullscreenButton.attr(`title`,this.options.messages.fullscreen),this._fullscreenButton.attr(`aria-label`,this.options.messages.fullscreen),t.width(`auto`),this._currentTimeElement=t.find(`.k-mediaplayer-currenttime`),this._durationElement=t.find(`.k-mediaplayer-duration`),this._playButton=t.find(`.k-play-button`),this._playButtonSpan=this._playButton.find(D),this.options.autoPlay&&this._playStateToggle(!0),n.support.cssFlexbox===!1&&e([this._volumeButton[0],t.find(`.k-mediaplayer-volume-wrap`)[0],t.find(`.k-mediaplayer-quality-wrap`)[0],this._fullscreenButton[0]]).wrapAll(`<div class='k-align-right' />`))},_createDropDown:function(){var e=n.ui.icon(`hd`),t=this.wrapper.find(E+m),r=this.media();t.data(`kendoDropDownList`)===void 0&&(this._dropDownSelectHandler=this._dropDownSelect.bind(this),this._dropDown=new F.DropDownList(t,{dataTextField:`quality`,dataValueField:`url`,popup:{position:`bottom`,origin:`top`,appendTo:this.wrapper},animation:{open:{effects:`slideIn:up`,duration:1}},select:this._dropDownSelectHandler}),r&&B(r.source)&&(this._dropDown.setDataSource(r.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass(`k-button k-button-flat`),this._dropDown.wrapper.attr(`title`,this.options.messages.quality).hide(),this._dropDown.wrapper.find(`span[class*="i-caret-alt-down"]`).replaceWith(e),this._dropDown.list.addClass(`k-quality-list`))},_dropDownSelect:function(e){this._currentIndex!==e.item.index()&&(this._currentIndex=e.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var r=e(t.target).children().first(),i=r.is(D);if(this.media()&&((r.is(D)||r.is(O))&&(i?this.play():this.pause()),(r.is(k)||r.is(A))&&(this._isInFullScreen?(n.ui.icon(r,{icon:l}),this.fullScreen(!1)):(n.ui.icon(r,{icon:u}),this.fullScreen(!0))),r.is(j)||r.is(M)||r.is(N))){var a=this.mute();this.mute(!a)}},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,n=e.sender,r=R*1e3;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&n.value()>this._seekBarLastPosition?setTimeout(function(){n.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-r)):t._media.currentTime=t._timeToSec(e.value-r),t.trigger(s),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,r=t.find(`span`);e===0?(n.ui.icon(r,{icon:d}),t.attr(`title`,this.options.messages.unmute),t.attr(`aria-label`,this.options.messages.unmute)):e>0&&e<51?(n.ui.icon(r,{icon:f}),t.attr(`title`,this.options.messages.mute),t.attr(`aria-label`,this.options.messages.mute)):(n.ui.icon(r,{icon:p}),t.attr(`title`,this.options.messages.mute),t.attr(`aria-label`,this.options.messages.mute))},_volumeDragging:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(c))},_volumeChange:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(c))},_mediaTimeUpdate:function(){var e=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime;e||=0;var t=this._msToTime(e);return this._currentTimeElement.text(n.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=(e+R)*1e3,this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){e===void 0&&(e=this._playButtonSpan.is(D)),e?(n.ui.icon(this._playButtonSpan,{icon:g}),this._playButton.attr(`title`,this.options.messages.pause),this._playButton.attr(`aria-label`,this.options.messages.pause)):(n.ui.icon(this._playButtonSpan,{icon:h}),this._playButton.attr(`title`,this.options.messages.play),this._playButton.attr(`aria-label`,this.options.messages.play))},_mediaEnded:function(){this._playStateToggle(!1),this._currentTimeElement.text(n.toString(this._msToTime(0),this._timeFormat)),this._slider.value((0+R)*1e3),this.trigger(r)},_mediaPlay:function(){this.trigger(a)},_mediaReady:function(){this.trigger(o)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=e.getHours()===0?V.shortTime:V.longTime,this._durationElement.text(n.toString(e,this._timeFormat)),this._slider.setOptions({min:L.getTime(),max:e.getTime()}),this._isFirstRun||=(this._resetTime(),!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=this._mediaTimeUpdate.bind(this),this._mediaDurationChangeHandler=this._mediaDurationChange.bind(this),this.wrapper.prepend(W.youtubePlayer),this._ytPlayer=this.wrapper.find(E+T)[0],e(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),!window.YT||!window.YT.Player?(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],e.getScript(`https://www.youtube.com/iframe_api`),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var e=0;e<window.onYouTubeIframeAPIReadyRegister.length;e++)window.onYouTubeIframeAPIReadyRegister[e]._youtubeApiReady();window.onYouTubeIframeAPIReadyRegister.length=0,window.onYouTubeIframeAPIReadyRegister=t}),window.onYouTubeIframeAPIReadyRegister[window.onYouTubeIframeAPIReadyRegister.length]=this):this._configurePlayer()},_poll:function(e,t,n,r){var i=this;return i._timers[e]!==null&&clearTimeout(i._timers[e]),i._timers[e]=setTimeout((function(r){return function a(){t.call(r)&&(i._timers[e]=setTimeout(a,n))}})(r),n),i._timers[e]},_youtubeApiReady:function(){this._configurePlayer()},_configurePlayer:function(){var e={autoplay:+this.options.autoPlay,wmode:`transparent`,controls:0,rel:0,showinfo:0};this._onYouTubePlayerReady=this._onYouTubePlayerReady.bind(this),window.onYouTubePlayerReady=this._onYouTubePlayerReady,this._onPlayerStateChangeHandler=this._onPlayerStateChange.bind(this),window.onPlayerStateChange=this._onPlayerStateChange,new window.YT.Player(this.wrapper.find(E+T)[0],{height:this.wrapper.height(),width:this.wrapper.width(),videoId:this._getMediaId(),playerVars:e,events:{onReady:this._onYouTubePlayerReady,onStateChange:this._onPlayerStateChangeHandler}})},_onYouTubePlayerReady:function(e){this._ytmedia=e.target,this._ytmedia.getIframe().style.width=`100%`,this._ytmedia.getIframe().style.height=`100%`,this._youTubeVideo=!0,this._mediaDurationChangeHandler(),this.options.autoPlay?(this._playStateToggle(!0),this._ytmedia.loadVideoById(this._getMediaId())):this._ytmedia.cueVideoById(this._getMediaId()),this.options.mute&&this.mute(!0),this.trigger(o)},_updateTitle:function(){this.titlebar().text(this.media().title||this.media().source)},_onPlayerStateChange:function(e){e.data===0?(this._slider.value(0),this._paused=!1,this._playStateToggle(!0),this.trigger(r),this.options.autoRepeat&&this.play()):e.data===1?(this._mediaDurationChange(),this._ytmedia.setVolume(this.volume()),this._sliderChangeFired?this._sliderChangeFired=!1:this._uiDisplay(!1),this.trigger(a),this._playStateToggle(!0),this._poll(`progress`,this._mediaTimeUpdate,500,this),this._paused=!1):e.data===2&&(this._paused||=(this._uiDisplay(!0),this._playStateToggle(!1),this.trigger(i),!0))},_getMediaId:function(){var e=this._currentUrl(),t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);return t&&t[7].length===11&&(e=t[7]),e},_mouseClick:function(){this.isPaused()?this.play():this.pause()},_initializePlayer:function(){this._mouseMoveHandler||(this._mouseMoveHandler=this._mouseMove.bind(this),this._mouseInHandler=this._mouseIn.bind(this),this._mouseOutHandler=this._mouseOut.bind(this),e(this.wrapper).on(`mouseenter`+I,this._mouseInHandler).on(`mouseleave`+I,this._mouseOutHandler).on(`mousemove`+I,this._mouseMoveHandler)),!this._ytmedia&&this._youTubeVideo?this._createYoutubePlayer():!this._media&&!this._youTubeVideo&&this._createHtmlPlayer()},_createHtmlPlayer:function(){this._videoOverlay||=(this._mouseClickHanlder=this._mouseClick.bind(this),this.wrapper.append(`<div class='`+w+`'></div>`),this.wrapper.find(`.k-mediaplayer-overlay`).on(`click`+I,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=this._mediaTimeUpdate.bind(this),this._mediaDurationChangeHandler=this._mediaDurationChange.bind(this),this._mediaEndedHandler=this._mediaEnded.bind(this),this._mediaCanPlayHandler=this._mediaReady.bind(this),this._mediaPlayHandler=this._mediaPlay.bind(this),this._videoOverlay.after(W.htmlPlayer),this._media=this.wrapper.find(E+C)[0],e(this._media).css({width:`100%`,height:`100%`}),this.options.mute&&this.mute(!0),this._media.ontimeupdate=this._mediaTimeUpdateHandler,this._media.ondurationchange=this._mediaDurationChangeHandler,this._media.oncanplay=this._mediaCanPlayHandler,this._media.onplay=this._mediaPlayHandler,this._media.onended=this._mediaEndedHandler,this._media.loop=this.options.autoRepeat},_mouseIn:function(){this._shownOnKeydown||this._uiDisplay(!0)},_mouseOut:function(){this._shownOnKeydown||this._poll(`mouseIdle`,this._mouseIdle,3e3,this)},_mouseIdle:function(){return this._shownOnKeydown||this._uiDisplay(!1),!1},_mouseMove:function(){this._titleBar.is(`:animated`)||this._toolBar.element.is(`:animated`)||this._slider.wrapper.is(`:animated`)||this._uiDisplay(!0),this._poll(`mouseIdle`,this._mouseIdle,3e3,this)},_uiDisplay:function(e,t){var n=t||`slow`,r=this._titleBar.add(this._toolBar.element.parent());e?r.fadeIn(n):(r.fadeOut(n),this.options.navigatable&&this.wrapper.trigger(`focus`))},setOptions:function(e){z.fn.setOptions.call(this,e)},destroy:function(){z.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(I),this.element.find(E+w).off(I),this._timers=null,this._mouseMoveHandler=null,this._mouseOutHandler=null,this._mouseInHandler=null,this._mouseClickHanlder=null,this._keyDownHandler=null,this._fullscreenHandler=null,this._toolbarClickHandler=null,this._sliderDragChangeHandler=null,this._sliderDraggingHandler=null,this._volumeDraggingHandler=null,this._volumeChangeHandler=null,this._youtubeApiReadyHandler=null,this._onYouTubePlayerReady=null,this._onPlayerStateChangeHandler=null,this._dropDownSelectHandler=null,this._youTubeVideo?this._ytmedia.destroy():(this._media.ontimeupdate=this._mediaTimeUpdateHandler=null,this._media.ondurationchange=this._mediaDurationChangeHandler=null,this._media.oncanplay=this._mediaCanPlayHandler=null,this._media.onplay=this._mediaPlayHandler=null,this._media.onended=this._mediaEndedHandler=null,this._media.src=``,this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),n.destroy(this.element)},seek:function(e){if(e===void 0)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var t=e/1e3;return this._youTubeVideo?t+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(t,!0):this._media.currentTime=t,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(n.support.mobileOS&&this._uiDisplay(!1),this._media.play()),this._paused=!1,this._playStateToggle(!0),this},stop:function(){return this._youTubeVideo&&this._ytmedia?this._ytmedia.stopVideo():this._media&&!this._youTubeVideo&&(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause(),this._media.currentTime=0),this._paused=!0,this._playStateToggle(!1),this},pause:function(){return this._youTubeVideo?this._ytmedia.pauseVideo():(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(i),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(e){if(e===void 0)return this._isInFullScreen||!1;var t=this.element.get(0);e?(this.element.addClass(`k-mediaplayer-fullscreen`),t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),this._isInFullScreen=!0):(document.cancelFullscreen?document.cancelFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msCancelFullscreen?document.msCancelFullscreen():document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.element.removeClass(`k-mediaplayer-fullscreen`),this._isInFullScreen=!1),this._slider.resize()},volume:function(e){if(e===void 0)return this._volume===void 0?this._volume=this.options.volume:this._volume;this._volume=e,this.mute(e<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(e)},mute:function(e){var t=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;if(e===void 0||e===t)return t;this._youTubeVideo?e?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=e,e?this._volumeSlider.value(0):this._volumeSlider.value(this._media&&this._media.volume*100||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(c),this._changeVolumeButtonImage(this._volumeSlider.value())},isEnded:function(){return this._youTubeVideo?this._ytmedia.getPlayerState()===0:this._media.ended},media:function(e){var t=this.dropdown();if(e===void 0)return this._mediaData===void 0?this._mediaData=this.options.media:this._mediaData;B(e.source)?(t.setDataSource(e.source),t.wrapper.show()):t.wrapper.hide(),this._mediaData=e,this._updateTitle(),this._setPlayerUrl()},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr(`role`,`region`)},_navigatable:function(){this._fullscreenHandler=this._fullscreen.bind(this),e(document).on(`webkitfullscreenchange mozfullscreenchange fullscreenchange`+I,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr(`tabIndex`,0),this._keyDownHandler=this._keyDown.bind(this),this.wrapper.on(`keydown`+I,this._keyDownHandler))},_fullscreen:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen,t=this.wrapper.find(k);this._uiDisplay(!0),this._slider.resize(),e||(n.ui.icon(t,{icon:l}),this.fullScreen(!1))},_keyIdle:function(){return this._uiDisplay(!1),this._shownOnKeydown=!1,!1},_keyDown:function(e){e.preventDefault();let t=this.wrapper.find(k);if(this._shownOnKeydown=!0,this._uiDisplay(!0,`fast`),this._poll(`keyDown`,this._keyIdle,3e3,this),e.keyCode===U.SPACEBAR)this.isPlaying()?this.pause():this.play();else if(e.keyCode===U.ENTER&&!this._isInFullScreen)n.ui.icon(t,{icon:u}),this.fullScreen(!0);else if(e.keyCode===77){var r=this.mute();this.mute(!r)}else e.keyCode===U.ESC&&this._isInFullScreen?(n.ui.icon(t,{icon:l}),this.fullScreen(!1)):e.keyCode===U.LEFT||e.keyCode===U.RIGHT?(e.preventDefault(),this._volumeSlider.wrapper.find(P).length||this._sliderKeyNav(this._slider,e.keyCode)):e.keyCode===U.UP||e.keyCode===U.DOWN?(e.preventDefault(),this._slider.wrapper.find(P).length||this._sliderKeyNav(this._volumeSlider,e.keyCode)):e.ctrlKey&&(e.keyCode===97||e.keyCode===49)?this._qualityDropDownKeyNav(`decrease`):e.ctrlKey&&(e.keyCode===98||e.keyCode===50)&&this._qualityDropDownKeyNav(`increase`)},_error:function(){},_progress:function(){},_sliderKeyNav:function(e,t){e._setValueInRange(e._keyMap[t](e.options.value))},_qualityDropDownKeyNav:function(e){let t=this._dropDown,n=t.dataSource,r=t.options.dataValueField,i=t.selectedIndex;switch(e){case`increase`:i+=1;break;case`decrease`:--i;break}let a=n.at(i);a&&a[r]&&(t.value(a[r]),this._currentIndex=i,this._setPlayerUrl())}});F.plugin(G)})(window.kendo.jQuery);var s=kendo;e.__meta__=o,e.default=s}); //# sourceMappingURL=kendo.mediaplayer.min.js.map