text: webpackJsonpjwplayer([3],{71:function(e,t,n){var a,i;a=[n(76),n(177),n(176),n(175),n(4),n(5),n(2),n(1)],i=function(e,t,n,a,i,r,o,s){var c=a.loadApi(),u={};return function(e,a){function d(){var e=a.get("cast")||{};a.set("castState",{available:!1,active:!1,deviceName:""}),C&&(C.off(),C.reset()),C=new t(e.customAppId),C.on("castState",I),C.on("mediaUpdate",y),C.on("setPlaylist",f),C.updateCastState(),u[a.get("id")]=C;var i=a.chooseProvider;a.chooseProvider=function(e){return a.get("castActive")?n:i(e)}}function l(){}function m(){return a.getVideo()}function v(){a.changeVideoProvider(n),A=m(),A.setService(C)}function f(){C.setPlaylist(a),a.set("state",r.BUFFERING);var e=a.get("playlistItem");A.updateScreen("Connecting",e.image)}function g(){var t,n=a.get("castClicked")&&!C.getPlayerId();n&&C.setPlayerId(a.get("id")),L()&&(e.setFullscreen(!1),v(),C.addListeners(),t=C.getMedia(),t?C.loaded(t):f(),a.on("change:playlist",f))}function p(){var t=a.get("state"),n=t===r.COMPLETE,o=t===r.IDLE,c=t===r.ERROR,u=a.get("item"),d=a.get("playlist"),l=a.get("playlistItem");C.removeListeners(),A&&A.remove(),l&&c?(l=d[u+1],void 0===l?n=!0:(a.set("item",u+1),a.set("playlistItem",l))):l&&!n&&(l=s.extend({},l),l.starttime=l.start=a.get("position")||0),a.set("castActive",!1),a.set("castClicked",!1),a.resetProvider(),a.setProvider(l),a.off("change:playlist",f),l&&(n?(a.stopVideo(),e.trigger(i.JWPLAYER_PLAYLIST_COMPLETE,{})):o||a.loadVideo(l))}function E(e){e?g():A&&p()}function y(e){var t=e.field,n=e.value;if(A){"media"===t&&S(n);var a=A.castEventHandlers[t];a&&a(n)}}function S(e){var t,n=a.get("playlist");if(e.media){t=e.media.metadata;var i=n[t.index];s.isNumber(t.index)&&t.index!==a.get("item")&&(a.set("item",t.index),a.set("playlistItem",i),a.trigger("itemReady",i));var r=a.get("castState").deviceName,o=r?"Casting to "+r:"";A.updateScreen(o,i.image)}}function I(e){var t=a.get("castActive"),n=e.active;t!==n&&E(n),n=n&&L(),a.set("castAvailable",e.available),a.set("castActive",n),a.set("castState",{available:e.available,active:n,deviceName:e.deviceName})}function L(){return C.getPlayerId()===a.get("id")}var A=null,C=u[a.get("id")];c.then(d,l),this.castToggle=o.noop}}.apply(t,a),!(void 0!==i&&(e.exports=i))},83:function(e,t,n){var a=n(8);e.exports=(a["default"]||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,i){return'<div class="jw-cast jw-reset jw-preview">\n  <div class="jw-cast-container">\n    <div class="jw-cast-text jw-reset">\n      '+e.escapeExpression(e.lambda(null!=t?t.message:t,t))+"\n    </div>\n  </div>\n</div>\n"},useData:!0})},175:function(e,t,n){var a,i;a=[n(4),n(14),n(3),n(1)],i=function(e,t,n,a){function i(){return o?s:s=new Promise(function(n,a){var i="__onGCastApiAvailable";o=new t(c),o.addEventListener(e.ERROR,r),o.load(),window[i]=function(e){e?n(e):a()}})}function r(){o.resetEventListeners(),o=null}var o,s,c="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",u=a.extend({loadApi:i},n);return u}.apply(t,a),!(void 0!==i&&(e.exports=i))},176:function(e,t,n){var a,i;a=[n(2),n(83),n(4),n(3),n(5),n(11),n(1)],i=function(e,t,n,a,i,r,o){function s(n,a){var i=e.createElement(t({message:n}));return a&&(i.style.backgroundImage='url("'+a+'")'),i}var c=function(){var t,c,u=this;o.extend(u,a),u.setState=function(e){return r.setState.call(this,e)},u.destroy=function(){clearInterval(u.timeInterval)},u.supportsFullscreen=function(){return!1},u.setService=function(e){c=e,u._castingScreen=u.updateScreen()},u.setup=function(e){u.setState(i.BUFFERING),u.sendCommand("setup",e)},u.init=function(e){u.sendCommand("item",e)},u.load=function(e){u.init(e),u.play()},u.play=function(){u.sendCommand("play")},u.pause=function(){u.sendCommand("pause")},u.seek=function(e){u.trigger(n.JWPLAYER_MEDIA_SEEK,{position:u.getRemote("currentTime"),offset:e}),u.sendCommand("seek",e,function(){u.trigger(n.JWPLAYER_MEDIA_SEEKED)})},u.next=function(e){u.sendCommand("next",e)},u.volume=function(e){u.sendCommand("volume",e)},u.mute=function(e){u.sendCommand("mute",e)},u.sendCommand=function(e){if(c){var t=Array.prototype.slice.call(arguments,1);c[e]&&c[e].apply(c,t)}},u.getRemote=function(e){if(c){var t=c.getMedia();return t?"currentTime"===e?t.getEstimatedTime():t[e]||t.media&&t.media[e]:null}},u.updateScreen=function(e,n){t.innerHTML=s(e,n).outerHTML},u.setContainer=function(e){t=e,u._castingScreen&&e.appendChild(u._castingScreen)},u.getContainer=function(){return t},u.remove=function(){clearInterval(u.timeInterval),u._castingScreen&&t===u._castingScreen.parentNode&&t.removeChild(u._castingScreen),u._castingScreen=null},u.getDuration=function(){return u.getRemote("duration")||1/0},u.stop=u.setControls=u.setCurrentQuality=u.resize=u.seekDrag=u.setVisibility=e.noop,u.setFullScreen=u.getFullScreen=u.checkComplete=o.constant(!1),u.getCurrentQuality=o.constant(0),u.getQualityLevels=o.constant(["Auto"]),u.castEventHandlers={media:function(e){var t=u.getRemote("items"),n="IDLE"===e.playerState&&"FINISHED"===e.idleReason,a="IDLE"===e.playerState&&"ERROR"===e.idleReason,i=n&&!t;u.castEventHandlers.playerState(i?"complete":e.playerState),u.castEventHandlers.currentTime(),clearInterval(u.timeInterval),"PLAYING"===e.playerState?u.timeInterval=setInterval(u.castEventHandlers.currentTime,100):i?(u.setState("complete"),c.disconnect()):a&&(u.setState("error"),c.disconnect())},volume:function(e){u.trigger("volume",{volume:Math.round(100*e.volume)}),u.trigger("mute",{mute:e.isMute})},playerState:function(e){if(e&&i[e.toUpperCase()]){var t=e.toLowerCase();t!==i.IDLE&&t!==i.BUFFERING||u.trigger(n.JWPLAYER_MEDIA_BUFFER,{bufferPercent:0,position:u.getRemote("currentTime"),duration:u.getDuration()}),u.setState(t)}},currentTime:function(){u.trigger(n.JWPLAYER_MEDIA_TIME,{position:u.getRemote("currentTime"),duration:u.getDuration()})},duration:function(){u.trigger(n.JWPLAYER_MEDIA_TIME,{position:u.getRemote("currentTime"),duration:u.getDuration()})},isPaused:function(e){e?u.setState(i.PAUSED):u.setState(i.PLAYING)}}};return c.prototype={getName:function(){return{name:"chromecast"}}},c}.apply(t,a),!(void 0!==i&&(e.exports=i))},177:function(e,t,n){var a,i;a=[n(3),n(2),n(1)],i=function(e,t,n){return function(t){function a(e,t){var a=function(e){var t=!n.size(e.mediaTypes)||!n.contains(e.mediaTypes,'video/webm; codecs="vp9"'),a=!n.size(e.drm)||n.any(e.drm,function(e,t){return"fairplay"!==t});return t&&a},o=e.allSources.slice(0).sort(function(e,t){return!e["default"]&&t["default"]?1:0}),s=n.find(o,a);if(s){var u=r(s.type),d=i(s.file),m=e.image?i(e.image):null,v=s.drm,f=new l.MediaInfo(d,u);return f.metadata=new l.GenericMediaMetadata,f.metadata.title=e.title,f.metadata.subtitle=e.description,f.metadata.index=t||0,f.metadata.playerId=c.getPlayerId(),m&&(f.metadata.images=[{url:m}]),v&&(f.customData={drm:v}),f}}function i(e){var t=document.createElement("a");return t.href=e,t.href}function r(e){switch(e){case"mp4":case"webm":return"video/"+e;case"mpd":case"dash":return"application/dash+xml";case"m3u8":case"hls":return"application/x-mpegURL";case"aac":return"audio/x-aac";case"mp3":return"audio/mpeg";default:return e}}function o(){var e=v.getCastState()!==m.NO_DEVICES_AVAILABLE,t="";f=v.getCurrentSession(),f&&(t=f.getCastDevice().friendlyName||t),c.trigger("castState",{available:e,active:!!f,deviceName:t})}function s(){var e=c.getMedia();e&&c.trigger("mediaUpdate",{field:"media",value:e})}var c=this,u=window.chrome,d=u.cast,l=d.media,m=window.cast.framework,v=m.CastContext.getInstance(),f=null,g=m.CastContextEventType.CAST_STATE_CHANGED,p=t||l.DEFAULT_MEDIA_RECEIVER_APP_ID;n.extend(c,e),v.removeEventListener(g,o),v.addEventListener(g,o),v.setOptions({receiverApplicationId:p,autoJoinPolicy:d.AutoJoinPolicy.ORIGIN_SCOPED}),c.updateCastState=o,c.setPlaylist=function(e){var t,i,r,o=e.get("playlist"),s=e.get("item"),d=e.get("position"),m=e.get("repeat");"complete"===e.get("state")&&(s=0,d=0),i=n.reduce(o,function(e,t,n){var i,r=a(t,n);return r&&(i=new l.QueueItem(r),r.metadata.index===s&&(i.startTime=d),e.push(i)),e},[]),t=new l.QueueLoadRequest(i),t.startIndex=s,m&&(t.repeatMode=u.cast.media.RepeatMode.ALL),r=f.getSessionObj(),r.queueLoad(t,c.loaded,c.error)},c.getPlayerId=function(){var e,t,n=c.getMedia();return n&&n.media?(e=n.media.metadata,e.playerId):f?(t=f.getSessionObj(),t.playerId):null},c.setPlayerId=function(e){var t;f&&(t=f.getSessionObj(),t.playerId=e)},c.loaded=function(e){if(c.trigger("mediaUpdate",{field:"volume",value:{volume:f.getVolume(),isMute:f.isMute()}}),f){var t=f.getSessionObj();t.addMediaListener(function(e){e.addUpdateListener(s)})}e.addUpdateListener(s)},c.addListeners=function(){var e;return f?(e=f.getSessionObj(),e.addUpdateListener(o),void f.addEventListener(m.SessionEventType.VOLUME_CHANGED,function(e){c.trigger("mediaUpdate",{field:"volume",value:e})})):null},c.reset=function(){c.removeListeners(),v&&v.removeEventListener(g,o)},c.removeListeners=function(){var e;return f?(e=f.getSessionObj(),e.removeUpdateListener(o),e.media.forEach(function(e){e.removeUpdateListener(s)}),void f.removeEventListener(m.SessionEventType.VOLUME_CHANGED)):null},c.getMedia=function(){if(f){var e=f.getSessionObj(),t=e.media;if(t&&t.length)return t[0]}return null},c.error=function(e){console.error("Error:",e),c.disconnect()},c.item=function(e){var t=c.getMedia();if(!t)return void c.trigger("setPlaylist");var i=a(e),r=n.find(t.items,function(e){return e.media.contentId===i.contentId&&e.media.index===i.index});r?t.queueJumpToItem(r.itemId):c.trigger("setPlaylist")},c.play=function(){var e=c.getMedia();e&&c.getMedia().play()},c.pause=function(){c.getMedia().pause()},c.next=function(){c.getMedia().queueNext()},c.disconnect=function(){f.endSession(!0)},c.seek=function(e,t){var n=new l.SeekRequest;n.currentTime=e,n.resumeState=l.ResumeState.PLAYBACK_START,c.getMedia().seek(n,t)},c.mute=function(e){f.setMute(e)},c.volume=function(e){f.setVolume(e/100)}}}.apply(t,a),!(void 0!==i&&(e.exports=i))}});