UNPKG

react-player-custom

Version:

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion

1 lines 167 kB
var renderReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t,n){"use strict";e.exports=n(19)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=e.match(t);if(n){var r=n[1];if(r.match(_))return i(r);if(O.test(r))return parseInt(r)}}function i(e){for(var t=0,n=_.exec(e);null!==n;){var r=n,o=b(r,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),n=_.exec(e)}return t}function l(e){return a(e,S)}function u(e){return a(e,T)}function c(){return Math.random().toString(36).substr(2,5)}function s(e){return Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:w.default;return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,a){if(x[e])return void x[e].push(r);x[e]=[r];var i=function(t){x[e].forEach(function(e){return e(t)})};if(n){var l=window[n];window[n]=function(){l&&l(),i(window[t])}}o(e,function(e){e&&a(e),n||i(window[t])})})}function p(e,t,n){var r=(0,C.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,c=E.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var s=u.value;if(e[s]){var f=s.replace(/Config$/,"");if(r=(0,C.default)(r,o({},f,e[s])),n){var p="ReactPlayer: %c"+s+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(p,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(i)throw l}}return r}function d(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(t=[]).concat.apply(t,r),i={},l=Object.keys(e),u=!0,c=!1,s=void 0;try{for(var f,p=l[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;-1===a.indexOf(d)&&(i[d]=e[d])}}catch(e){c=!0,s=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw s}}return i}function y(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}function h(e){return null!==e&&"object"===(void 0===e?"undefined":g(e))}function m(e,t){if("function"==typeof e&&"function"==typeof t)return!0;if(e instanceof Array&&t instanceof Array){if(e.length!==t.length)return!1;for(var n=0;n!==e.length;n++)if(!m(e[n],t[n]))return!1;return!0}if(h(e)&&h(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;var r=!0,o=!1,a=void 0;try{for(var i,l=Object.keys(e)[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var u=i.value;if(!m(e[u],t[u]))return!1}}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return!0}return e===t}function v(e){return"undefined"!=typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=l,t.parseEndTime=u,t.randomString=c,t.queryString=s,t.getSDK=f,t.getConfig=p,t.omit=d,t.callPlayer=y,t.isObject=h,t.isEqual=m,t.isMediaStream=v;var k=n(31),w=r(k),P=n(32),C=r(P),E=n(4),S=/[?&#](?:start|t)=([0-9hms]+)/,T=/[?&#]end=([0-9hms]+)/,_=/(\d+)(h|m|s)/g,O=/^\d+$/,x={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t,n;return n=t=function(t){function n(){var e,t,r,i;o(this,n);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return t=r=a(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),r.config=(0,d.getConfig)(r.props,p.defaultProps,!0),r.getDuration=function(){return r.player?r.player.getDuration():null},r.getCurrentTime=function(){return r.player?r.player.getCurrentTime():null},r.getSecondsLoaded=function(){return r.player?r.player.getSecondsLoaded():null},r.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return r.player?r.player.getInternalPlayer(e):null},r.seekTo=function(e,t){if(!r.player)return null;r.player.seekTo(e,t)},r.ref=function(e){r.player=e},i=t,a(r,i)}return i(n,t),c(n,[{key:"shouldComponentUpdate",value:function(e){return!(0,d.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,d.getConfig)(e,p.defaultProps)}},{key:"render",value:function(){var t=this.config.file,n=t.forceVideo,r=t.forceAudio,o=t.forceHLS,a=t.forceDASH,i=n||r||o||a;if(!e.canPlay(this.props.url)&&!i)return null;var l=this.props,c=l.style,s=l.width,y=l.height,v=l.wrapper,g=(0,d.omit)(this.props,m,p.DEPRECATED_CONFIG_PROPS);return f.default.createElement(v,u({style:u({},c,{width:s,height:y})},g),f.default.createElement(h.default,u({},this.props,{ref:this.ref,activePlayer:e,config:this.config})))}}]),n}(s.Component),t.displayName=e.displayName+"Player",t.propTypes=p.propTypes,t.defaultProps=p.defaultProps,t.canPlay=e.canPlay,n}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=l;var s=n(0),f=r(s),p=n(4),d=n(1),y=n(6),h=r(y),m=Object.keys(p.propTypes)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var r=n(33),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,c=o.default.oneOfType,s=o.default.shape,f=o.default.object,p=o.default.func;t.propTypes={url:c([a,u,f]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:c([a,l]),height:c([a,l]),style:f,progressInterval:l,playsinline:i,pip:i,light:c([i,a]),wrapper:c([a,p,s({render:p.isRequired})]),config:s({soundcloud:s({options:f,preload:i}),youtube:s({playerVars:f,embedOptions:f,preload:i}),facebook:s({appId:a}),dailymotion:s({params:f,preload:i}),vimeo:s({playerOptions:f,preload:i}),file:s({attributes:f,tracks:u,forceVideo:i,forceAudio:i,forceHLS:i,forceDASH:i,hlsOptions:f,hlsVersion:a,dashVersion:a}),wistia:s({options:f}),mixcloud:s({options:f}),twitch:s({options:f})}),onReady:p,onStart:p,onPlay:p,onPause:p,onBuffer:p,onBufferEnd:p,onEnded:p,onError:p,onDuration:p,onSeek:p,onProgress:p,onEnablePIP:p,onDisablePIP:p},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,light:!1,wrapper:"div",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},preload:!1},facebook:{appId:"1309697205772819"},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},preload:!1},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,hlsOptions:{},hlsVersion:"0.10.1",dashVersion:"2.9.2"},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onBufferEnd:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){},onEnablePIP:function(){},onDisablePIP:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){if(g.test(e)){var t=e.match(g);return{listType:"playlist",list:s(t,2)[1]}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.YouTube=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=n(0),p=r(f),d=n(1),y=n(2),h=r(y),m="YT",v=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=/,g=/list=([a-zA-Z0-9_-]+)/,b=t.YouTube=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=d.callPlayer,r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPlay,a=n.onPause,i=n.onBuffer,l=n.onBufferEnd,u=n.onEnded,c=n.onReady,s=n.loop,f=window[m].PlayerState,p=f.PLAYING,d=f.PAUSED,y=f.BUFFERING,h=f.ENDED,v=f.CUED;if(t===p&&(o(),l()),t===d&&a(),t===y&&i(),t===h){var g=!!r.callPlayer("getPlaylist");s&&!g&&r.play(),u()}t===v&&c()},r.mute=function(){r.callPlayer("mute")},r.unmute=function(){r.callPlayer("unMute")},r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),c(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playing,a=r.muted,i=r.playsinline,c=r.controls,s=r.loop,f=r.config,p=r.onError,y=f.youtube,h=y.playerVars,b=y.embedOptions,k=e&&e.match(v)[1];if(t)return g.test(e)?void this.player.loadPlaylist(l(e)):void this.player.cueVideoById({videoId:k,startSeconds:(0,d.parseStartTime)(e)||h.start,endSeconds:(0,d.parseEndTime)(e)||h.end});(0,d.getSDK)("https://www.youtube.com/iframe_api",m,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,u({width:"100%",height:"100%",videoId:k,playerVars:u({autoplay:o?1:0,mute:a?1:0,controls:c?1:0,start:(0,d.parseStartTime)(e),end:(0,d.parseEndTime)(e),origin:window.location.origin,playsinline:i},l(e),h),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return p(e.data)}}},b)),s&&n.player.setLoop(!0))},p)}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e),this.props.playing||this.pause()}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e=u({width:"100%",height:"100%"},this.props.style);return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}]),t}(f.Component);b.displayName="YouTube",b.canPlay=function(e){return v.test(e)},t.default=(0,h.default)(b)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(u),s=n(4),f=n(1),p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.mounted=!1,a.isReady=!1,a.isPlaying=!1,a.isLoading=!0,a.loadOnReady=null,a.startOnPlay=!0,a.seekOnPlay=null,a.onDurationCalled=!1,a.getInternalPlayer=function(e){return a.player?a.player[e]:null},a.progress=function(){if(a.props.url&&a.player&&a.isReady){var e=a.getCurrentTime()||0,t=a.getSecondsLoaded(),n=a.getDuration();if(n){var r={playedSeconds:e,played:e/n};null!==t&&(r.loadedSeconds=t,r.loaded=t/n),r.played===a.prevPlayed&&r.loaded===a.prevLoaded||a.props.onProgress(r),a.prevPlayed=r.played,a.prevLoaded=r.loaded}}a.progressTimeout=setTimeout(a.progress,a.props.progressFrequency||a.props.progressInterval)},a.onReady=function(){if(a.mounted){a.isReady=!0,a.isLoading=!1;var e=a.props,t=e.onReady,n=e.playing,r=e.volume,o=e.muted;t(),o||null===r||a.player.setVolume(r),a.loadOnReady?(a.player.load(a.loadOnReady,!0),a.loadOnReady=null):n&&a.player.play(),a.onDurationCheck()}},a.onPlay=function(){a.isPlaying=!0,a.isLoading=!1;var e=a.props,t=e.onStart,n=e.onPlay,r=e.playbackRate;a.startOnPlay&&(a.player.setPlaybackRate&&a.player.setPlaybackRate(r),t(),a.startOnPlay=!1),n(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onPause=function(e){a.isPlaying=!1,a.isLoading||a.props.onPause(e)},a.onEnded=function(){var e=a.props,t=e.activePlayer,n=e.loop,r=e.onEnded;t.loopOnEnded&&n&&a.seekTo(0),n||(a.isPlaying=!1,r())},a.onError=function(e){a.isLoading=!1,a.props.onError(e)},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.onDurationCalled||(a.props.onDuration(e),a.onDurationCalled=!0):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},a.onLoaded=function(){a.isLoading=!1},a.ref=function(e){e&&(a.player=e)},i=n,o(a,i)}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.player.load(this.props.url),this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.player.stop(),this.player.disablePIP&&this.player.disablePIP(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.url,o=n.playing,a=n.volume,i=n.muted,l=n.playbackRate,u=n.pip,c=n.loop;if(!(0,f.isEqual)(r,e.url)){if(this.isLoading)return console.warn("ReactPlayer: the attempt to load "+e.url+" is being deferred until the player has loaded"),void(this.loadOnReady=e.url);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(e.url,this.isReady)}o||!e.playing||this.isPlaying||this.player.play(),o&&!e.playing&&this.isPlaying&&this.player.pause(),!u&&e.pip&&this.player.enablePIP?this.player.enablePIP():u&&!e.pip&&this.player.disablePIP&&this.player.disablePIP(),a!==e.volume&&null!==e.volume&&this.player.setVolume(e.volume),i!==e.muted&&(e.muted?this.player.mute():(this.player.unmute(),null!==e.volume&&setTimeout(function(){return t.player.setVolume(e.volume)}))),l!==e.playbackRate&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e.playbackRate),c!==e.loop&&this.player.setLoop&&this.player.setLoop(e.loop)}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e,t){var n=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){n.seekOnPlay=null},5e3);if(t?"fraction"===t:e>0&&e<1){var r=this.player.getDuration();return r?void this.player.seekTo(r*e):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return e?c.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded,onLoaded:this.onLoaded,onError:this.onError})):null}}]),t}(u.Component);p.displayName="Player",p.propTypes=s.propTypes,p.defaultProps=s.defaultProps,t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SoundCloud=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/(soundcloud\.com|snd\.sc)\/.+$/,h=t.SoundCloud=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.duration=null,r.currentTime=null,r.fractionLoaded=null,r.mute=function(){r.setVolume(0)},r.unmute=function(){null!==r.props.volume&&r.setVolume(r.props.volume)},r.ref=function(e){r.iframe=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e,t){var n=this;(0,f.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){if(n.iframe){var o=r.Widget.Events,a=o.PLAY,i=o.PLAY_PROGRESS,u=o.PAUSE,c=o.FINISH,s=o.ERROR;t||(n.player=r.Widget(n.iframe),n.player.bind(a,n.props.onPlay),n.player.bind(u,n.props.onPause),n.player.bind(i,function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress}),n.player.bind(c,function(){return n.props.onEnded()}),n.player.bind(s,function(e){return n.props.onError(e)})),n.player.load(e,l({},n.props.config.soundcloud.options,{callback:function(){n.player.getDuration(function(e){n.duration=e/1e3,n.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e=l({width:"100%",height:"100%"},this.props.style);return s.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0,allow:"autoplay"})}}]),t}(c.Component);h.displayName="SoundCloud",h.canPlay=function(e){return y.test(e)},h.loopOnEnded=!0,t.default=(0,d.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Vimeo=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/vimeo\.com\/.+/,h=/vimeo\.com\/external\/.+\.mp4/,m=t.Vimeo=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.duration=null,r.currentTime=null,r.secondsLoaded=null,r.mute=function(){r.setVolume(0)},r.unmute=function(){null!==r.props.volume&&r.setVolume(r.props.volume)},r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e){var t=this;this.duration=null,(0,f.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(n){t.container&&(t.player=new n.Player(t.container,l({url:e,autoplay:t.props.playing,muted:t.props.muted,loop:t.props.loop,playsinline:t.props.playsinline},t.props.config.vimeo.playerOptions)),t.player.ready().then(function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"}).catch(t.props.onError),t.player.on("loaded",function(){t.props.onReady(),t.refreshDuration()}),t.player.on("play",function(){t.props.onPlay(),t.refreshDuration()}),t.player.on("pause",t.props.onPause),t.player.on("seeked",function(e){return t.props.onSeek(e.seconds)}),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var n=e.seconds;t.currentTime=n}),t.player.on("progress",function(e){var n=e.seconds;t.secondsLoaded=n}))},this.props.onError)}},{key:"refreshDuration",value:function(){var e=this;this.player.getDuration().then(function(t){e.duration=t})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=l({width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}]),t}(c.Component);m.displayName="Vimeo",m.canPlay=function(e){return!h.test(e)&&y.test(e)},t.default=(0,d.default)(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DailyMotion=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),d=n(2),y=r(d),h=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/,m=t.DailyMotion=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=p.callPlayer,r.onDurationChange=function(){var e=r.getDuration();r.props.onDuration(e)},r.mute=function(){r.callPlayer("setMuted",!0)},r.unmute=function(){r.callPlayer("setMuted",!1)},r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),c(t,[{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,i=n.playing,c=e.match(h),s=u(c,2),f=s[1];if(this.player)return void this.player.load(f,{start:(0,p.parseStartTime)(e),autoplay:i});(0,p.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(n){if(t.container){var i=n.player;t.player=new i(t.container,{width:"100%",height:"100%",video:f,params:l({controls:r,autoplay:t.props.playing,mute:t.props.muted,start:(0,p.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})}},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e=l({width:"100%",height:"100%",backgroundColor:"black"},this.props.style);return f.default.createElement("div",{style:e},f.default.createElement("div",{ref:this.ref}))}}]),t}(s.Component);m.displayName="DailyMotion",m.canPlay=function(e){return h.test(e)},m.loopOnEnded=!0,t.default=(0,y.default)(m)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var s in n)a.call(n,s)&&(u[s]=n[s]);if(o){l=o(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Facebook=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),f=n(2),p=r(f),d="//connect.facebook.net/en_US/sdk.js",y=/facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,h="facebook-player-",m=t.Facebook=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=s.callPlayer,r.playerID=h+(0,s.randomString)(),r.mute=function(){r.callPlayer("mute")},r.unmute=function(){r.callPlayer("unmute")},i=n,a(r,i)}return i(t,e),l(t,[{key:"load",value:function(e,t){var n=this;if(t)return void(0,s.getSDK)(d,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,s.getSDK)(d,"FB","fbAsyncInit").then(function(e){e.init({appId:n.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.render",function(e){n.props.onLoaded()}),e.Event.subscribe("xfbml.ready",function(e){"video"===e.type&&e.id===n.playerID&&(n.player=e.instance,n.player.subscribe("startedPlaying",n.props.onPlay),n.player.subscribe("paused",n.props.onPause),n.player.subscribe("finishedPlaying",n.props.onEnded),n.player.subscribe("startedBuffering",n.props.onBuffer),n.player.subscribe("finishedBuffering",n.props.onBufferEnd),n.player.subscribe("error",n.props.onError),n.props.muted||n.callPlayer("unmute"),n.props.onReady(),document.getElementById(n.playerID).querySelector("iframe").style.visibility="visible")})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black"};return c.default.createElement("div",{style:e,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"})}}]),t}(u.Component);m.displayName="Facebook",m.canPlay=function(e){return y.test(e)},m.loopOnEnded=!0,t.default=(0,p.default)(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Streamable=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),f=n(2),p=r(f),d=/streamable\.com\/([a-z0-9]+)$/,y=t.Streamable=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=s.callPlayer,r.duration=null,r.currentTime=null,r.secondsLoaded=null,r.mute=function(){r.callPlayer("mute")},r.unmute=function(){r.callPlayer("unmute")},r.ref=function(e){r.iframe=e},i=n,a(r,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this;(0,s.getSDK)("//cdn.embed.ly/player-0.1.0.min.js","playerjs").then(function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.setLoop(t.props.loop),t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var n=e.duration,r=e.seconds;t.duration=n,t.currentTime=r}),t.player.on("buffered",function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)}),t.props.muted&&t.player.mute())},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setLoop",value:function(e){this.callPlayer("setLoop",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(d)[1],t={width:"100%",height:"100%"};return c.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}]),t}(u.Component);y.displayName="Streamable",y.canPlay=function(e){return d.test(e)},t.default=(0,p.default)(y)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Wistia=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/,h=t.Wistia=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.mute=function(){r.callPlayer("mute")},r.unmute=function(){r.callPlayer("unmute")},i=n,a(r,i)}return i(t,e),u(t,[{key:"getID",value:function(e){return e&&e.match(y)[1]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.playing,o=n.muted,a=n.controls,i=n.onReady,u=n.onPlay,c=n.onPause,s=n.onSeek,p=n.onEnded,d=n.config,y=n.onError;(0,f.getSDK)("//fast.wistia.com/assets/external/E-v1.js","Wistia").then(function(){window._wq=window._wq||[],window._wq.push({id:t.getID(e),options:l({autoPlay:r,silentAutoPlay:"allow",muted:o,controlsVisibleOnLoad:a},d.wistia.options),onReady:function(e){t.player=e,t.unbind(),t.player.bind("play",u),t.player.bind("pause",c),t.player.bind("seek",s),t.player.bind("end",p),i()}})},y)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"unbind",value:function(){var e=this.props,t=e.onPlay,n=e.onPause,r=e.onSeek,o=e.onEnded;this.player.unbind("play",t),this.player.unbind("pause",n),this.player.unbind("seek",r),this.player.unbind("end",o)}},{key:"stop",value:function(){this.unbind(),this.callPlayer("remove")}},{key:"seekTo",value:function(e){this.callPlayer("time",e)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,n={width:"100%",height:"100%"};return s.default.createElement("div",{key:e,className:t,style:n})}}]),t}(c.Component);h.displayName="Wistia",h.canPlay=function(e){return y.test(e)},h.loopOnEnded=!0,t.default=(0,d.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Twitch=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,h=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,m="twitch-player-",v=t.Twitch=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.playerID=m+(0,f.randomString)(),r.mute=function(){r.callPlayer("setMuted",!0)},r.unmute=function(){r.callPlayer("setMuted",!1)},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.onError,i=r.config,u=h.test(e),c=u?e.match(h)[1]:e.match(y)[1];if(t)return void(u?this.player.setChannel(c):this.player.setVideo("v"+c));(0,f.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){n.player=new e.Player(n.playerID,l({video:u?"":c,channel:u?c:"",height:"100%",width:"100%",playsinline:o,autoplay:n.props.playing,muted:n.props.muted},i.twitch.options));var t=e.Player,r=t.READY,a=t.PLAYING,s=t.PAUSE,f=t.ENDED;n.player.addEventListener(r,n.props.onReady),n.player.addEventListener(a,n.props.onPlay),n.player.addEventListener(s,n.props.onPause),n.player.addEventListener(f,n.props.onEnded)},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return s.default.createElement("div",{style:e,id:this.playerID})}}]),t}(c.Component);v.displayName="Twitch",v.canPlay=function(e){return y.test(e)||h.test(e)},v.loopOnEnded=!0,t.default=(0,d.default)(v)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Mixcloud=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/mixcloud\.com\/([^\/]+\/[^\/]+)/,h=t.Mixcloud=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.duration=null,r.currentTime=null,r.secondsLoaded=null,r.mute=function(){},r.unmute=function(){},r.ref=function(e){r.iframe=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e){var t=this;(0,f.getSDK)("//widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then(function(e){t.player=e.PlayerWidget(t.iframe),t.player.ready.then(function(){t.player.events.play.on(t.props.onPlay),t.player.events.pause.on(t.props.onPause),t.player.events.ended.on(t.props.onEnded),t.player.events.error.on(t.props.error),t.player.events.progress.on(function(e,n){t.currentTime=e,t.duration=n}),t.props.onReady()})},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.config,r=t.match(y)[1],o={width:"100%",height:"100%"},a=(0,f.queryString)(l({},n.mixcloud.options,{feed:"/"+r+"/"}));return s.default.createElement("iframe",{key:r,ref:this.ref,style:o,src:"https://www.mixcloud.com/widget/iframe/?"+a,frameBorder:"0"})}}]),t}(c.Component);h.displayName="Mixcloud",h.canPlay=function(e){return y.test(e)},h.loopOnEnded=!0,t.default=(0,d.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){if(e instanceof Array){var t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if("string"==typeof i&&l(i))return!0;if(l(i.src))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}return!!(0,d.isMediaStream)(e)||(v.test(e)||g.test(e)||b.test(e)||w.test(e))}function u(e){return l(e)&&!!document.pictureInPictureEnabled&&!v.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FilePlayer=void 0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),p=r(f),d=n(1),y=n(2),h=r(y),m="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,v=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,g=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,b=/\.(m3u8)($|\?)/i,k="https://cdnjs.cloudflare.com/ajax/libs/hls.js/VERSION/hls.min.js",w=/\.(mpd)($|\?)/i,P="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",C=/www\.dropbox\.com\/.+/,E=t.FilePlayer=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.onDisablePIP=function(e){var t