react-player
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -6,2 +6,6 @@ ### Changelog | ||
#### [v1.6.1](https://github.com/CookPete/react-player/compare/v1.6.0...v1.6.1) | ||
> 20 May 2018 | ||
- Bump HLS.js [`#403`](https://github.com/CookPete/react-player/pull/403) | ||
#### [v1.6.0](https://github.com/CookPete/react-player/compare/v1.5.1...v1.6.0) | ||
@@ -8,0 +12,0 @@ > 17 May 2018 |
@@ -1,2 +0,2 @@ | ||
var ReactPlayer=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=10)}([function(e,t){e.exports=React},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){var t=e.match(k);if(t){var n=t[1];if(n.match(O))return i(n);if(_.test(n))return parseInt(n,10)}return 0}function i(e){for(var t=0,n=O.exec(e);null!==n;){var r=n,o=v(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=O.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e){return Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")}function s(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};return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,o){if(E[e])return void E[e].push(r);E[e]=[r];var a=function(t){E[e].forEach(function(e){return e(t)})};if(n){var i=window[n];window[n]=function(){i&&i(),a(window[t])}}(0,b.default)(e,function(e){e&&o(e),n||a(window[t])})})}function c(e,t,n){var r=(0,P.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=w.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var p=c.replace(/Config$/,"");if(r=(0,P.default)(r,o({},p,e[c])),n){var f="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(f,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return r}function p(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,s=!1,c=void 0;try{for(var p,f=l[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var y=p.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}return i}function f(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 y(e){return null!==e&&"object"===(void 0===e?"undefined":h(e))}function d(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(!d(e[n],t[n]))return!1;return!0}if(y(e)&&y(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(!d(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}Object.defineProperty(t,"__esModule",{value:!0});var h="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},v=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=a,t.randomString=l,t.queryString=u,t.getSDK=s,t.getConfig=c,t.omit=p,t.callPlayer=f,t.isObject=y,t.isEqual=d;var m=n(16),b=r(m),g=n(17),P=r(g),w=n(3),k=/[?&#](?:start|t)=([0-9hms]+)/,O=/(\d+)(h|m|s)/g,_=/^\d+$/,E={}},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),s=0;s<l;s++)u[s]=arguments[s];return t=r=a(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),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){if(!r.player)return null;r.player.seekTo(e)},r.ref=function(e){r.player=e},i=t,a(r,i)}return i(n,t),s(n,[{key:"shouldComponentUpdate",value:function(e){return!(0,y.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,y.getConfig)(e,f.defaultProps)}},{key:"render",value:function(){if(!e.canPlay(this.props.url))return null;var t=this.props,n=t.style,r=t.width,o=t.height,a=t.wrapper,i=(0,y.omit)(this.props,v,f.DEPRECATED_CONFIG_PROPS);return p.default.createElement(a,u({style:u({},n,{width:r,height:o})},i),p.default.createElement(h.default,u({},this.props,{ref:this.ref,activePlayer:e,config:(0,y.getConfig)(this.props,f.defaultProps)})))}}]),n}(c.Component),t.displayName=e.displayName+"Player",t.propTypes=f.propTypes,t.defaultProps=f.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},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}}();t.default=l;var c=n(0),p=r(c),f=n(3),y=n(1),d=n(4),h=r(d),v=Object.keys(f.propTypes);e.exports=t.default},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(11),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,s=o.default.oneOfType,c=o.default.shape,p=o.default.object,f=o.default.func;t.propTypes={url:s([a,u,p]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:s([a,l]),height:s([a,l]),style:p,progressInterval:l,playsinline:i,wrapper:s([a,f]),config:c({soundcloud:c({options:p}),youtube:c({playerVars:p,preload:i}),facebook:c({appId:a}),dailymotion:c({params:p,preload:i}),vimeo:c({playerOptions:p,preload:i}),file:c({attributes:p,tracks:u,forceVideo:i,forceAudio:i,forceHLS:i,forceDASH:i,hlsOptions:p}),wistia:c({options:p}),mixcloud:c({options:p}),twitch:c({options:p})}),onReady:f,onStart:f,onPlay:f,onPause:f,onBuffer:f,onEnded:f,onError:f,onDuration:f,onSeek:f,onProgress:f},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!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},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:{}},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"]},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),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(3),p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];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.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.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.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;if(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(),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)}},{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){var t=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){t.seekOnPlay=null},5e3);if(e>0&&e<1){var n=this.player.getDuration();return n?void this.player.seekTo(n*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 s.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded}))}}]),t}(u.Component);p.displayName="Player",p.propTypes=c.propTypes,p.defaultProps=c.defaultProps,t.default=p,e.exports=t.default},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.YouTube=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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d="YT",h=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,v=t.YouTube=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.callPlayer=p.callPlayer,r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPlay,a=n.onPause,i=n.onBuffer,l=n.onEnded,u=n.onReady,s=window[d].PlayerState,c=s.PLAYING,p=s.PAUSED,f=s.BUFFERING,y=s.ENDED,h=s.CUED;t===c&&o(),t===p&&a(),t===f&&i(),t===y&&l(),t===h&&u()},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),u(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playing,a=r.muted,i=r.playsinline,u=r.controls,s=r.config,c=r.onError,f=e&&e.match(h)[1];if(t)return void this.player.cueVideoById({videoId:f,startSeconds:(0,p.parseStartTime)(e)});(0,p.getSDK)("https://www.youtube.com/iframe_api",d,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,{width:"100%",height:"100%",videoId:f,playerVars:l({autoplay:o?1:0,mute:a?1:0,controls:u?1:0,start:(0,p.parseStartTime)(e),origin:window.location.origin,playsinline:i},s.youtube.playerVars),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return c(e.data)}}}))},c)}},{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)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",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=l({width:"100%",height:"100%"},this.props.style);return c.default.createElement("div",{style:e},c.default.createElement("div",{ref:this.ref}))}}]),t}(s.Component);v.displayName="YouTube",v.canPlay=function(e){return h.test(e)},v.loopOnEnded=!0,t.default=(0,y.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.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(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),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.callPlayer=p.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,p.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,s=o.FINISH,c=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(s,function(){return n.props.onEnded()}),n.player.bind(c,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 c.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}]),t}(s.Component);h.displayName="SoundCloud",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/vimeo\.com\/.+/,h=/vimeo\.com\/external\/.+\.mp4/,v=t.Vimeo=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.callPlayer=p.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,p.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(n){t.container&&(t.player=new n.Player(t.container,l({},t.props.config.vimeo.playerOptions,{url:e,autoplay:t.props.playing,muted:t.props.muted,loop:t.props.loop})),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.player.getDuration().then(function(e){t.duration=e})}),t.player.on("play",t.props.onPlay),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:"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:"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 c.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}]),t}(s.Component);v.displayName="Vimeo",v.canPlay=function(e){return!h.test(e)&&d.test(e)},t.default=(0,y.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.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){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),c=r(s),p=n(1),f=n(2),y=r(f),d=/dailymotion\.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,h=t.DailyMotion=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.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),u(t,[{key:"parseId",value:function(e){var t=e.match(d);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,i=n.playing,u=this.parseId(e);if(this.player)return void this.player.load(u,{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:u,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 c.default.createElement("div",{style:e},c.default.createElement("div",{ref:this.ref}))}}]),t}(s.Component);h.displayName="DailyMotion",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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 e instanceof window.MediaStream||(v.test(e)||m.test(e)||b.test(e)||g.test(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.FilePlayer=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},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}}(),c=n(0),p=r(c),f=n(1),y=n(2),d=r(y),h="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,m=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,b=/\.(m3u8)($|\?)/i,g=/\.(mpd)($|\?)/i,P=/www\.dropbox\.com\/.+/,w=t.FilePlayer=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,s=Array(l),c=0;c<l;c++)s[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onSeek=function(e){r.props.onSeek(e.target.currentTime)},r.mute=function(){r.player.muted=!0},r.unmute=function(){r.player.muted=!1},r.renderSourceElement=function(e,t){return"string"==typeof e?p.default.createElement("source",{key:t,src:e}):p.default.createElement("source",u({key:t},e))},r.renderTrack=function(e,t){return p.default.createElement("track",u({key:t},e))},r.ref=function(e){r.player=e},i=n,a(r,i)}return i(t,e),s(t,[{key:"componentDidMount",value:function(){this.addListeners(),h&&this.player.load()}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError,i=e.playsinline;this.player.addEventListener("canplay",t),this.player.addEventListener("play",n),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",o),this.player.addEventListener("error",a),i&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError;this.player.removeEventListener("canplay",t),this.player.removeEventListener("play",n),this.player.removeEventListener("pause",r),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",o),this.player.removeEventListener("error",a)}},{key:"shouldUseAudio",value:function(e){return!e.config.file.forceVideo&&(!e.config.file.attributes.poster&&(v.test(e.url)||e.config.file.forceAudio))}},{key:"shouldUseHLS",value:function(e){return b.test(e)&&!h||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return g.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;if(this.shouldUseHLS(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.8.9/hls.min.js","Hls").then(function(n){t.hls=new n(t.props.config.file.hlsOptions),t.hls.on(n.Events.ERROR,function(e,r){t.props.onError(e,r,t.hls,n)}),t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.5/dash.all.min.js","dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)}),e instanceof window.MediaStream)try{this.player.srcObject=e}catch(t){this.player.src=window.URL.createObjectURL(e)}}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.destroy(),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){var e=this.player.buffered;if(0===e.length)return 0;var t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}},{key:"getSource",value:function(e){var t=this.shouldUseHLS(e),n=this.shouldUseDASH(e);if(!(e instanceof Array||e instanceof window.MediaStream||t||n))return P.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.playing,r=e.loop,o=e.controls,a=e.muted,i=e.config,l=e.width,s=e.height,c=this.shouldUseAudio(this.props),f=c?"audio":"video",y={width:"auto"===l?l:"100%",height:"auto"===s?s:"100%"};return p.default.createElement(f,u({ref:this.ref,src:this.getSource(t),style:y,preload:"auto",autoPlay:n,controls:o,muted:a,loop:r},i.file.attributes),t instanceof Array&&t.map(this.renderSourceElement),i.file.tracks.map(this.renderTrack))}}]),t}(c.Component);w.displayName="FilePlayer",w.canPlay=l,t.default=(0,d.default)(w)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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 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},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}}(),c=n(0),p=r(c),f=n(3),y=n(1),d=n(18),h=r(d),v=n(4),m=r(v),b=n(9),g=n(24),P=r(g),w=Object.keys(f.propTypes),k=[],ReactPlayer=function(e){function ReactPlayer(){var e,t,n,r;a(this,ReactPlayer);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return t=n=i(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(l))),n.config=(0,y.getConfig)(n.props,f.defaultProps,!0),n.getDuration=function(){return n.player?n.player.getDuration():null},n.getCurrentTime=function(){return n.player?n.player.getCurrentTime():null},n.getSecondsLoaded=function(){return n.player?n.player.getSecondsLoaded():null},n.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null},n.seekTo=function(e){if(!n.player)return null;n.player.seekTo(e)},n.wrapperRef=function(e){n.wrapper=e},n.activePlayerRef=function(e){n.player=e},r=t,i(n,r)}return l(ReactPlayer,e),s(ReactPlayer,[{key:"componentDidMount",value:function(){if(this.props.progressFrequency){console.warn("ReactPlayer: %cprogressFrequency%c is deprecated, please use %cprogressInterval%c instead","font-weight: bold","","font-weight: bold","")}}},{key:"shouldComponentUpdate",value:function(e){return!(0,y.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,y.getConfig)(e,f.defaultProps)}},{key:"getActivePlayer",value:function(e){for(var t=[].concat(o(k),o(h.default)),n=0;n<t.length;n++){var r=t[n];if(r.canPlay(e))return r}return b.FilePlayer}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=this.getActivePlayer(e);return p.default.createElement(m.default,u({},this.props,{key:t.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:t}))}},{key:"sortPlayers",value:function(e,t){return e&&t?e.key<t.key?-1:1:0}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,a=e.height,i=e.wrapper,l=(0,y.omit)(this.props,w,f.DEPRECATED_CONFIG_PROPS),s=this.renderActivePlayer(t),c=(0,P.default)(t,this.config),d=[s].concat(o(c)).sort(this.sortPlayers);return p.default.createElement(i,u({ref:this.wrapperRef,style:u({},n,{width:r,height:a})},l),d)}}]),ReactPlayer}(c.Component);ReactPlayer.addCustomPlayer=function(e){k.push(e)},ReactPlayer.removeCustomPlayers=function(){k=[]},ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=f.propTypes,ReactPlayer.defaultProps=f.defaultProps,ReactPlayer.canPlay=function(e){for(var t=[].concat(o(k),o(h.default)),n=0;n<t.length;n++){if(t[n].canPlay(e))return!0}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=n(12)()},function(e,t,n){"use strict";var r=n(13),o=n(14),a=n(15);e.exports=function(){function e(e,t,n,r,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},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";function r(e,t,n,r,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,l,u],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,n){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&r(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,n),l.onload||o(l,n),i.appendChild(l)}},function(e,t,n){"use strict";function r(e){return!!e&&"object"===(void 0===e?"undefined":p(e))}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||a(e)}function a(e){return e.$$typeof===d}function i(e){return Array.isArray(e)?[]:{}}function l(e,t){return t&&!1===t.clone||!f(e)?e:c(i(e),e,t)}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}function s(e,t,n){var r={};return f(e)&&Object.keys(e).forEach(function(t){r[t]=l(e[t],n)}),Object.keys(t).forEach(function(o){f(t[o])&&e[o]?r[o]=c(e[o],t[o],n):r[o]=l(t[o],n)}),r}function c(e,t,n){var r=Array.isArray(t),o=Array.isArray(e),a=n||{arrayMerge:u};if(r===o)return r?(a.arrayMerge||u)(e,t,n):s(e,t,n);return l(t,n)}Object.defineProperty(t,"__esModule",{value:!0});var p="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},f=function(e){return r(e)&&!o(e)},y="function"==typeof Symbol&&Symbol.for,d=y?Symbol.for("react.element"):60103;c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return c(e,n,t)},{})};var h=c;t.default=h,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(6),a=n(7),i=n(19),l=n(20),u=n(21),s=n(22),c=n(8),p=n(23),f=n(9);t.default=[r.YouTube,o.SoundCloud,a.Vimeo,i.Facebook,l.Streamable,u.Wistia,s.Twitch,c.DailyMotion,p.Mixcloud,f.FilePlayer],e.exports=t.default},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),s=r(u),c=n(1),p=n(2),f=r(p),y="//connect.facebook.net/en_US/sdk.js",d=/facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,h="facebook-player-",v=t.Facebook=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.callPlayer=c.callPlayer,r.playerID=h+(0,c.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,c.getSDK)(y,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,c.getSDK)(y,"FB","fbAsyncInit").then(function(e){e.init({appId:n.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),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("error",n.props.onError),n.props.muted||n.callPlayer("unmute"),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("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 s.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);v.displayName="Facebook",v.canPlay=function(e){return d.test(e)},v.loopOnEnded=!0,t.default=(0,f.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.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),s=r(u),c=n(1),p=n(2),f=r(p),y=/streamable\.com\/([a-z0-9]+)$/,d=t.Streamable=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.callPlayer=c.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,c.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:"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(y)[1],t={width:"100%",height:"100%"};return s.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}]),t}(u.Component);d.displayName="Streamable",d.canPlay=function(e){return y.test(e)},t.default=(0,f.default)(d)},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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(?: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),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.callPlayer=p.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(d)[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,s=n.onPause,c=n.onSeek,f=n.onEnded,y=n.config;(0,p.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},y.wistia.options),onReady:function(e){t.player=e,t.player.bind("play",u),t.player.bind("pause",s),t.player.bind("seek",c),t.player.bind("end",f),i()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){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 c.default.createElement("div",{key:e,className:t,style:n})}}]),t}(s.Component);h.displayName="Wistia",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,h=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,v="twitch-player-",m=t.Twitch=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.callPlayer=p.callPlayer,r.playerID=v+(0,p.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),s=u?e.match(h)[1]:e.match(d)[1];if(t)return void(u?this.player.setChannel(s):this.player.setVideo("v"+s));(0,p.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){n.player=new e.Player(n.playerID,l({video:u?"":s,channel:u?s:"",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.PLAY,c=t.PAUSE,p=t.ENDED;n.player.addEventListener(r,n.props.onReady),n.player.addEventListener(a,n.props.onPlay),n.player.addEventListener(c,n.props.onPause),n.player.addEventListener(p,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 c.default.createElement("div",{style:e,id:this.playerID})}}]),t}(s.Component);m.displayName="Twitch",m.canPlay=function(e){return d.test(e)||h.test(e)},m.loopOnEnded=!0,t.default=(0,y.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.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/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),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.callPlayer=p.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,p.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(d)[1],o={width:"100%",height:"100%"},a=(0,p.queryString)(l({},n.mixcloud.options,{feed:"/"+r+"/"}));return c.default.createElement("iframe",{key:r,ref:this.ref,style:o,src:"https://www.mixcloud.com/widget/iframe/?"+a,frameBorder:"0"})}}]),t}(s.Component);h.displayName="Mixcloud",h.canPlay=function(e){return d.test(e)},t.default=(0,y.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var l,s=y[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;!c.Player.canPlay(e)&&t[c.configKey].preload&&n.push(i.default.createElement(u.default,{key:c.Player.displayName,activePlayer:c.Player,url:c.url,playing:!0,style:{display:"none"}}))}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(0),i=r(a),l=n(4),u=r(l),s=n(5),c=n(6),p=n(7),f=n(8),y=[{Player:s.YouTube,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:c.SoundCloud,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:p.Vimeo,configKey:"vimeo",url:"https://vimeo.com/127250231"},{Player:f.DailyMotion,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];e.exports=t.default}]); | ||
var ReactPlayer=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=10)}([function(e,t){e.exports=React},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){var t=e.match(k);if(t){var n=t[1];if(n.match(O))return i(n);if(_.test(n))return parseInt(n,10)}return 0}function i(e){for(var t=0,n=O.exec(e);null!==n;){var r=n,o=v(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=O.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e){return Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")}function s(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};return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,o){if(E[e])return void E[e].push(r);E[e]=[r];var a=function(t){E[e].forEach(function(e){return e(t)})};if(n){var i=window[n];window[n]=function(){i&&i(),a(window[t])}}(0,b.default)(e,function(e){e&&o(e),n||a(window[t])})})}function c(e,t,n){var r=(0,P.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=w.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var p=c.replace(/Config$/,"");if(r=(0,P.default)(r,o({},p,e[c])),n){var f="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(f,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return r}function p(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,s=!1,c=void 0;try{for(var p,f=l[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var y=p.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}return i}function f(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 y(e){return null!==e&&"object"===(void 0===e?"undefined":h(e))}function d(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(!d(e[n],t[n]))return!1;return!0}if(y(e)&&y(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(!d(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}Object.defineProperty(t,"__esModule",{value:!0});var h="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},v=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=a,t.randomString=l,t.queryString=u,t.getSDK=s,t.getConfig=c,t.omit=p,t.callPlayer=f,t.isObject=y,t.isEqual=d;var m=n(16),b=r(m),g=n(17),P=r(g),w=n(3),k=/[?&#](?:start|t)=([0-9hms]+)/,O=/(\d+)(h|m|s)/g,_=/^\d+$/,E={}},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),s=0;s<l;s++)u[s]=arguments[s];return t=r=a(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),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){if(!r.player)return null;r.player.seekTo(e)},r.ref=function(e){r.player=e},i=t,a(r,i)}return i(n,t),s(n,[{key:"shouldComponentUpdate",value:function(e){return!(0,y.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,y.getConfig)(e,f.defaultProps)}},{key:"render",value:function(){if(!e.canPlay(this.props.url))return null;var t=this.props,n=t.style,r=t.width,o=t.height,a=t.wrapper,i=(0,y.omit)(this.props,v,f.DEPRECATED_CONFIG_PROPS);return p.default.createElement(a,u({style:u({},n,{width:r,height:o})},i),p.default.createElement(h.default,u({},this.props,{ref:this.ref,activePlayer:e,config:(0,y.getConfig)(this.props,f.defaultProps)})))}}]),n}(c.Component),t.displayName=e.displayName+"Player",t.propTypes=f.propTypes,t.defaultProps=f.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},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}}();t.default=l;var c=n(0),p=r(c),f=n(3),y=n(1),d=n(4),h=r(d),v=Object.keys(f.propTypes);e.exports=t.default},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(11),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,s=o.default.oneOfType,c=o.default.shape,p=o.default.object,f=o.default.func;t.propTypes={url:s([a,u,p]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:s([a,l]),height:s([a,l]),style:p,progressInterval:l,playsinline:i,wrapper:s([a,f]),config:c({soundcloud:c({options:p}),youtube:c({playerVars:p,preload:i}),facebook:c({appId:a}),dailymotion:c({params:p,preload:i}),vimeo:c({playerOptions:p,preload:i}),file:c({attributes:p,tracks:u,forceVideo:i,forceAudio:i,forceHLS:i,forceDASH:i,hlsOptions:p}),wistia:c({options:p}),mixcloud:c({options:p}),twitch:c({options:p})}),onReady:f,onStart:f,onPlay:f,onPause:f,onBuffer:f,onEnded:f,onError:f,onDuration:f,onSeek:f,onProgress:f},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!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},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:{}},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"]},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),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(3),p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];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.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.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.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;if(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(),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)}},{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){var t=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){t.seekOnPlay=null},5e3);if(e>0&&e<1){var n=this.player.getDuration();return n?void this.player.seekTo(n*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 s.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded}))}}]),t}(u.Component);p.displayName="Player",p.propTypes=c.propTypes,p.defaultProps=c.defaultProps,t.default=p,e.exports=t.default},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.YouTube=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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d="YT",h=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,v=t.YouTube=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.callPlayer=p.callPlayer,r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPlay,a=n.onPause,i=n.onBuffer,l=n.onEnded,u=n.onReady,s=window[d].PlayerState,c=s.PLAYING,p=s.PAUSED,f=s.BUFFERING,y=s.ENDED,h=s.CUED;t===c&&o(),t===p&&a(),t===f&&i(),t===y&&l(),t===h&&u()},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),u(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playing,a=r.muted,i=r.playsinline,u=r.controls,s=r.config,c=r.onError,f=e&&e.match(h)[1];if(t)return void this.player.cueVideoById({videoId:f,startSeconds:(0,p.parseStartTime)(e)});(0,p.getSDK)("https://www.youtube.com/iframe_api",d,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,{width:"100%",height:"100%",videoId:f,playerVars:l({autoplay:o?1:0,mute:a?1:0,controls:u?1:0,start:(0,p.parseStartTime)(e),origin:window.location.origin,playsinline:i},s.youtube.playerVars),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return c(e.data)}}}))},c)}},{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)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",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=l({width:"100%",height:"100%"},this.props.style);return c.default.createElement("div",{style:e},c.default.createElement("div",{ref:this.ref}))}}]),t}(s.Component);v.displayName="YouTube",v.canPlay=function(e){return h.test(e)},v.loopOnEnded=!0,t.default=(0,y.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.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(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),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.callPlayer=p.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,p.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,s=o.FINISH,c=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(s,function(){return n.props.onEnded()}),n.player.bind(c,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 c.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}]),t}(s.Component);h.displayName="SoundCloud",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/vimeo\.com\/.+/,h=/vimeo\.com\/external\/.+\.mp4/,v=t.Vimeo=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.callPlayer=p.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,p.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(n){t.container&&(t.player=new n.Player(t.container,l({},t.props.config.vimeo.playerOptions,{url:e,autoplay:t.props.playing,muted:t.props.muted,loop:t.props.loop})),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.player.getDuration().then(function(e){t.duration=e})}),t.player.on("play",t.props.onPlay),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:"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:"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 c.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}]),t}(s.Component);v.displayName="Vimeo",v.canPlay=function(e){return!h.test(e)&&d.test(e)},t.default=(0,y.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.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){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),c=r(s),p=n(1),f=n(2),y=r(f),d=/dailymotion\.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,h=t.DailyMotion=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.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),u(t,[{key:"parseId",value:function(e){var t=e.match(d);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,i=n.playing,u=this.parseId(e);if(this.player)return void this.player.load(u,{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:u,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 c.default.createElement("div",{style:e},c.default.createElement("div",{ref:this.ref}))}}]),t}(s.Component);h.displayName="DailyMotion",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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 e instanceof window.MediaStream||(v.test(e)||m.test(e)||b.test(e)||g.test(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.FilePlayer=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},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}}(),c=n(0),p=r(c),f=n(1),y=n(2),d=r(y),h="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,m=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,b=/\.(m3u8)($|\?)/i,g=/\.(mpd)($|\?)/i,P=/www\.dropbox\.com\/.+/,w=t.FilePlayer=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,s=Array(l),c=0;c<l;c++)s[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onSeek=function(e){r.props.onSeek(e.target.currentTime)},r.mute=function(){r.player.muted=!0},r.unmute=function(){r.player.muted=!1},r.renderSourceElement=function(e,t){return"string"==typeof e?p.default.createElement("source",{key:t,src:e}):p.default.createElement("source",u({key:t},e))},r.renderTrack=function(e,t){return p.default.createElement("track",u({key:t},e))},r.ref=function(e){r.player=e},i=n,a(r,i)}return i(t,e),s(t,[{key:"componentDidMount",value:function(){this.addListeners(),h&&this.player.load()}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError,i=e.playsinline;this.player.addEventListener("canplay",t),this.player.addEventListener("play",n),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",o),this.player.addEventListener("error",a),i&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError;this.player.removeEventListener("canplay",t),this.player.removeEventListener("play",n),this.player.removeEventListener("pause",r),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",o),this.player.removeEventListener("error",a)}},{key:"shouldUseAudio",value:function(e){return!e.config.file.forceVideo&&(!e.config.file.attributes.poster&&(v.test(e.url)||e.config.file.forceAudio))}},{key:"shouldUseHLS",value:function(e){return b.test(e)&&!h||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return g.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;if(this.shouldUseHLS(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.9.1/hls.min.js","Hls").then(function(n){t.hls=new n(t.props.config.file.hlsOptions),t.hls.on(n.Events.ERROR,function(e,r){t.props.onError(e,r,t.hls,n)}),t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.5/dash.all.min.js","dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)}),e instanceof window.MediaStream)try{this.player.srcObject=e}catch(t){this.player.src=window.URL.createObjectURL(e)}}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.destroy(),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){var e=this.player.buffered;if(0===e.length)return 0;var t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}},{key:"getSource",value:function(e){var t=this.shouldUseHLS(e),n=this.shouldUseDASH(e);if(!(e instanceof Array||e instanceof window.MediaStream||t||n))return P.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.playing,r=e.loop,o=e.controls,a=e.muted,i=e.config,l=e.width,s=e.height,c=this.shouldUseAudio(this.props),f=c?"audio":"video",y={width:"auto"===l?l:"100%",height:"auto"===s?s:"100%"};return p.default.createElement(f,u({ref:this.ref,src:this.getSource(t),style:y,preload:"auto",autoPlay:n,controls:o,muted:a,loop:r},i.file.attributes),t instanceof Array&&t.map(this.renderSourceElement),i.file.tracks.map(this.renderTrack))}}]),t}(c.Component);w.displayName="FilePlayer",w.canPlay=l,t.default=(0,d.default)(w)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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 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},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}}(),c=n(0),p=r(c),f=n(3),y=n(1),d=n(18),h=r(d),v=n(4),m=r(v),b=n(9),g=n(24),P=r(g),w=Object.keys(f.propTypes),k=[],ReactPlayer=function(e){function ReactPlayer(){var e,t,n,r;a(this,ReactPlayer);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return t=n=i(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(l))),n.config=(0,y.getConfig)(n.props,f.defaultProps,!0),n.getDuration=function(){return n.player?n.player.getDuration():null},n.getCurrentTime=function(){return n.player?n.player.getCurrentTime():null},n.getSecondsLoaded=function(){return n.player?n.player.getSecondsLoaded():null},n.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null},n.seekTo=function(e){if(!n.player)return null;n.player.seekTo(e)},n.wrapperRef=function(e){n.wrapper=e},n.activePlayerRef=function(e){n.player=e},r=t,i(n,r)}return l(ReactPlayer,e),s(ReactPlayer,[{key:"componentDidMount",value:function(){if(this.props.progressFrequency){console.warn("ReactPlayer: %cprogressFrequency%c is deprecated, please use %cprogressInterval%c instead","font-weight: bold","","font-weight: bold","")}}},{key:"shouldComponentUpdate",value:function(e){return!(0,y.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,y.getConfig)(e,f.defaultProps)}},{key:"getActivePlayer",value:function(e){for(var t=[].concat(o(k),o(h.default)),n=0;n<t.length;n++){var r=t[n];if(r.canPlay(e))return r}return b.FilePlayer}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=this.getActivePlayer(e);return p.default.createElement(m.default,u({},this.props,{key:t.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:t}))}},{key:"sortPlayers",value:function(e,t){return e&&t?e.key<t.key?-1:1:0}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,a=e.height,i=e.wrapper,l=(0,y.omit)(this.props,w,f.DEPRECATED_CONFIG_PROPS),s=this.renderActivePlayer(t),c=(0,P.default)(t,this.config),d=[s].concat(o(c)).sort(this.sortPlayers);return p.default.createElement(i,u({ref:this.wrapperRef,style:u({},n,{width:r,height:a})},l),d)}}]),ReactPlayer}(c.Component);ReactPlayer.addCustomPlayer=function(e){k.push(e)},ReactPlayer.removeCustomPlayers=function(){k=[]},ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=f.propTypes,ReactPlayer.defaultProps=f.defaultProps,ReactPlayer.canPlay=function(e){for(var t=[].concat(o(k),o(h.default)),n=0;n<t.length;n++){if(t[n].canPlay(e))return!0}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=n(12)()},function(e,t,n){"use strict";var r=n(13),o=n(14),a=n(15);e.exports=function(){function e(e,t,n,r,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},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";function r(e,t,n,r,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,l,u],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,n){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&r(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,n),l.onload||o(l,n),i.appendChild(l)}},function(e,t,n){"use strict";function r(e){return!!e&&"object"===(void 0===e?"undefined":p(e))}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||a(e)}function a(e){return e.$$typeof===d}function i(e){return Array.isArray(e)?[]:{}}function l(e,t){return t&&!1===t.clone||!f(e)?e:c(i(e),e,t)}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}function s(e,t,n){var r={};return f(e)&&Object.keys(e).forEach(function(t){r[t]=l(e[t],n)}),Object.keys(t).forEach(function(o){f(t[o])&&e[o]?r[o]=c(e[o],t[o],n):r[o]=l(t[o],n)}),r}function c(e,t,n){var r=Array.isArray(t),o=Array.isArray(e),a=n||{arrayMerge:u};if(r===o)return r?(a.arrayMerge||u)(e,t,n):s(e,t,n);return l(t,n)}Object.defineProperty(t,"__esModule",{value:!0});var p="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},f=function(e){return r(e)&&!o(e)},y="function"==typeof Symbol&&Symbol.for,d=y?Symbol.for("react.element"):60103;c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return c(e,n,t)},{})};var h=c;t.default=h,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(6),a=n(7),i=n(19),l=n(20),u=n(21),s=n(22),c=n(8),p=n(23),f=n(9);t.default=[r.YouTube,o.SoundCloud,a.Vimeo,i.Facebook,l.Streamable,u.Wistia,s.Twitch,c.DailyMotion,p.Mixcloud,f.FilePlayer],e.exports=t.default},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),s=r(u),c=n(1),p=n(2),f=r(p),y="//connect.facebook.net/en_US/sdk.js",d=/facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,h="facebook-player-",v=t.Facebook=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.callPlayer=c.callPlayer,r.playerID=h+(0,c.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,c.getSDK)(y,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,c.getSDK)(y,"FB","fbAsyncInit").then(function(e){e.init({appId:n.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),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("error",n.props.onError),n.props.muted||n.callPlayer("unmute"),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("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 s.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);v.displayName="Facebook",v.canPlay=function(e){return d.test(e)},v.loopOnEnded=!0,t.default=(0,f.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.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),s=r(u),c=n(1),p=n(2),f=r(p),y=/streamable\.com\/([a-z0-9]+)$/,d=t.Streamable=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.callPlayer=c.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,c.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:"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(y)[1],t={width:"100%",height:"100%"};return s.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}]),t}(u.Component);d.displayName="Streamable",d.canPlay=function(e){return y.test(e)},t.default=(0,f.default)(d)},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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(?: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),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.callPlayer=p.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(d)[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,s=n.onPause,c=n.onSeek,f=n.onEnded,y=n.config;(0,p.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},y.wistia.options),onReady:function(e){t.player=e,t.player.bind("play",u),t.player.bind("pause",s),t.player.bind("seek",c),t.player.bind("end",f),i()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){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 c.default.createElement("div",{key:e,className:t,style:n})}}]),t}(s.Component);h.displayName="Wistia",h.canPlay=function(e){return d.test(e)},h.loopOnEnded=!0,t.default=(0,y.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,h=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,v="twitch-player-",m=t.Twitch=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.callPlayer=p.callPlayer,r.playerID=v+(0,p.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),s=u?e.match(h)[1]:e.match(d)[1];if(t)return void(u?this.player.setChannel(s):this.player.setVideo("v"+s));(0,p.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){n.player=new e.Player(n.playerID,l({video:u?"":s,channel:u?s:"",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.PLAY,c=t.PAUSE,p=t.ENDED;n.player.addEventListener(r,n.props.onReady),n.player.addEventListener(a,n.props.onPlay),n.player.addEventListener(c,n.props.onPause),n.player.addEventListener(p,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 c.default.createElement("div",{style:e,id:this.playerID})}}]),t}(s.Component);m.displayName="Twitch",m.canPlay=function(e){return d.test(e)||h.test(e)},m.loopOnEnded=!0,t.default=(0,y.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.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}}(),s=n(0),c=r(s),p=n(1),f=n(2),y=r(f),d=/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),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.callPlayer=p.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,p.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(d)[1],o={width:"100%",height:"100%"},a=(0,p.queryString)(l({},n.mixcloud.options,{feed:"/"+r+"/"}));return c.default.createElement("iframe",{key:r,ref:this.ref,style:o,src:"https://www.mixcloud.com/widget/iframe/?"+a,frameBorder:"0"})}}]),t}(s.Component);h.displayName="Mixcloud",h.canPlay=function(e){return d.test(e)},t.default=(0,y.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var l,s=y[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;!c.Player.canPlay(e)&&t[c.configKey].preload&&n.push(i.default.createElement(u.default,{key:c.Player.displayName,activePlayer:c.Player,url:c.url,playing:!0,style:{display:"none"}}))}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(0),i=r(a),l=n(4),u=r(l),s=n(5),c=n(6),p=n(7),f=n(8),y=[{Player:s.YouTube,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:c.SoundCloud,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:p.Vimeo,configKey:"vimeo",url:"https://vimeo.com/127250231"},{Player:f.DailyMotion,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];e.exports=t.default}]); | ||
//# sourceMappingURL=ReactPlayer.js.map |
@@ -34,3 +34,3 @@ 'use strict'; | ||
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i; | ||
var HLS_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.8.9/hls.min.js'; | ||
var HLS_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.9.1/hls.min.js'; | ||
var HLS_GLOBAL = 'Hls'; | ||
@@ -37,0 +37,0 @@ var DASH_EXTENSIONS = /\.(mpd)($|\?)/i; |
{ | ||
"name": "react-player", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1899816