Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-player

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-player - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

lib/players/Streamable.js

3

bower.json
{
"name": "react-player",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud and Vimeo",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud, Streamable and Vimeo",
"main": "dist/ReactPlayer.js",

@@ -17,2 +17,3 @@ "authors": [

"soundcloud",
"streamable",
"vimeo",

@@ -19,0 +20,0 @@ "react-component"

@@ -7,2 +7,10 @@ # Change Log

#### [v0.10.0](https://github.com/CookPete/react-player/compare/v0.9.0...v0.10.0)
> 25 September 2016
* Add `hidden` prop to ReactPlayer [`#102`](https://github.com/CookPete/react-player/pull/102)
* Use mounted property to prevent setting state when unmounted [`#105`](https://github.com/CookPete/react-player/issues/105)
* Update onProgress logic to still report loaded amounts when paused [`#94`](https://github.com/CookPete/react-player/issues/94)
#### [v0.9.0](https://github.com/CookPete/react-player/compare/v0.8.0...v0.9.0)

@@ -9,0 +17,0 @@ > 9 August 2016

@@ -1,3 +0,3 @@

var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(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 u(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 s=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}}();n(9);var c=n(1),p=r(c),f=n(4),y=n(7),d=r(y),h=n(5),v=r(h),g=n(6),m=r(g),b=n(3),w=r(b),P=function(e){function t(){var e,n,r,u;i(this,t);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.seekTo=function(e){var t=r.refs.player;t&&t.seekTo(e)},r.progress=function(){if(r.props.url&&r.refs.player){var e=r.refs.player.getFractionLoaded()||0,t=r.refs.player.getFractionPlayed()||0;e===r.prevLoaded&&t===r.prevPlayed||(r.props.onProgress({loaded:e,played:t}),r.prevLoaded=e,r.prevPlayed=t)}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(e){var t=e.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,u=n.vimeoConfig,l=n.fileConfig,c=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig","fileConfig"]),f=t?s({},c,{ref:"player"}):{};return p["default"].createElement(e,s({key:e.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:u,fileConfig:l},f))},u=n,a(r,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillReceiveProps",value:function(e){this.props.playing&&!e.playing&&clearTimeout(this.progressTimeout),!this.props.playing&&e.playing&&this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.playing!==e.playing||this.props.volume!==e.volume||this.props.height!==e.height||this.props.width!==e.width}},{key:"renderPlayers",value:function(){var e=this.props,t=e.url,n=e.youtubeConfig,r=e.vimeoConfig,o=[];return d["default"].canPlay(t)?o.push(d["default"]):v["default"].canPlay(t)?o.push(v["default"]):m["default"].canPlay(t)?o.push(m["default"]):t&&o.push(w["default"]),!d["default"].canPlay(t)&&n.preload&&o.push(d["default"]),!m["default"].canPlay(t)&&r.preload&&o.push(m["default"]),o.map(this.renderPlayer)}},{key:"render",value:function(){var e=s({},this.props.style,{width:this.props.width,height:this.props.height});return p["default"].createElement("div",{style:e,className:this.props.className},this.renderPlayers())}}]),t}(c.Component);P.displayName="ReactPlayer",P.propTypes=f.propTypes,P.defaultProps=f.defaultProps,t["default"]=P,e.exports=t["default"]},function(e,t){e.exports=React},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 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});var a=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(1),s=n(4),l=5e3,c=function(e){function t(){var e,n,i,a;r(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=i=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.isReady=!1,i.startOnPlay=!0,i.durationOnPlay=!1,i.seekOnPlay=null,i.onPlay=function(){i.startOnPlay&&(i.setVolume(i.props.volume),i.props.onStart(),i.startOnPlay=!1),i.props.onPlay(),i.seekOnPlay&&(i.seekTo(i.seekOnPlay),i.seekOnPlay=null),i.durationOnPlay&&(i.props.onDuration(i.getDuration()),i.durationOnPlay=!1)},i.onReady=function(){i.isReady=!0,(i.props.playing||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play());var e=i.getDuration();e?i.props.onDuration(e):i.durationOnPlay=!0},a=n,o(i,a)}return i(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.url&&this.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillReceiveProps",value:function(e){this.props.url!==e.url&&e.url?(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)):this.props.url&&!e.url?(this.stop(),clearTimeout(this.updateTimeout)):!this.props.playing&&e.playing?this.play():this.props.playing&&!e.playing?this.pause():this.props.volume!==e.volume&&this.setVolume(e.volume)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"seekTo",value:function(e){var t=this;this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},l))}}]),t}(u.Component);c.propTypes=s.propTypes,c.defaultProps=s.defaultProps,t["default"]=c,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 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 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 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}}(),l=function v(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:v(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=r(c),f=n(2),y=r(f),d=/\.(mp3|wav|m4a)($|\?)/i,h=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this;this.player=this.refs.player,this.player.oncanplay=this.onReady,this.player.onplay=this.onPlay,this.player.onpause=function(){return e.props.onPause()},this.player.onended=function(){return e.props.onEnded()},this.player.onerror=function(t){return e.props.onError(t)},this.player.setAttribute("webkit-playsinline",""),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"load",value:function(e){this.player.src=e}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.pause(),this.player.removeAttribute("src")}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.player.currentTime=this.getDuration()*e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"getDuration",value:function(){return this.isReady?this.player.duration:null}},{key:"getFractionPlayed",value:function(){return this.isReady?this.player.currentTime/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&0!==this.player.buffered.length?this.player.buffered.end(0)/this.getDuration():null}},{key:"render",value:function(){var e=this.props,t=e.loop,n=e.controls,r=e.fileConfig,o=d.test(this.props.url)?"audio":"video",i={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p["default"].createElement(o,u({ref:"player",style:i,preload:"auto",controls:n,loop:t},r.attributes))}}],[{key:"canPlay",value:function(e){return!0}}]),t}(y["default"]);h.displayName="FilePlayer",t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var r=n(1);t.propTypes={url:r.PropTypes.string,playing:r.PropTypes.bool,loop:r.PropTypes.bool,controls:r.PropTypes.bool,volume:r.PropTypes.number,width:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number]),height:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number]),className:r.PropTypes.string,style:r.PropTypes.object,progressFrequency:r.PropTypes.number,soundcloudConfig:r.PropTypes.shape({clientId:r.PropTypes.string}),youtubeConfig:r.PropTypes.shape({playerVars:r.PropTypes.object,preload:r.PropTypes.bool}),vimeoConfig:r.PropTypes.shape({iframeParams:r.PropTypes.object,preload:r.PropTypes.bool}),fileConfig:r.PropTypes.shape({attributes:r.PropTypes.object}),onStart:r.PropTypes.func,onPlay:r.PropTypes.func,onPause:r.PropTypes.func,onBuffer:r.PropTypes.func,onEnded:r.PropTypes.func,onError:r.PropTypes.func,onDuration:r.PropTypes.func,onProgress:r.PropTypes.func},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,width:640,height:360,progressFrequency:1e3,soundcloudConfig:{clientId:"e8b6f84fbcad14c301ca1355cae1dea2"},youtubeConfig:{playerVars:{},preload:!1},vimeoConfig:{iframeParams:{},preload:!1},fileConfig:{attributes:{}},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onProgress:function(){}}},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 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 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 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=function b(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:b(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},l=n(1),c=r(l),p=n(10),f=r(p),y=n(3),d=r(y),h="//api.soundcloud.com/resolve.json",v=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,g={},m=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={image:null},a=n,i(r,a)}return a(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e,n){return s(Object.getPrototypeOf(t.prototype),"shouldComponentUpdate",this).call(this,e,n)||this.state.image!==n.image}},{key:"getSongData",value:function(e){var t=this;return g[e]?Promise.resolve(g[e]):(0,f["default"])(h+"?url="+e+"&client_id="+this.props.soundcloudConfig.clientId).then(function(n){return n.ok?(g[e]=n.json(),g[e]):void t.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(e){var t=this;this.stop(),this.getSongData(e).then(function(n){if(e===t.props.url){if(!n.streamable)return void t.props.onError(new Error("SoundCloud track is not streamable"));var r=n.artwork_url||n.user.avatar_url;r&&t.setState({image:r.replace("-large","-t500x500")}),t.player.src=n.stream_url+"?client_id="+t.props.soundcloudConfig.clientId}},this.props.onError)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o={display:t?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return c["default"].createElement("div",{style:o},c["default"].createElement("audio",{ref:"player",type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:r,loop:n}))}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);m.displayName="SoundCloud",t["default"]=m,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 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 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 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}}(),l=function P(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:P(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=r(c),f=n(13),y=n(2),d=r(y),h="https://player.vimeo.com/video/",v=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,g=/^https?:\/\/player.vimeo.com/,m="https://vimeo.com/127250231",b={api:1,autoplay:0,badge:0,byline:0,fullscreen:1,portrait:0,title:0},w=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onMessage=function(e){if(g.test(e.origin)){r.origin=r.origin||e.origin;var t=JSON.parse(e.data);"ready"===t.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===t.event&&(r.fractionPlayed=t.data.percent),"loadProgress"===t.event&&(r.fractionLoaded=t.data.percent),"play"===t.event&&r.onPlay(),"pause"===t.event&&r.props.onPause(),"finish"===t.event&&r.onEnded(),"getDuration"===t.method&&(r.duration=t.value,r.onReady())}},r.onEnded=function(){r.props.loop&&r.seekTo(0),r.props.onEnded()},r.postMessage=function(e,t){if(r.origin){var n=JSON.stringify({method:e,value:t});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage,!1),this.iframe=this.refs.iframe,!this.props.url&&this.props.vimeoConfig.preload&&(this.preloading=!0,this.load(m)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getIframeParams",value:function(){return u({},b,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(e){var t=e.match(v)[3];this.iframe.src=h+t+"?"+(0,f.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.postMessage("seekTo",this.duration*e)}},{key:"setVolume",value:function(e){this.postMessage("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var e=this.getIframeParams(),t=e.fullscreen,n={display:this.props.url?"block":"none",width:"100%",height:"100%"};return p["default"].createElement("iframe",{ref:"iframe",frameBorder:"0",style:n,allowFullScreen:t})}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d["default"]);w.displayName="Vimeo",t["default"]=w,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 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 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 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}}(),l=function T(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:T(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=r(c),f=n(11),y=r(f),d=n(2),h=r(d),v=n(8),g="https://www.youtube.com/iframe_api",m="YT",b="onYouTubeIframeAPIReady",w=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,P="youtube-player",O="https://www.youtube.com/watch?v=GlCmAC4MHek",_={autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},j=0,k=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.playerId=P+"-"+j++,r.onStateChange=function(e){var t=e.data,n=window[m].PlayerState,o=n.PLAYING,i=n.PAUSED,a=n.BUFFERING,u=n.ENDED,s=n.CUED;t===o&&r.onPlay(),t===i&&r.props.onPause(),t===a&&r.props.onBuffer(),t===u&&r.onEnded(),t===s&&r.onReady()},r.onEnded=function(){r.props.loop&&r.seekTo(0),r.props.onEnded()},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){!this.props.url&&this.props.youtubeConfig.preload&&(this.preloading=!0,this.load(O)),l(Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[m]&&window[m].loaded?Promise.resolve(window[m]):new Promise(function(e,t){var n=window[b];window[b]=function(){n&&n(),e(window[m])},(0,y["default"])(g,function(e){e&&t(e)})})}},{key:"load",value:function(e){var t=this,n=e&&e.match(w)[1];return this.isReady?void this.player.cueVideoById({videoId:n,startSeconds:(0,v.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void this.getSDK().then(function(r){t.player=new r.Player(t.playerId,{width:"100%",height:"100%",videoId:n,playerVars:u({},_,{controls:t.props.controls?1:0},t.props.youtubeConfig.playerVars,{start:(0,v.parseStartTime)(e),origin:window.location.origin}),events:{onReady:function(){t.loadingSDK=!1,t.onReady()},onStateChange:t.onStateChange,onError:function(e){return t.props.onError(e.data)}}})},this.props.onError))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(e){l(Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player.setVolume&&this.player.setVolume(100*e)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var e={height:"100%",display:this.props.url?"block":"none"};return p["default"].createElement("div",{style:e},p["default"].createElement("div",{id:this.playerId}))}}],[{key:"canPlay",value:function(e){return w.test(e)}}]),t}(h["default"]);k.displayName="YouTube",t["default"]=k,e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=e.match(i);if(t){var n=t[1];if(n.match(a))return r(n);if(u.test(n))return parseInt(n,10)}return 0}function r(e){for(var t=0,n=a.exec(e);null!==n;){var r=n,i=o(r,3),u=i[1],s=i[2];"h"===s&&(t+=60*parseInt(u,10)*60),"m"===s&&(t+=60*parseInt(u,10)),"s"===s&&(t+=parseInt(u,10)),n=a.exec(e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}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=n;var i=/[\?&#](?:start|t)=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,u=/^\d+$/},function(e,t,n){var r;(function(e,o,i){(function(){"use strict";function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function u(e){return"function"==typeof e}function s(e){H=e}function l(e){ee=e}function c(){return function(){e.nextTick(h)}}function p(){return function(){J(h)}}function f(){var e=0,t=new re(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(h,1)}}function h(){for(var e=0;e<Z;e+=2){var t=ae[e],n=ae[e+1];t(n),ae[e]=void 0,ae[e+1]=void 0}Z=0}function v(){try{var e=n(18);return J=e.runOnLoop||e.runOnContext,p()}catch(t){return d()}}function g(e,t){var n=this,r=new this.constructor(b);void 0===r[le]&&L(r);var o=n._state;if(o){var i=arguments[o-1];ee(function(){I(o,r,i,n._result)})}else x(n,r,e,t);return r}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return E(n,e),n}function b(){}function w(){return new TypeError("You cannot resolve a promise with itself")}function P(){return new TypeError("A promises callback cannot return that same promise.")}function O(e){try{return e.then}catch(t){return ye.error=t,ye}}function _(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function j(e,t,n){ee(function(e){var r=!1,o=_(n,t,function(n){r||(r=!0,t!==n?E(e,n):S(e,n))},function(t){r||(r=!0,M(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,M(e,o))},e)}function k(e,t){t._state===pe?S(e,t._result):t._state===fe?M(e,t._result):x(t,void 0,function(t){E(e,t)},function(t){M(e,t)})}function T(e,t,n){t.constructor===e.constructor&&n===ue&&constructor.resolve===se?k(e,t):n===ye?M(e,ye.error):void 0===n?S(e,t):u(n)?j(e,t,n):S(e,t)}function E(e,t){e===t?M(e,w()):a(t)?T(e,t,O(t)):S(e,t)}function C(e){e._onerror&&e._onerror(e._result),D(e)}function S(e,t){e._state===ce&&(e._result=t,e._state=pe,0!==e._subscribers.length&&ee(D,e))}function M(e,t){e._state===ce&&(e._state=fe,e._result=t,ee(C,e))}function x(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+pe]=n,o[i+fe]=r,0===i&&e._state&&ee(D,e)}function D(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?I(n,r,o,i):o(i);e._subscribers.length=0}}function A(){this.error=null}function R(e,t){try{return e(t)}catch(n){return de.error=n,de}}function I(e,t,n,r){var o,i,a,s,l=u(n);if(l){if(o=R(n,r),o===de?(s=!0,i=o.error,o=null):a=!0,t===o)return void M(t,P())}else o=r,a=!0;t._state!==ce||(l&&a?E(t,o):s?M(t,i):e===pe?S(t,o):e===fe&&M(t,o))}function F(e,t){try{t(function(t){E(e,t)},function(t){M(e,t)})}catch(n){M(e,n)}}function V(){return he++}function L(e){e[le]=he++,e._state=void 0,e._result=void 0,e._subscribers=[]}function N(e){return new we(this,e).promise}function U(e){var t=this;return new t(X(e)?function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)}:function(e,t){t(new TypeError("You must pass an array to race."))})}function B(e){var t=this,n=new t(b);return M(n,e),n}function W(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function q(e){this[le]=V(),this._result=this._state=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&W(),this instanceof q?F(this,e):Y())}function K(e,t){this._instanceConstructor=e,this.promise=new e(b),this.promise[le]||L(this.promise),X(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):M(this.promise,$())}function $(){return new Error("Array Methods must be provided an Array")}function z(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=be)}var G;G=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var J,H,Q,X=G,Z=0,ee=function(e,t){ae[Z]=e,ae[Z+1]=t,Z+=2,2===Z&&(H?H(h):Q())},te="undefined"!=typeof window?window:void 0,ne=te||{},re=ne.MutationObserver||ne.WebKitMutationObserver,oe="undefined"==typeof self&&"undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ie="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ae=new Array(1e3);Q=oe?c():re?f():ie?y():void 0===te?v():d();var ue=g,se=m,le=Math.random().toString(36).substring(16),ce=void 0,pe=1,fe=2,ye=new A,de=new A,he=0,ve=N,ge=U,me=B,be=q;q.all=ve,q.race=ge,q.resolve=se,q.reject=me,q._setScheduler=s,q._setAsap=l,q._asap=ee,q.prototype={constructor:q,then:ue,"catch":function(e){return this.then(null,e)}};var we=K;K.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ce&&n<e;n++)this._eachEntry(t[n],n)},K.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===se){var o=O(e);if(o===ue&&e._state!==ce)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===be){var i=new n(b);T(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},K.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ce&&(this._remaining--,e===fe?M(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},K.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){n._settledAt(pe,t,e)},function(e){n._settledAt(fe,t,e)})};var Pe=z,Oe={Promise:be,polyfill:Pe};n(16).amd?(r=function(){return Oe}.call(t,n,t,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=Oe:"undefined"!=typeof this&&(this.ES6Promise=Oe),Pe()}).call(this)}).call(t,n(12),function(){return this}(),n(17)(e))},function(e,t,n){var r,o,i;!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null},a=function(e){var t=void 0===arguments[1]?{}:arguments[1],a=null!=t.timeout?t.timeout:i.timeout,u=null!=t.jsonpCallback?t.jsonpCallback:i.jsonpCallback,s=void 0;return new Promise(function(i,l){var c=t.jsonpCallbackFunction||n();window[c]=function(e){i({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),o(u+"_"+c),r(c)},e+=e.indexOf("?")===-1?"?":"&";var p=document.createElement("script");p.setAttribute("src",e+u+"="+c),p.id=u+"_"+c,document.getElementsByTagName("head")[0].appendChild(p),s=setTimeout(function(){l(new Error("JSONP request to "+e+" timed out")),r(c),o(u+"_"+c)},a)})};t.exports=a})},function(e,t){function n(e,t){for(var n in t)e.setAttribute(n,t[n])}function r(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 o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var a=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},u.type=t.type||"text/javascript",u.charset=t.charset||"utf8",u.async=!("async"in t)||!!t.async,u.src=e,t.attrs&&n(u,t.attrs),t.text&&(u.text=""+t.text);var s="onload"in u?r:o;s(u,i),u.onload||r(u,i),a.appendChild(u)}},function(e,t){function n(){p&&l&&(p=!1,l.length?c=l.concat(c):f=-1,c.length&&r())}function r(){
if(!p){var e=a.call(null,n);p=!0;for(var t=c.length;t;){for(l=c,c=[];++f<t;)l&&l[f].run();f=-1,t=c.length}l=null,p=!1,u.call(null,e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var a,u,s=e.exports={};!function(){try{a=setTimeout}catch(e){a=function(){throw new Error("setTimeout is not defined")}}try{u=clearTimeout}catch(e){u=function(){throw new Error("clearTimeout is not defined")}}}();var l,c=[],p=!1,f=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new o(e,t)),1!==c.length||p||a.call(null,r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=i,s.addListener=i,s.once=i,s.off=i,s.removeListener=i,s.removeAllListeners=i,s.emit=i,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}var o=n(15),i=n(14);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){var t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]}),t):t},t.stringify=function(e,t){var n={encode:!0,strict:!0};return t=i(n,t),e?Object.keys(e).sort().map(function(n){var o=e[n];if(void 0===o)return"";if(null===o)return r(n,t);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(e){void 0!==e&&(null===e?i.push(r(n,t)):i.push(r(n,t)+"="+r(e,t)))}),i.join("&")}return r(n,t)+"="+r(o,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)o.call(r,l)&&(u[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(u[a[c]]=r[a[c]])}}return u}},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){}]);
var ReactPlayer=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(1),p=r(c),f=n(6),d=n(13),h=r(d),y=n(10),v=r(y),m=n(12),b=r(m),g=n(4),_=r(g),w=n(11),P=r(w),T=function(t){function e(){var t,n,r,s;i(this,e);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return n=r=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(c))),r.seekTo=function(t){r.player&&r.player.seekTo(t)},r.progress=function(){if(r.props.url&&r.player){var t=r.player.getFractionLoaded()||0,e=r.player.getFractionPlayed()||0,n={};t!==r.prevLoaded&&(n.loaded=t),e!==r.prevPlayed&&r.props.playing&&(n.played=e),(n.loaded||n.playing)&&r.props.onProgress(n),r.prevLoaded=t,r.prevPlayed=e}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(t){var e=t.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,s=n.vimeoConfig,l=n.fileConfig,c=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig","fileConfig"]),f=function(t){r.player=t},d=e?u({},c,{ref:f}):{};return p["default"].createElement(t,u({key:t.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:s,fileConfig:l},d))},s=n,a(r,s)}return s(e,t),l(e,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(t){return this.props.url!==t.url||this.props.playing!==t.playing||this.props.volume!==t.volume||this.props.height!==t.height||this.props.width!==t.width||this.props.hidden!==t.hidden}},{key:"renderPlayers",value:function(){var t=this.props,e=t.url,n=t.youtubeConfig,r=t.vimeoConfig,o=[];return h["default"].canPlay(e)?o.push(h["default"]):v["default"].canPlay(e)?o.push(v["default"]):b["default"].canPlay(e)?o.push(b["default"]):P["default"].canPlay(e)?o.push(P["default"]):e&&o.push(_["default"]),!h["default"].canPlay(e)&&n.preload&&o.push(h["default"]),!b["default"].canPlay(e)&&r.preload&&o.push(b["default"]),o.map(this.renderPlayer)}},{key:"render",value:function(){var t=u({},this.props.style,{width:this.props.width,height:this.props.height});return p["default"].createElement("div",{style:t,className:this.props.className,hidden:this.props.hidden},this.renderPlayers())}}]),e}(c.Component);T.displayName="ReactPlayer",T.propTypes=f.propTypes,T.defaultProps=f.defaultProps,e["default"]=T,t.exports=e["default"]},function(t,e){t.exports=React},function(t,e,n){var r;(function(t,o,i){(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function u(t){J=t}function l(t){tt=t}function c(){return function(){t.nextTick(y)}}function p(){return function(){z(y)}}function f(){var t=0,e=new rt(y),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=y,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(y,1)}}function y(){for(var t=0;t<Z;t+=2){var e=at[t],n=at[t+1];e(n),at[t]=void 0,at[t+1]=void 0}Z=0}function v(){try{var t=n(23);return z=t.runOnLoop||t.runOnContext,p()}catch(e){return h()}}function m(t,e){var n=this,r=new this.constructor(g);void 0===r[lt]&&U(r);var o=n._state;if(o){var i=arguments[o-1];tt(function(){M(o,r,i,n._result)})}else A(n,r,t,e);return r}function b(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(g);return k(n,t),n}function g(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function P(t){try{return t.then}catch(e){return dt.error=e,dt}}function T(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function O(t,e,n){tt(function(t){var r=!1,o=T(n,e,function(n){r||(r=!0,e!==n?k(t,n):x(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o))},t)}function E(t,e){e._state===pt?x(t,e._result):e._state===ft?S(t,e._result):A(e,void 0,function(e){k(t,e)},function(e){S(t,e)})}function j(t,e,n){e.constructor===t.constructor&&n===st&&constructor.resolve===ut?E(t,e):n===dt?S(t,dt.error):void 0===n?x(t,e):s(n)?O(t,e,n):x(t,e)}function k(t,e){t===e?S(t,_()):a(e)?j(t,e,P(e)):x(t,e)}function C(t){t._onerror&&t._onerror(t._result),R(t)}function x(t,e){t._state===ct&&(t._result=e,t._state=pt,0!==t._subscribers.length&&tt(R,t))}function S(t,e){t._state===ct&&(t._state=ft,t._result=e,tt(C,t))}function A(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+pt]=n,o[i+ft]=r,0===i&&t._state&&tt(R,t)}function R(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,a=0;a<e.length;a+=3)r=e[a],o=e[a+n],r?M(n,r,o,i):o(i);t._subscribers.length=0}}function D(){this.error=null}function I(t,e){try{return t(e)}catch(n){return ht.error=n,ht}}function M(t,e,n,r){var o,i,a,u,l=s(n);if(l){if(o=I(n,r),o===ht?(u=!0,i=o.error,o=null):a=!0,e===o)return void S(e,w())}else o=r,a=!0;e._state!==ct||(l&&a?k(e,o):u?S(e,i):t===pt?x(e,o):t===ft&&S(e,o))}function L(t,e){try{e(function(e){k(t,e)},function(e){S(t,e)})}catch(n){S(t,n)}}function F(){return yt++}function U(t){t[lt]=yt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function B(t){return new _t(this,t).promise}function N(t){var e=this;return new e(Q(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){e(new TypeError("You must pass an array to race."))})}function V(t){var e=this,n=new e(g);return S(n,t),n}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(t){this[lt]=F(),this._result=this._state=void 0,this._subscribers=[],g!==t&&("function"!=typeof t&&q(),this instanceof H?L(this,t):W())}function Y(t,e){this._instanceConstructor=t,this.promise=new t(g),this.promise[lt]||U(this.promise),Q(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&x(this.promise,this._result))):S(this.promise,$())}function $(){return new Error("Array Methods must be provided an Array")}function G(){var t;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=gt)}var K;K=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var z,J,X,Q=K,Z=0,tt=function(t,e){at[Z]=t,at[Z+1]=e,Z+=2,2===Z&&(J?J(y):X())},et="undefined"!=typeof window?window:void 0,nt=et||{},rt=nt.MutationObserver||nt.WebKitMutationObserver,ot="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),it="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,at=new Array(1e3);X=ot?c():rt?f():it?d():void 0===et?v():h();var st=m,ut=b,lt=Math.random().toString(36).substring(16),ct=void 0,pt=1,ft=2,dt=new D,ht=new D,yt=0,vt=B,mt=N,bt=V,gt=H;H.all=vt,H.race=mt,H.resolve=ut,H.reject=bt,H._setScheduler=u,H._setAsap=l,H._asap=tt,H.prototype={constructor:H,then:st,"catch":function(t){return this.then(null,t)}};var _t=Y;Y.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===ct&&n<t;n++)this._eachEntry(e[n],n)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===ut){var o=P(t);if(o===st&&t._state!==ct)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===gt){var i=new n(g);j(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===ct&&(this._remaining--,t===ft?S(r,n):this._result[e]=n),0===this._remaining&&x(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,function(t){n._settledAt(pt,e,t)},function(t){n._settledAt(ft,e,t)})};var wt=G,Pt={Promise:gt,polyfill:wt};n(8).amd?(r=function(){return Pt}.call(e,n,e,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=Pt:"undefined"!=typeof this&&(this.ES6Promise=Pt),wt()}).call(this),i.exports=o.Promise}).call(e,n(7),function(){return this}(),n(9)(t))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(1),u=n(6),l=5e3,c=function(t){function e(){var t,n,i,a;r(this,e);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=i=o(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.isReady=!1,i.startOnPlay=!0,i.durationOnPlay=!1,i.seekOnPlay=null,i.onPlay=function(){i.startOnPlay&&(i.setVolume(i.props.volume),i.props.onStart(),i.startOnPlay=!1),i.props.onPlay(),i.seekOnPlay&&(i.seekTo(i.seekOnPlay),i.seekOnPlay=null),i.durationOnPlay&&(i.props.onDuration(i.getDuration()),i.durationOnPlay=!1)},i.onReady=function(){i.isReady=!0,(i.props.playing||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play());var t=i.getDuration();t?i.props.onDuration(t):i.durationOnPlay=!0},a=n,o(i,a)}return i(e,t),a(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.props.url&&this.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(t){this.props.url!==t.url&&t.url?(this.seekOnPlay=null,this.startOnPlay=!0,this.load(t.url)):this.props.url&&!t.url?(this.stop(),clearTimeout(this.updateTimeout)):!this.props.playing&&t.playing?this.play():this.props.playing&&!t.playing?this.pause():this.props.volume!==t.volume&&this.setVolume(t.volume)}},{key:"shouldComponentUpdate",value:function(t){return this.props.url!==t.url}},{key:"seekTo",value:function(t){var e=this;this.isReady||0===t||(this.seekOnPlay=t,setTimeout(function(){e.seekOnPlay=null},l))}}]),e}(s.Component);c.propTypes=u.propTypes,c.defaultProps=u.defaultProps,e["default"]=c,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function v(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:v(o,e,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=r(c),f=n(3),d=r(f),h=/\.(mp3|wav|m4a)($|\?)/i,y=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"componentDidMount",value:function(){var t=this;this.player.addEventListener("canplay",this.onReady),this.player.addEventListener("play",this.onPlay),this.player.addEventListener("pause",function(){t.mounted&&t.props.onPause()}),this.player.addEventListener("ended",this.props.onEnded),this.player.addEventListener("error",this.props.onError),this.player.setAttribute("webkit-playsinline",""),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){this.player.removeEventListener("canplay",this.onReady),this.player.removeEventListener("play",this.onPlay),this.player.removeEventListener("pause",this.props.onPause),this.player.removeEventListener("ended",this.props.onEnded),this.player.removeEventListener("error",this.props.onError),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this).call(this)}},{key:"load",value:function(t){this.player.src=t}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src")}},{key:"seekTo",value:function(t){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"seekTo",this).call(this,t),this.player.currentTime=this.getDuration()*t}},{key:"setVolume",value:function(t){this.player.volume=t}},{key:"getDuration",value:function(){return this.isReady?this.player.duration:null}},{key:"getFractionPlayed",value:function(){return this.isReady?this.player.currentTime/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&0!==this.player.buffered.length?this.player.buffered.end(0)/this.getDuration():null}},{key:"render",value:function(){var t=this,e=this.props,n=e.loop,r=e.controls,o=e.fileConfig,i=h.test(this.props.url)?"audio":"video",a={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p["default"].createElement(i,s({ref:function(e){t.player=e},style:a,preload:"auto",controls:r,loop:n},o.attributes))}}],[{key:"canPlay",value:function(t){return!0}}]),e}(d["default"]);y.displayName="FilePlayer",e["default"]=y,t.exports=e["default"]},function(t,e,n){(function(t,r){function o(t,e){this._id=t,this._clearFn=e}var i=n(22).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},l=0;e.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=l++,r=!(arguments.length<2)&&s.call(arguments,1);return u[n]=!0,i(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(5).setImmediate,n(5).clearImmediate)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultProps=e.propTypes=void 0;var r=n(1);e.propTypes={url:r.PropTypes.string,playing:r.PropTypes.bool,loop:r.PropTypes.bool,controls:r.PropTypes.bool,volume:r.PropTypes.number,width:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number]),height:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number]),hidden:r.PropTypes.bool,className:r.PropTypes.string,style:r.PropTypes.object,progressFrequency:r.PropTypes.number,soundcloudConfig:r.PropTypes.shape({clientId:r.PropTypes.string}),youtubeConfig:r.PropTypes.shape({playerVars:r.PropTypes.object,preload:r.PropTypes.bool}),vimeoConfig:r.PropTypes.shape({iframeParams:r.PropTypes.object,preload:r.PropTypes.bool}),fileConfig:r.PropTypes.shape({attributes:r.PropTypes.object}),onStart:r.PropTypes.func,onPlay:r.PropTypes.func,onPause:r.PropTypes.func,onBuffer:r.PropTypes.func,onEnded:r.PropTypes.func,onError:r.PropTypes.func,onDuration:r.PropTypes.func,onProgress:r.PropTypes.func},e.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,width:640,height:360,hidden:!1,progressFrequency:1e3,soundcloudConfig:{clientId:"e8b6f84fbcad14c301ca1355cae1dea2"},youtubeConfig:{playerVars:{},preload:!1},vimeoConfig:{iframeParams:{},preload:!1},fileConfig:{attributes:{}},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onProgress:function(){}}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function i(t){if(p===clearTimeout)return clearTimeout(t);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&s())}function s(){if(!y){var t=o(a);y=!0;for(var e=h.length;e;){for(d=h,h=[];++v<e;)d&&d[v].run();v=-1,e=h.length}d=null,y=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function l(){}var c,p,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(t){p=r}}();var d,h=[],y=!1,v=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new u(t,e)),1!==h.length||y||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){(function(r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function _(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:_(o,e,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=o(c),f=n(17),d=o(f),h=n(4),y=o(h),v="//api.soundcloud.com/resolve.json",m=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,b={},g=function(t){function e(){var t,n,r,o;i(this,e);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),r.state={image:null},o=n,a(r,o)}return s(e,t),u(e,[{key:"shouldComponentUpdate",value:function(t,n){return l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"shouldComponentUpdate",this).call(this,t,n)||this.state.image!==n.image}},{key:"getSongData",value:function(t){var e=this;return b[t]?r.resolve(b[t]):(0,d["default"])(v+"?url="+t+"&client_id="+this.props.soundcloudConfig.clientId).then(function(n){return n.ok?(b[t]=n.json(),b[t]):void e.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(t){var e=this;this.stop(),this.getSongData(t).then(function(t){if(e.mounted){if(!t.streamable)return void e.props.onError(new Error("SoundCloud track is not streamable"));var n=t.artwork_url||t.user.avatar_url;n&&e.setState({image:n.replace("-large","-t500x500")}),e.player.src=t.stream_url+"?client_id="+e.props.soundcloudConfig.clientId}},this.props.onError)}},{key:"render",value:function(){var t=this,e=this.props,n=e.url,r=e.loop,o=e.controls,i={display:n?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return p["default"].createElement("div",{style:i},p["default"].createElement("audio",{ref:function(e){t.player=e},type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:o,loop:r}))}}],[{key:"canPlay",value:function(t){return m.test(t)}}]),e}(y["default"]);g.displayName="SoundCloud",e["default"]=g,t.exports=e["default"]}).call(e,n(2))},function(t,e,n){(function(r,o){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(4),p=i(c),f="https://api.streamable.com/videos/",d=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,h={},y=function(t){function e(){return a(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),l(e,[{key:"getData",value:function(t){var e=this,n=t.match(d)[1];return h[n]?r.resolve(h[n]):o(f+n).then(function(t){return 200===t.status?(h[n]=t.json(),h[n]):void e.props.onError(new Error("Streamable track could not be resolved"))})}},{key:"load",value:function(t){var e=this;this.stop(),this.getData(t).then(function(t){e.mounted&&(e.player.src=t.files.mp4.url)},this.props.onError)}}],[{key:"canPlay",value:function(t){return d.test(t)}}]),e}(p["default"]);y.displayName="Streamable",e["default"]=y,t.exports=e["default"]}).call(e,n(2),n(16))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function w(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:w(o,e,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},c=n(1),p=r(c),f=n(19),d=n(3),h=r(d),y="https://player.vimeo.com/video/",v=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,m=/^https?:\/\/player.vimeo.com/,b="https://vimeo.com/127250231",g={api:1,autoplay:0,badge:0,byline:0,fullscreen:1,portrait:0,title:0},_=function(t){function e(){var t,n,r,a;o(this,e);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),r.onMessage=function(t){if(m.test(t.origin)){r.origin=r.origin||t.origin;var e=JSON.parse(t.data);"ready"===e.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===e.event&&(r.fractionPlayed=e.data.percent),"loadProgress"===e.event&&(r.fractionLoaded=e.data.percent),"play"===e.event&&r.onPlay(),"pause"===e.event&&r.props.onPause(),"finish"===e.event&&r.onEnded(),"getDuration"===e.method&&(r.duration=e.value,r.onReady())}},r.onEnded=function(){r.props.loop&&r.seekTo(0),r.props.onEnded()},r.postMessage=function(t,e){if(r.origin){var n=JSON.stringify({method:t,value:e});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},a=n,i(r,a)}return a(e,t),u(e,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage,!1),!this.props.url&&this.props.vimeoConfig.preload&&(this.preloading=!0,this.load(b)),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage,!1),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this).call(this)}},{key:"getIframeParams",value:function(){return s({},g,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(t){var e=t.match(v)[3];this.iframe.src=y+e+"?"+(0,f.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(t){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"seekTo",this).call(this,t),this.postMessage("seekTo",this.duration*t)}},{key:"setVolume",value:function(t){this.postMessage("setVolume",t)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var t=this,e=this.getIframeParams(),n=e.fullscreen,r={display:this.props.url?"block":"none",width:"100%",height:"100%"};return p["default"].createElement("iframe",{ref:function(e){t.iframe=e},frameBorder:"0",style:r,allowFullScreen:n})}}],[{key:"canPlay",value:function(t){return v.test(t)}}]),e}(h["default"]);_.displayName="Vimeo",e["default"]=_,t.exports=e["default"]},function(t,e,n){(function(r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function k(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:k(o,e,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},p=n(1),f=o(p),d=n(18),h=o(d),y=n(3),v=o(y),m=n(14),b="https://www.youtube.com/iframe_api",g="YT",_="onYouTubeIframeAPIReady",w=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,P="youtube-player",T="https://www.youtube.com/watch?v=GlCmAC4MHek",O={autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},E=0,j=function(t){function e(){var t,n,r,o;i(this,e);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];
return n=r=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),r.playerId=P+"-"+E++,r.onStateChange=function(t){var e=t.data,n=window[g].PlayerState,o=n.PLAYING,i=n.PAUSED,a=n.BUFFERING,s=n.ENDED,u=n.CUED;e===o&&r.onPlay(),e===i&&r.props.onPause(),e===a&&r.props.onBuffer(),e===s&&r.onEnded(),e===u&&r.onReady()},r.onEnded=function(){r.props.loop&&r.seekTo(0),r.props.onEnded()},o=n,a(r,o)}return s(e,t),l(e,[{key:"componentDidMount",value:function(){!this.props.url&&this.props.youtubeConfig.preload&&(this.preloading=!0,this.load(T)),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[g]&&window[g].loaded?r.resolve(window[g]):new r(function(t,e){var n=window[_];window[_]=function(){n&&n(),t(window[g])},(0,h["default"])(b,function(t){t&&e(t)})})}},{key:"load",value:function(t){var e=this,n=t&&t.match(w)[1];return this.isReady?void this.player.cueVideoById({videoId:n,startSeconds:(0,m.parseStartTime)(t)}):this.loadingSDK?void(this.loadOnReady=t):(this.loadingSDK=!0,void this.getSDK().then(function(r){e.player=new r.Player(e.playerId,{width:"100%",height:"100%",videoId:n,playerVars:u({},O,{controls:e.props.controls?1:0},e.props.youtubeConfig.playerVars,{start:(0,m.parseStartTime)(t),origin:window.location.origin}),events:{onReady:function(){e.loadingSDK=!1,e.onReady()},onStateChange:e.onStateChange,onError:function(t){return e.props.onError(t.data)}}})},this.props.onError))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(t){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"seekTo",this).call(this,t),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*t)}},{key:"setVolume",value:function(t){this.isReady&&this.player.setVolume&&this.player.setVolume(100*t)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var t={height:"100%",display:this.props.url?"block":"none"};return f["default"].createElement("div",{style:t},f["default"].createElement("div",{id:this.playerId}))}}],[{key:"canPlay",value:function(t){return w.test(t)}}]),e}(v["default"]);j.displayName="YouTube",e["default"]=j,t.exports=e["default"]}).call(e,n(2))},function(t,e){"use strict";function n(t){var e=t.match(i);if(e){var n=e[1];if(n.match(a))return r(n);if(s.test(n))return parseInt(n,10)}return 0}function r(t){for(var e=0,n=a.exec(t);null!==n;){var r=n,i=o(r,3),s=i[1],u=i[2];"h"===u&&(e+=60*parseInt(s,10)*60),"m"===u&&(e+=60*parseInt(s,10)),"s"===u&&(e+=parseInt(s,10)),n=a.exec(t)}return e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.parseStartTime=n;var i=/[\?&#](?:start|t)=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,s=/^\d+$/},function(t,e,n){var r;(function(t,o,i,a){(function(){"use strict";function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function u(t){return"function"==typeof t}function l(t){return"object"==typeof t&&null!==t}function c(t){K=t}function p(t){Q=t}function f(){var e=t.nextTick,n=t.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&"0"===n[1]&&"10"===n[2]&&(e=o),function(){e(m)}}function d(){return function(){G(m)}}function h(){var t=0,e=new et(m),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function y(){var t=new MessageChannel;return t.port1.onmessage=m,function(){t.port2.postMessage(0)}}function v(){return function(){setTimeout(m,1)}}function m(){for(var t=0;t<X;t+=2){var e=ot[t],n=ot[t+1];e(n),ot[t]=void 0,ot[t+1]=void 0}X=0}function b(){try{var t=n(24);return G=t.runOnLoop||t.runOnContext,d()}catch(e){return v()}}function g(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function P(t){try{return t.then}catch(e){return ut.error=e,ut}}function T(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function O(t,e,n){Q(function(t){var r=!1,o=T(n,e,function(n){r||(r=!0,e!==n?k(t,n):x(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o))},t)}function E(t,e){e._state===at?x(t,e._result):e._state===st?S(t,e._result):A(e,void 0,function(e){k(t,e)},function(e){S(t,e)})}function j(t,e){if(e.constructor===t.constructor)E(t,e);else{var n=P(e);n===ut?S(t,ut.error):void 0===n?x(t,e):u(n)?O(t,e,n):x(t,e)}}function k(t,e){t===e?S(t,_()):s(e)?j(t,e):x(t,e)}function C(t){t._onerror&&t._onerror(t._result),R(t)}function x(t,e){t._state===it&&(t._result=e,t._state=at,0!==t._subscribers.length&&Q(R,t))}function S(t,e){t._state===it&&(t._state=st,t._result=e,Q(C,t))}function A(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+at]=n,o[i+st]=r,0===i&&t._state&&Q(R,t)}function R(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,a=0;a<e.length;a+=3)r=e[a],o=e[a+n],r?M(n,r,o,i):o(i);t._subscribers.length=0}}function D(){this.error=null}function I(t,e){try{return t(e)}catch(n){return lt.error=n,lt}}function M(t,e,n,r){var o,i,a,s,l=u(n);if(l){if(o=I(n,r),o===lt?(s=!0,i=o.error,o=null):a=!0,e===o)return void S(e,w())}else o=r,a=!0;e._state!==it||(l&&a?k(e,o):s?S(e,i):t===at?x(e,o):t===st&&S(e,o))}function L(t,e){try{e(function(e){k(t,e)},function(e){S(t,e)})}catch(n){S(t,n)}}function F(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(g),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?x(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&x(n.promise,n._result))):S(n.promise,n._validationError())}function U(t){return new ct(this,t).promise}function B(t){function e(t){k(o,t)}function n(t){S(o,t)}var r=this,o=new r(g);if(!J(t))return S(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,a=0;o._state===it&&a<i;a++)A(r.resolve(t[a]),void 0,e,n);return o}function N(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(g);return k(n,t),n}function V(t){var e=this,n=new e(g);return S(n,t),n}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(t){this._id=yt++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==t&&(u(t)||q(),this instanceof H||W(),L(this,t))}function Y(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=vt)}var $;$=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G,K,z,J=$,X=0,Q=({}.toString,function(t,e){ot[X]=t,ot[X+1]=e,X+=2,2===X&&(K?K(m):z())}),Z="undefined"!=typeof window?window:void 0,tt=Z||{},et=tt.MutationObserver||tt.WebKitMutationObserver,nt="undefined"!=typeof t&&"[object process]"==={}.toString.call(t),rt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ot=new Array(1e3);z=nt?f():et?h():rt?y():void 0===Z?b():v();var it=void 0,at=1,st=2,ut=new D,lt=new D;F.prototype._validateInput=function(t){return J(t)},F.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var ct=F;F.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===it&&o<e;o++)t._eachEntry(r[o],o)},F.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;l(t)?t.constructor===r&&t._state!==it?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},F.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===it&&(r._remaining--,t===st?S(o,n):r._result[e]=n),0===r._remaining&&x(o,r._result)},F.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,function(t){n._settledAt(at,e,t)},function(t){n._settledAt(st,e,t)})};var pt=U,ft=B,dt=N,ht=V,yt=0,vt=H;H.all=pt,H.race=ft,H.resolve=dt,H.reject=ht,H._setScheduler=c,H._setAsap=p,H._asap=Q,H.prototype={constructor:H,then:function(t,e){var n=this,r=n._state;if(r===at&&!t||r===st&&!e)return this;var o=new this.constructor(g),i=n._result;if(r){var a=arguments[r-1];Q(function(){M(r,o,a,i)})}else A(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var mt=Y,bt={Promise:vt,polyfill:mt};n(8).amd?(r=function(){return bt}.call(e,n,e,a),!(void 0!==r&&(a.exports=r))):"undefined"!=typeof a&&a.exports?a.exports=bt:"undefined"!=typeof this&&(this.ES6Promise=bt),mt()}).call(this),a.exports=i.Promise}).call(e,n(7),n(5).setImmediate,function(){return this}(),n(9)(t))},function(t,e,n){(function(e){!function(t){"use strict";function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function o(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function a(t){return t.bodyUsed?e.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function s(t){return new e(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function u(t){var e=new FileReader;return e.readAsArrayBuffer(t),s(e)}function l(t){var e=new FileReader;return e.readAsText(t),s(e)}function c(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(t){if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob?(this.blob=function(){var t=a(this);if(t)return t;if(this._bodyBlob)return e.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return e.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var t=a(this);if(t)return t;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return e.resolve(this._bodyText)}):this.text=function(){var t=a(this);return t?t:e.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}function f(t,e){e=e||{};var n=e.body;if(f.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function h(t){var e=new i,n=(t.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();e.append(r,o)}),e}function y(t,e){e||(e={}),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof i?e.headers:new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};i.prototype.append=function(t,e){t=n(t),e=r(e);var o=this.map[t];o||(o=[],this.map[t]=o),o.push(e)},i.prototype["delete"]=function(t){delete this.map[n(t)]},i.prototype.get=function(t){var e=this.map[n(t)];return e?e[0]:null},i.prototype.getAll=function(t){return this.map[n(t)]||[]},i.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},i.prototype.set=function(t,e){this.map[n(t)]=[r(e)]},i.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){t.call(e,r,n,this)},this)},this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),o(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),o(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),o(t)},v.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},c.call(f.prototype),c.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var b=[301,302,303,307,308];y.redirect=function(t,e){if(b.indexOf(e)===-1)throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=f,t.Response=y,t.fetch=function(t,n){return new e(function(e,r){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(t)&&!n?t:new f(t,n);var a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:h(a),url:o()},n="response"in a?a.response:a.responseText;e(new y(n,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&v.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),t.exports=self.fetch}).call(e,n(2))},function(t,e,n){var r,o,i;(function(n){!function(n,a){o=[e,t],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e){"use strict";function r(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function o(t){try{delete window[t]}catch(e){window[t]=void 0}}function i(t){var e=document.getElementById(t);document.getElementsByTagName("head")[0].removeChild(e)}function a(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=t,u=e.timeout||s.timeout,l=e.jsonpCallback||s.jsonpCallback,c=void 0;return new n(function(t,s){var p=e.jsonpCallbackFunction||r(),f=l+"_"+p;window[p]=function(e){t({ok:!0,json:function(){return n.resolve(e)}}),c&&clearTimeout(c),i(f),o(p)},a+=a.indexOf("?")===-1?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+l+"="+p),d.id=f,document.getElementsByTagName("head")[0].appendChild(d),c=setTimeout(function(){s(new Error("JSONP request to "+a+" timed out")),o(p),i(f)},u)})}var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};e.exports=a})}).call(e,n(15))},function(t,e){function n(t,e){for(var n in e)t.setAttribute(n,e[n])}function r(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function o(t,e){t.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,e(null,t))}}t.exports=function(t,e,i){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");"function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},s.type=e.type||"text/javascript",s.charset=e.charset||"utf8",s.async=!("async"in e)||!!e.async,s.src=t,e.attrs&&n(s,e.attrs),e.text&&(s.text=""+e.text);var u="onload"in s?r:o;u(s,i),s.onload||r(s,i),a.appendChild(s)}},function(t,e,n){"use strict";function r(t,e){return e.encode?e.strict?o(t):encodeURIComponent(t):t}var o=n(21),i=n(20);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t){var e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e},e.stringify=function(t,e){var n={encode:!0,strict:!0};return e=i(n,e),t?Object.keys(t).sort().map(function(n){var o=t[n];if(void 0===o)return"";if(null===o)return r(n,e);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(t){void 0!==t&&(null===t?i.push(r(n,e)):i.push(r(n,e)+"="+r(t,e)))}),i.join("&")}return r(n,e)+"="+r(o,e)}).filter(function(t){return t.length>0}).join("&"):""}},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,s=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var l in r)o.call(r,l)&&(s[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(s[a[c]]=r[a[c]])}}return s}},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function i(t){if(p===clearTimeout)return clearTimeout(t);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&s())}function s(){if(!y){var t=o(a);y=!0;for(var e=h.length;e;){for(d=h,h=[];++v<e;)d&&d[v].run();v=-1,e=h.length}d=null,y=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function l(){}var c,p,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(t){p=r}}();var d,h=[],y=!1,v=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new u(t,e)),1!==h.length||y||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e){},function(t,e){}]);
//# sourceMappingURL=ReactPlayer.js.map

@@ -25,3 +25,3 @@ 'use strict';

function Base() {
var _Object$getPrototypeO;
var _ref;

@@ -36,3 +36,3 @@ var _temp, _this, _ret;

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Base)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.isReady = false, _this.startOnPlay = true, _this.durationOnPlay = false, _this.seekOnPlay = null, _this.onPlay = function () {
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Base.__proto__ || Object.getPrototypeOf(Base)).call.apply(_ref, [this].concat(args))), _this), _this.isReady = false, _this.startOnPlay = true, _this.durationOnPlay = false, _this.seekOnPlay = null, _this.onPlay = function () {
if (_this.startOnPlay) {

@@ -75,2 +75,3 @@ _this.setVolume(_this.props.volume);

value: function componentDidMount() {
this.mounted = true;
if (this.props.url) {

@@ -84,2 +85,3 @@ this.load(this.props.url);

this.stop();
this.mounted = false;
}

@@ -86,0 +88,0 @@ }, {

@@ -37,3 +37,3 @@ 'use strict';

return _possibleConstructorReturn(this, Object.getPrototypeOf(FilePlayer).apply(this, arguments));
return _possibleConstructorReturn(this, (FilePlayer.__proto__ || Object.getPrototypeOf(FilePlayer)).apply(this, arguments));
}

@@ -46,18 +46,25 @@

this.player = this.refs.player;
this.player.oncanplay = this.onReady;
this.player.onplay = this.onPlay;
this.player.onpause = function () {
return _this2.props.onPause();
};
this.player.onended = function () {
return _this2.props.onEnded();
};
this.player.onerror = function (e) {
return _this2.props.onError(e);
};
this.player.addEventListener('canplay', this.onReady);
this.player.addEventListener('play', this.onPlay);
this.player.addEventListener('pause', function () {
if (_this2.mounted) {
_this2.props.onPause();
}
});
this.player.addEventListener('ended', this.props.onEnded);
this.player.addEventListener('error', this.props.onError);
this.player.setAttribute('webkit-playsinline', '');
_get(Object.getPrototypeOf(FilePlayer.prototype), 'componentDidMount', this).call(this);
_get(FilePlayer.prototype.__proto__ || Object.getPrototypeOf(FilePlayer.prototype), 'componentDidMount', this).call(this);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.player.removeEventListener('canplay', this.onReady);
this.player.removeEventListener('play', this.onPlay);
this.player.removeEventListener('pause', this.props.onPause);
this.player.removeEventListener('ended', this.props.onEnded);
this.player.removeEventListener('error', this.props.onError);
_get(FilePlayer.prototype.__proto__ || Object.getPrototypeOf(FilePlayer.prototype), 'componentWillUnmount', this).call(this);
}
}, {
key: 'load',

@@ -80,3 +87,2 @@ value: function load(url) {

value: function stop() {
this.pause();
this.player.removeAttribute('src');

@@ -87,3 +93,3 @@ }

value: function seekTo(fraction) {
_get(Object.getPrototypeOf(FilePlayer.prototype), 'seekTo', this).call(this, fraction);
_get(FilePlayer.prototype.__proto__ || Object.getPrototypeOf(FilePlayer.prototype), 'seekTo', this).call(this, fraction);
this.player.currentTime = this.getDuration() * fraction;

@@ -117,2 +123,4 @@ }

value: function render() {
var _this3 = this;
var _props = this.props;

@@ -130,3 +138,5 @@ var loop = _props.loop;

return _react2['default'].createElement(Media, _extends({
ref: 'player',
ref: function ref(player) {
_this3.player = player;
},
style: style,

@@ -133,0 +143,0 @@ preload: 'auto',

@@ -40,3 +40,3 @@ 'use strict';

function SoundCloud() {
var _Object$getPrototypeO;
var _ref;

@@ -51,3 +51,3 @@ var _temp, _this, _ret;

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(SoundCloud)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = SoundCloud.__proto__ || Object.getPrototypeOf(SoundCloud)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
image: null

@@ -60,3 +60,3 @@ }, _temp), _possibleConstructorReturn(_this, _ret);

value: function shouldComponentUpdate(nextProps, nextState) {
return _get(Object.getPrototypeOf(SoundCloud.prototype), 'shouldComponentUpdate', this).call(this, nextProps, nextState) || this.state.image !== nextState.image;
return _get(SoundCloud.prototype.__proto__ || Object.getPrototypeOf(SoundCloud.prototype), 'shouldComponentUpdate', this).call(this, nextProps, nextState) || this.state.image !== nextState.image;
}

@@ -87,5 +87,3 @@ }, {

this.getSongData(url).then(function (data) {
if (url !== _this3.props.url) {
return; // Abort if url changes during async requests
}
if (!_this3.mounted) return;
if (!data.streamable) {

@@ -105,2 +103,4 @@ _this3.props.onError(new Error('SoundCloud track is not streamable'));

value: function render() {
var _this4 = this;
var _props = this.props;

@@ -122,3 +122,5 @@ var url = _props.url;

_react2['default'].createElement('audio', {
ref: 'player',
ref: function ref(player) {
_this4.player = player;
},
type: 'audio/mpeg',

@@ -125,0 +127,0 @@ preload: 'auto',

@@ -49,3 +49,3 @@ 'use strict';

function Vimeo() {
var _Object$getPrototypeO;
var _ref;

@@ -60,3 +60,3 @@ var _temp, _this, _ret;

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Vimeo)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.onMessage = function (e) {
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Vimeo.__proto__ || Object.getPrototypeOf(Vimeo)).call.apply(_ref, [this].concat(args))), _this), _this.onMessage = function (e) {
if (!MATCH_MESSAGE_ORIGIN.test(e.origin)) return;

@@ -98,3 +98,2 @@ _this.origin = _this.origin || e.origin;

window.addEventListener('message', this.onMessage, false);
this.iframe = this.refs.iframe;

@@ -106,5 +105,11 @@ if (!this.props.url && this.props.vimeoConfig.preload) {

_get(Object.getPrototypeOf(Vimeo.prototype), 'componentDidMount', this).call(this);
_get(Vimeo.prototype.__proto__ || Object.getPrototypeOf(Vimeo.prototype), 'componentDidMount', this).call(this);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
window.removeEventListener('message', this.onMessage, false);
_get(Vimeo.prototype.__proto__ || Object.getPrototypeOf(Vimeo.prototype), 'componentWillUnmount', this).call(this);
}
}, {
key: 'getIframeParams',

@@ -138,3 +143,3 @@ value: function getIframeParams() {

value: function seekTo(fraction) {
_get(Object.getPrototypeOf(Vimeo.prototype), 'seekTo', this).call(this, fraction);
_get(Vimeo.prototype.__proto__ || Object.getPrototypeOf(Vimeo.prototype), 'seekTo', this).call(this, fraction);
this.postMessage('seekTo', this.duration * fraction);

@@ -165,2 +170,4 @@ }

value: function render() {
var _this2 = this;
var _getIframeParams = this.getIframeParams();

@@ -175,3 +182,10 @@

};
return _react2['default'].createElement('iframe', { ref: 'iframe', frameBorder: '0', style: style, allowFullScreen: fullscreen });
return _react2['default'].createElement('iframe', {
ref: function ref(iframe) {
_this2.iframe = iframe;
},
frameBorder: '0',
style: style,
allowFullScreen: fullscreen
});
}

@@ -178,0 +192,0 @@ }], [{

@@ -55,3 +55,3 @@ 'use strict';

function YouTube() {
var _Object$getPrototypeO;
var _ref;

@@ -66,4 +66,4 @@ var _temp, _this, _ret;

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(YouTube)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.playerId = PLAYER_ID + '-' + playerIdCount++, _this.onStateChange = function (_ref) {
var data = _ref.data;
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call.apply(_ref, [this].concat(args))), _this), _this.playerId = PLAYER_ID + '-' + playerIdCount++, _this.onStateChange = function (_ref2) {
var data = _ref2.data;
var _window$SDK_GLOBAL$Pl = window[SDK_GLOBAL].PlayerState;

@@ -96,3 +96,3 @@ var PLAYING = _window$SDK_GLOBAL$Pl.PLAYING;

}
_get(Object.getPrototypeOf(YouTube.prototype), 'componentDidMount', this).call(this);
_get(YouTube.prototype.__proto__ || Object.getPrototypeOf(YouTube.prototype), 'componentDidMount', this).call(this);
}

@@ -179,3 +179,3 @@ }, {

value: function seekTo(fraction) {
_get(Object.getPrototypeOf(YouTube.prototype), 'seekTo', this).call(this, fraction);
_get(YouTube.prototype.__proto__ || Object.getPrototypeOf(YouTube.prototype), 'seekTo', this).call(this, fraction);
if (!this.isReady || !this.player.seekTo) return;

@@ -182,0 +182,0 @@ this.player.seekTo(this.getDuration() * fraction);

@@ -18,2 +18,3 @@ 'use strict';

height: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
hidden: _react.PropTypes.bool,
className: _react.PropTypes.string,

@@ -53,2 +54,3 @@ style: _react.PropTypes.object,

height: 360,
hidden: false,
progressFrequency: 1000,

@@ -55,0 +57,0 @@ soundcloudConfig: {

@@ -11,4 +11,2 @@ 'use strict';

require('es6-promise');
var _react = require('react');

@@ -36,2 +34,6 @@

var _Streamable = require('./players/Streamable');
var _Streamable2 = _interopRequireDefault(_Streamable);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -51,3 +53,3 @@

function ReactPlayer() {
var _Object$getPrototypeO;
var _ref;

@@ -62,16 +64,22 @@ var _temp, _this, _ret;

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ReactPlayer)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.seekTo = function (fraction) {
var player = _this.refs.player;
if (player) {
player.seekTo(fraction);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ReactPlayer.__proto__ || Object.getPrototypeOf(ReactPlayer)).call.apply(_ref, [this].concat(args))), _this), _this.seekTo = function (fraction) {
if (_this.player) {
_this.player.seekTo(fraction);
}
}, _this.progress = function () {
if (_this.props.url && _this.refs.player) {
var loaded = _this.refs.player.getFractionLoaded() || 0;
var played = _this.refs.player.getFractionPlayed() || 0;
if (loaded !== _this.prevLoaded || played !== _this.prevPlayed) {
_this.props.onProgress({ loaded: loaded, played: played });
_this.prevLoaded = loaded;
_this.prevPlayed = played;
if (_this.props.url && _this.player) {
var loaded = _this.player.getFractionLoaded() || 0;
var played = _this.player.getFractionPlayed() || 0;
var progress = {};
if (loaded !== _this.prevLoaded) {
progress.loaded = loaded;
}
if (played !== _this.prevPlayed && _this.props.playing) {
progress.played = played;
}
if (progress.loaded || progress.playing) {
_this.props.onProgress(progress);
}
_this.prevLoaded = loaded;
_this.prevPlayed = played;
}

@@ -89,3 +97,6 @@ _this.progressTimeout = setTimeout(_this.progress, _this.props.progressFrequency);

var props = active ? _extends({}, activeProps, { ref: 'player' }) : {};
var ref = function ref(player) {
_this.player = player;
};
var props = active ? _extends({}, activeProps, { ref: ref }) : {};
return _react2['default'].createElement(Player, _extends({

@@ -107,12 +118,2 @@ key: Player.displayName,

}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.props.playing && !nextProps.playing) {
clearTimeout(this.progressTimeout);
}
if (!this.props.playing && nextProps.playing) {
this.progress();
}
}
}, {
key: 'componentWillUnmount',

@@ -125,3 +126,3 @@ value: function componentWillUnmount() {

value: function shouldComponentUpdate(nextProps) {
return this.props.url !== nextProps.url || this.props.playing !== nextProps.playing || this.props.volume !== nextProps.volume || this.props.height !== nextProps.height || this.props.width !== nextProps.width;
return this.props.url !== nextProps.url || this.props.playing !== nextProps.playing || this.props.volume !== nextProps.volume || this.props.height !== nextProps.height || this.props.width !== nextProps.width || this.props.hidden !== nextProps.hidden;
}

@@ -131,2 +132,3 @@ }, {

value: function renderPlayers() {
// Build array of players to render based on URL and preload config
var _props = this.props;

@@ -144,5 +146,9 @@ var url = _props.url;

players.push(_Vimeo2['default']);
} else if (_Streamable2['default'].canPlay(url)) {
players.push(_Streamable2['default']);
} else if (url) {
// Fall back to FilePlayer if nothing else can play the URL
players.push(_FilePlayer2['default']);
}
// Render additional players if preload config is set
if (!_YouTube2['default'].canPlay(url) && youtubeConfig.preload) {

@@ -165,3 +171,3 @@ players.push(_YouTube2['default']);

'div',
{ style: style, className: this.props.className },
{ style: style, className: this.props.className, hidden: this.props.hidden },
this.renderPlayers()

@@ -168,0 +174,0 @@ );

{
"name": "react-player",
"version": "0.9.0",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud and Vimeo",
"version": "0.10.0",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud, Streamable and Vimeo",
"main": "lib/ReactPlayer.js",

@@ -33,2 +33,3 @@ "scripts": {

"soundcloud",
"streamable",
"vimeo",

@@ -60,11 +61,11 @@ "react-component"

"chai": "^3.5.0",
"css-loader": "^0.23.0",
"css-loader": "^0.25.0",
"es6-promise": "^3.1.2",
"exports-loader": "^0.6.2",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"imports-loader": "^0.6.4",
"json-loader": "^0.5.4",
"karma": "^1.1.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^1.0.1",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.0",

@@ -76,3 +77,3 @@ "karma-firefox-launcher": "^1.0.0",

"karma-webpack": "^1.7.0",
"mocha": "^2.4.5",
"mocha": "^3.0.2",
"node-sass": "^3.4.2",

@@ -84,11 +85,11 @@ "normalize.css": "^4.0.0",

"sass-loader": "^4.0.0",
"snazzy": "^4.0.0",
"standard": "^7.1.0",
"snazzy": "^5.0.0",
"standard": "^8.0.0",
"style-loader": "^0.13.0",
"webpack": "^1.12.9",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0"
"webpack-hot-middleware": "^2.6.0",
"whatwg-fetch": "^1.0.0"
},
"dependencies": {
"es6-promise": "^3.1.2",
"fetch-jsonp": "^1.0.0",

@@ -95,0 +96,0 @@ "load-script": "^1.0.0",

@@ -7,8 +7,10 @@ ReactPlayer

[![Dependency Status](https://img.shields.io/david/CookPete/react-player.svg)](https://david-dm.org/CookPete/react-player)
[![devDependency Status](https://img.shields.io/david/dev/CookPete/react-player.svg)](https://david-dm.org/CookPete/react-player#info=devDependencies)
[![devDependency Status](https://img.shields.io/david/dev/CookPete/react-player.svg)](https://david-dm.org/CookPete/react-player?type=dev)
A react component for playing media from YouTube, SoundCloud and Vimeo, as well as supported media files. Used by [rplayr](http://rplayr.com), an app to generate playlists from Reddit URLs.
A react component for playing media from YouTube, SoundCloud, Streamable or Vimeo, as well as supported media files. Used by [rplayr](http://rplayr.com), an app to generate playlists from Reddit URLs.
The component parses a URL and loads in the appropriate markup and external SDKs to play media from [various sources](#supported-media). [Props](#props) can be passed in to control playback and react to events such as buffering or media ending.
If you are using `npm` and need to support [browsers without `Promise`](http://caniuse.com/#feat=promises) you will need a [`Promise` polyfill](https://github.com/stefanpenner/es6-promise). If you are playing `Streamable` videos you will also need a [`fetch` polyfill](https://github.com/github/fetch) for [browsers without `fetch`](http://caniuse.com/#feat=fetch)
### Usage

@@ -82,2 +84,3 @@

`height` | Sets the height of the player | `360`
`hidden` | Set to `true` to hide the player | `false`
`className` | Pass in a `className` to set on the root element

@@ -125,4 +128,5 @@ `style` | Add [inline styles](https://facebook.github.io/react/tips/inline-styles.html) to the root element

* Soundcloud tracks are [resolved](https://developers.soundcloud.com/docs/api/reference#resolve) and played in an [`<audio>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/audio) element using the track’s `stream_url`
* Streamable videos are [resolved](https://streamable.com/documentation#retrieve-video) and played in a [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) element using the track’s `mp4` path
* Vimeo videos use the [Vimeo Player API](https://developer.vimeo.com/player/js-api)
* [Supported file types](https://github.com/CookPete/react-player/blob/master/src/players/FilePlayer.js#L5-L6) are playing using [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/audio) or [`<audio>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/audio) elements
* [Supported file types](https://github.com/CookPete/react-player/blob/master/src/players/FilePlayer.js#L5-L6) are playing using [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) or [`<audio>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/audio) elements

@@ -129,0 +133,0 @@ ### Contributing

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc