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.25.1 to 0.25.2

.npm-version

8

CHANGELOG.md

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

#### [v0.25.2](https://github.com/CookPete/react-player/compare/v0.25.1...v0.25.2)
> 17 October 2017
* tweak Vimeo duration logic [`#251`](https://github.com/CookPete/react-player/pull/251)
* Bump packages [`bf40e5f`](https://github.com/CookPete/react-player/commit/bf40e5fce5653df79f245588440f7b2f20f9a6cb)
* Fix dash autoplay logic [`4e3545e`](https://github.com/CookPete/react-player/commit/4e3545ef8f0e1b46b4a1dcab0c4881c4e507b7f8)
#### [v0.25.1](https://github.com/CookPete/react-player/compare/v0.25.0...v0.25.1)

@@ -9,0 +17,0 @@ > 17 October 2017

2

dist/ReactPlayer.js

@@ -1,2 +0,2 @@

var ReactPlayer=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t){e.exports=React},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=e.match(b);if(t){var r=t[1];if(r.match(m))return i(r);if(g.test(r))return parseInt(r,10)}return 0}function i(e){for(var t=0,r=m.exec(e);null!==r;){var n=r,o=p(n,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),r=m.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};return window[t]&&n(window[t])?Promise.resolve(window[t]):new Promise(function(n,o){if(r){var a=window[r];window[r]=function(){a&&a(),n(window[t])}}(0,y.default)(e,function(e){e&&o(e),r||n(window[t])})})}function s(e,t,r){var n=(0,h.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=v.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var p=c.replace(/Config$/,"");if(n=(0,h.default)(n,o({},p,e[c])),r){var f="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(f,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return n}function c(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=(t=[]).concat.apply(t,n),i={},l=Object.keys(e),u=!0,s=!1,c=void 0;try{for(var p,f=l[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var y=p.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}return i}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=a,t.randomString=l,t.getSDK=u,t.getConfig=s,t.omit=c;var f=r(11),y=n(f),d=r(12),h=n(d),v=r(3),b=/[?&#](?:start|t)=([0-9hms]+)/,m=/(\d+)(h|m|s)/g,g=/^\d+$/},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(0),u=r(3),s=function(e){function t(){var e,r,a,i;n(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.isReady=!1,a.startOnPlay=!0,a.seekOnPlay=null,a.onPlay=function(){var e=a.props,t=e.volume,r=e.muted,n=e.onStart,o=e.onPlay,i=e.playbackRate;a.startOnPlay&&(a.setPlaybackRate&&a.setPlaybackRate(i),a.setVolume(r?0:t),n(),a.startOnPlay=!1),o(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onReady=function(){var e=a.props,t=e.onReady,r=e.playing;a.isReady=!0,a.loadingSDK=!1,t(),(r||a.preloading)&&(a.preloading=!1,a.loadOnReady?(a.load(a.loadOnReady),a.loadOnReady=null):a.play()),a.onDurationCheck()},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.props.onDuration(e):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},i=r,o(a,i)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){var e=this.props.url;this.mounted=!0,e&&this.load(e)}},{key:"componentWillUnmount",value:function(){this.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,r=t.url,n=t.playing,o=t.volume,a=t.muted,i=t.playbackRate;r!==e.url&&e.url&&(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)),r&&!e.url&&(this.stop(),clearTimeout(this.updateTimeout)),!n&&e.playing&&this.play(),n&&!e.playing&&this.pause(),o===e.volume||e.muted||this.setVolume(e.volume),a!==e.muted&&this.setVolume(e.muted?0:e.volume),i!==e.playbackRate&&this.setPlaybackRate&&this.setPlaybackRate(e.playbackRate)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"callPlayer",value:function(e){var t;if(!this.isReady||!this.player||!this.player[e]){var r="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.isReady?this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available":r+="The player was not ready",console.warn(r,"font-weight: bold",""),null}for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}},{key:"seekTo",value:function(e){var t=this;return this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},5e3)),e>0&&e<1?this.getDuration()*e:e}}]),t}(l.Component);s.propTypes=u.propTypes,s.defaultProps=u.defaultProps,t.default=s,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var n=r(6),o=function(e){return e&&e.__esModule?e:{default:e}}(n),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,s=o.default.oneOfType,c=o.default.shape,p=o.default.object,f=o.default.func;t.propTypes={url:s([a,u]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:s([a,l]),height:s([a,l]),style:p,progressFrequency:l,playsinline:i,config:c({soundcloud:c({options:p}),youtube:c({playerVars:p,preload:i}),facebook:c({appId:a}),dailymotion:c({params:p,preload:i}),vimeo:c({iframeParams:p,preload:i}),vidme:c({format:a}),file:c({attributes:p,tracks:u,forceAudio:i,forceHLS:i,forceDASH:i}),wistia:c({options:p})}),onReady:f,onStart:f,onPlay:f,onPause:f,onBuffer:f,onEnded:f,onError:f,onDuration:f,onSeek:f,onProgress:f},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,muted:!1,playbackRate:1,width:640,height:360,style:{},progressFrequency:1e3,playsinline:!1,config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},preload:!1},facebook:{appId:"1309697205772819"},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,autoplay:!1,byline:!1,portrait:!1,title:!1},preload:!1},vidme:{format:null},file:{attributes:{},tracks:[],forceAudio:!1,forceHLS:!1,forceDASH:!1},wistia:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","vidmeConfig","fileConfig","wistiaConfig"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,v=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,b=/\.(m3u8)($|\?)/i,m=/\.(mpd)($|\?)/i,g=function(e){function t(){var e,r,n,i;o(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),n.onSeek=function(e){n.props.onSeek(e.target.currentTime)},n.renderSource=function(e){if("string"==typeof e)return p.default.createElement("source",{key:e,src:e});var t=e.src,r=e.type;return p.default.createElement("source",{key:t,src:t,type:r})},n.renderTrack=function(e,t){return p.default.createElement("track",l({key:t},e))},n.ref=function(e){n.player=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.addListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillReceiveProps",this).call(this,e)}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"addListeners",value:function(){var e=this.props,t=e.playsinline,r=e.onPause,n=e.onEnded,o=e.onError;this.player.addEventListener("canplay",this.onReady),this.player.addEventListener("play",this.onPlay),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",n),this.player.addEventListener("error",o),t&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onPause,r=e.onEnded,n=e.onError;this.player.removeEventListener("canplay",this.onReady),this.player.removeEventListener("play",this.onPlay),this.player.removeEventListener("pause",t),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",r),this.player.removeEventListener("error",n)}},{key:"shouldUseAudio",value:function(e){return h.test(e.url)||e.config.file.forceAudio}},{key:"shouldUseHLS",value:function(e){return b.test(e)||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return m.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;this.shouldUseHLS(e)&&(0,d.getSDK)("https://cdn.jsdelivr.net/hls.js/latest/hls.min.js","Hls").then(function(r){t.hls=new r,t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,d.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.5.0/dash.all.min.js","dashjs").then(function(r){t.dash=r.MediaPlayer().create(),t.dash.initialize(t.player,e,!0),t.dash.getDebug().setLogToBrowserConsole(!1)})}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.detachMedia()}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.player.currentTime=r}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return 0===this.player.buffered.length?0:this.player.buffered.end(0)}},{key:"render",value:function(){var e=this.props,t=e.url,r=e.loop,n=e.controls,o=e.config,a=e.width,i=e.height,u=this.shouldUseAudio(this.props),s=this.shouldUseHLS(t),c=this.shouldUseDASH(t),f=u?"audio":"video",y=t instanceof Array||s||c?void 0:t,d={width:a&&"auto"!==a?"100%":a,height:i&&"auto"!==i?"100%":i,display:t?"block":"none"};return p.default.createElement(f,l({ref:this.ref,src:y,style:d,preload:"auto",controls:n,loop:r},o.file.attributes),t instanceof Array&&t.map(this.renderSource),o.file.tracks.map(this.renderTrack))}}],[{key:"canPlay",value:function(e){if(e instanceof Array){var t=!0,r=!1,n=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if("string"==typeof i&&this.canPlay(i))return!0;if(this.canPlay(i.src))return!0}}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}return!1}return h.test(e)||v.test(e)||b.test(e)||m.test(e)}}]),t}(y.default);g.displayName="FilePlayer",t.default=g,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(0),c=n(s),p=r(3),f=r(1),y=r(13),d=n(y),h=r(14),v=n(h),b=r(15),m=n(b),g=r(16),P=n(g),k=r(4),w=n(k),_=r(17),O=n(_),j=r(18),E=n(j),T=r(19),S=n(T),D=r(20),R=n(D),C=r(21),A=n(C),L=Object.keys(p.propTypes),x=[d.default,v.default,m.default,P.default,O.default,E.default,S.default,A.default,R.default],ReactPlayer=function(e){function ReactPlayer(){var e,t,r,n;o(this,ReactPlayer);for(var i=arguments.length,u=Array(i),s=0;s<i;s++)u[s]=arguments[s];return t=r=a(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(u))),r.config=(0,f.getConfig)(r.props,p.defaultProps,!0),r.seekTo=function(e){if(!r.player)return null;r.player.seekTo(e)},r.getDuration=function(){return r.player?r.player.getDuration():null},r.getCurrentTime=function(){return r.player?r.player.getCurrentTime():null},r.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return r.player?r.player[e]:null},r.progress=function(){if(r.props.url&&r.player&&r.player.isReady){var e=r.player.getCurrentTime()||0,t=r.player.getSecondsLoaded(),n=r.player.getDuration();if(n){var o={playedSeconds:e,played:e/n};null!==t&&(o.loadedSeconds=t,o.loaded=t/n),o.played===r.prevPlayed&&o.loaded===r.prevLoaded||r.props.onProgress(o),r.prevPlayed=o.played,r.prevLoaded=o.loaded}}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(e){return c.default.createElement(e,l({},r.props,{ref:r.activePlayerRef,key:e.displayName,config:r.config}))},r.activePlayerRef=function(e){r.player=e},r.wrapperRef=function(e){r.wrapper=e},r.renderPreloadPlayer=function(e){return c.default.createElement(e,{key:e.displayName,config:r.config})},n=t,a(r,n)}return i(ReactPlayer,e),u(ReactPlayer,[{key:"componentDidMount",value:function(){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.muted!==e.muted||this.props.playbackRate!==e.playbackRate||this.props.height!==e.height||this.props.width!==e.width||this.props.hidden!==e.hidden}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=!0,r=!1,n=void 0;try{for(var o,a=x[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if(i.canPlay(e))return this.renderPlayer(i)}}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}return this.renderPlayer(w.default)}},{key:"renderPreloadPlayers",value:function(e){var t=[];return!d.default.canPlay(e)&&this.config.youtube.preload&&t.push(d.default),!m.default.canPlay(e)&&this.config.vimeo.preload&&t.push(m.default),!R.default.canPlay(e)&&this.config.dailymotion.preload&&t.push(R.default),t.map(this.renderPreloadPlayer)}},{key:"render",value:function(){var e=this.props,t=e.url,r=e.style,n=e.width,o=e.height,a=(0,f.omit)(this.props,L,p.DEPRECATED_CONFIG_PROPS),i=this.renderActivePlayer(t),u=this.renderPreloadPlayers(t);return c.default.createElement("div",l({ref:this.wrapperRef,style:l({},r,{width:n,height:o})},a),i,u)}}]),ReactPlayer}(s.Component);ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=p.propTypes,ReactPlayer.defaultProps=p.defaultProps,ReactPlayer.canPlay=function(e){var t=[].concat(x,[w.default]),r=!0,n=!1,o=void 0;try{for(var a,i=t[Symbol.iterator]();!(r=(a=i.next()).done);r=!0){if(a.value.canPlay(e))return!0}}catch(e){n=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(n)throw o}}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,r){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=r(7)()},function(e,t,r){"use strict";var n=r(8),o=r(9),a=r(10);e.exports=function(){function e(e,t,r,n,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";function n(e,t,r,n,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,a,i,l,u],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";function n(e,t){for(var r in t)e.setAttribute(r,t[r])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,r){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&n(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,r),l.onload||o(l,r),i.appendChild(l)}},function(e,t,r){"use strict";function n(e){return!!e&&"object"===(void 0===e?"undefined":c(e))}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"!==t&&"[object Date]"!==t}function a(e){return Array.isArray(e)?[]:{}}function i(e,t){return t&&!0===t.clone&&p(e)?s(a(e),e,t):e}function l(e,t,r){var n=e.slice();return t.forEach(function(t,o){void 0===n[o]?n[o]=i(t,r):p(t)?n[o]=s(e[o],t,r):-1===e.indexOf(t)&&n.push(i(t,r))}),n}function u(e,t,r){var n={};return p(e)&&Object.keys(e).forEach(function(t){n[t]=i(e[t],r)}),Object.keys(t).forEach(function(o){p(t[o])&&e[o]?n[o]=s(e[o],t[o],r):n[o]=i(t[o],r)}),n}function s(e,t,r){var n=Array.isArray(t),o=Array.isArray(e),a=r||{arrayMerge:l};if(n===o)return n?(a.arrayMerge||l)(e,t,r):u(e,t,r);return i(t,r)}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e){return n(e)&&o(e)};s.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,r){return s(e,r,t)})};var f=s;e.exports=f},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h="YT",v=/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.onStateChange=function(e){var t=e.data,r=n.props,o=r.onPause,a=r.onBuffer,i=window[h].PlayerState,l=i.PLAYING,u=i.PAUSED,s=i.BUFFERING,c=i.ENDED,p=i.CUED;t===l&&n.onPlay(),t===u&&o(),t===s&&a(),t===c&&n.onEnded(),t===p&&n.onReady()},n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.youtube.preload&&(this.preloading=!0,this.load("https://www.youtube.com/watch?v=GlCmAC4MHek")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"load",value:function(e){var t=this,r=this.props,n=r.playsinline,o=r.controls,a=r.config,i=r.onError,u=e&&e.match(v)[1];return this.isReady?void this.player.cueVideoById({videoId:u,startSeconds:(0,d.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://www.youtube.com/iframe_api",h,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(r){t.player=new r.Player(t.container,{width:"100%",height:"100%",videoId:u,playerVars:l({controls:o?1:0,start:(0,d.parseStartTime)(e),origin:window.location.origin,playsinline:n},a.youtube.playerVars),events:{onReady:t.onReady,onStateChange:t.onStateChange,onError:function(e){return i(e.data)}}})},i))}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){this.preloading||document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seekTo",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(y.default);b.displayName="YouTube",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,v={visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1},b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.fractionLoaded=null,n.ref=function(e){n.iframe=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"load",value:function(e){var t=this;(0,d.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){var n=r.Widget.Events,o=n.PLAY,a=n.PLAY_PROGRESS,i=n.PAUSE,u=n.FINISH,s=n.ERROR;t.isReady||(t.player=r.Widget(t.iframe),t.player.bind(o,function(){t.widgetIsPlaying=!0,t.onPlay()}),t.player.bind(i,function(){t.widgetIsPlaying=!1,t.props.onPause()}),t.player.bind(a,function(e){t.currentTime=e.currentPosition/1e3,t.fractionLoaded=e.loadedProgress}),t.player.bind(u,function(){return t.props.onEnded()}),t.player.bind(s,function(e){return t.props.onError(e)})),t.player.load(e,l({},v,t.props.config.soundcloud.options,{callback:function(){t.widgetIsPlaying=!1,t.player.getDuration(function(e){t.duration=e/1e3,t.onReady()})}}))})}},{key:"play",value:function(){this.widgetIsPlaying||this.callPlayer("play")}},{key:"pause",value:function(){this.widgetIsPlaying&&this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seekTo",1e3*r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);b.displayName="SoundCloud",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,v=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.secondsLoaded=null,n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.vimeo.preload&&(this.preloading=!0,this.load("https://vimeo.com/127250231")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"load",value:function(e){var t=this,r=e.match(h)[3];return this.duration=null,this.isReady?void this.player.loadVideo(r).catch(this.props.onError):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(r){t.player=new r.Player(t.container,l({},t.props.config.vimeo.playerOptions,{url:e,loop:t.props.loop})),t.player.ready().then(function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%",t.player.getDuration().then(function(e){t.duration=e})}).catch(t.props.onError),t.player.on("loaded",t.onReady),t.player.on("play",t.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",function(e){return t.props.onSeek(e.seconds)}),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var r=e.seconds;t.currentTime=r}),t.player.on("progress",function(e){var r=e.seconds;t.secondsLoaded=r})},this.props.onError))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.preloading||this.callPlayer("unload")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("setCurrentTime",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e={width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e,ref:this.ref})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="Vimeo",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d="//connect.facebook.net/en_US/sdk.js",h=/^https:\/\/www\.facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,v="facebook-player-",b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.playerID=v+(0,y.randomString)(),n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this;if(this.isReady)return void(0,y.getSDK)(d,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,y.getSDK)(d,"FB","fbAsyncInit").then(function(e){e.init({appId:t.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",function(e){"video"===e.type&&e.id===t.playerID&&(t.player=e.instance,t.player.subscribe("startedPlaying",t.onPlay),t.player.subscribe("paused",t.props.onPause),t.player.subscribe("finishedPlaying",t.onEnded),t.player.subscribe("startedBuffering",t.props.onBuffer),t.player.subscribe("error",t.props.onError),t.onReady())})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.player.seek(r)}},{key:"setVolume",value:function(e){0!==e&&this.callPlayer("unmute"),this.player.setVolume(e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black"};return c.default.createElement("div",{style:e,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-allowfullscreen":"true","data-controls":this.props.controls?void 0:"false"})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(f.default);b.displayName="Facebook",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,h=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.secondsLoaded=null,n.ref=function(e){n.iframe=e},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this;if(this.loadingSDK)return void(this.loadOnReady=e);this.loadingSDK=!0,(0,y.getSDK)("//cdn.embed.ly/player-0.0.12.min.js","playerjs").then(function(e){t.player=new e.Player(t.iframe),t.player.on("ready",t.onReady),t.player.on("play",t.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var r=e.duration,n=e.seconds;t.duration=r,t.currentTime=n}),t.player.on("progress",function(e){var r=e.percent;t.duration&&(t.secondsLoaded=t.duration*r)})},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("setCurrentTime",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(d)[1],t={width:"100%",height:"100%"};return c.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}],[{key:"canPlay",value:function(e){return d.test(e)}}]),t}(f.default);h.displayName="Streamable",t.default=h,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(4),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=/^https?:\/\/vid.me\/([a-z0-9]+)$/i,c={},p=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"getData",value:function(e){var t=this.props.onError,r=e.match(s)[1];return c[r]?Promise.resolve(c[r]):window.fetch("https://api.vid.me/videoByUrl/"+r).then(function(e){if(200===e.status)return c[r]=e.json(),c[r];t(new Error("Vidme track could not be resolved"))})}},{key:"getURL",value:function(e){var t=e.video,r=this.props.config;if(r.vidme.format&&t.formats&&0!==t.formats.length){var n=t.formats.findIndex(function(e){return e.type===r.vidme.format});if(-1!==n)return t.formats[n].uri;console.warn('Vidme format "'+r.vidme.format+'" was not found for '+t.full_url)}return t.complete_url}},{key:"load",value:function(e){var t=this,r=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=t.getURL(e))},r)}}],[{key:"canPlay",value:function(e){return s.test(e)}}]),t}(u.default);p.displayName="Vidme",t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,v=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"getID",value:function(e){return e&&e.match(h)[4]}},{key:"load",value:function(e){var t=this,r=this.props,n=r.controls,o=r.onStart,a=r.onPause,i=r.onSeek,u=r.onEnded,s=r.config;this.loadingSDK=!0,(0,d.getSDK)("//fast.wistia.com/assets/external/E-v1.js","Wistia").then(function(){window._wq=window._wq||[],window._wq.push({id:t.getID(e),options:l({controlsVisibleOnLoad:n},s.wistia.options),onReady:function(e){t.player=e,t.player.bind("start",o),t.player.bind("play",t.onPlay),t.player.bind("pause",a),t.player.bind("seek",i),t.player.bind("end",u),t.onReady()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("remove")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("time",r)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,r={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{key:e,className:t,style:r})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="Wistia",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,v=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.onDurationChange=function(e){(0,n.props.onDuration)(n.getDuration())},n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.dailymotion.preload&&(this.preloading=!0,this.load("http://www.dailymotion.com/video/x522udb")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"parseId",value:function(e){var t=e.match(h);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,r=this.props,n=r.controls,o=r.config,a=r.onError,i=r.playing,u=this.parseId(e);return this.player?void this.player.load(u,{start:(0,d.parseStartTime)(e),autoplay:i}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(r){var i=r.player;t.player=new i(t.container,{width:"100%",height:"100%",video:u,params:l({controls:n,autoplay:t.props.playing,start:(0,d.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:function(){t.loadingSDK=!1,t.onReady()},seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})},a))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seek",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.isReady?this.player.duration||null:null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="DailyMotion",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d=/^(?:https?:\/\/)?(?:www\.)twitch\.tv\/videos\/(\d+)($|\?)/,h=/^(?:https?:\/\/)?(?:www\.)twitch\.tv\/([a-z0-9_]+)($|\?)/,v="twitch-player-",b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.playerID=v+(0,y.randomString)(),n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this,r=this.props,n=r.playsinline,o=r.onError,a=h.test(e),i=a?e.match(h)[1]:e.match(d)[1];return this.isReady?void(a?this.player.setChannel(i):this.player.setVideo("v"+i)):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,y.getSDK)("//player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){t.player=new e.Player(t.playerID,{video:a?"":i,channel:a?i:"",height:"100%",width:"100%",playsinline:n});var r=e.Player,o=r.READY,l=r.PLAY,u=r.PAUSE,s=r.ENDED;t.player.addEventListener(o,t.onReady),t.player.addEventListener(l,t.onPlay),t.player.addEventListener(u,t.props.onPause),t.player.addEventListener(s,t.onEnded)},o))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seek",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return c.default.createElement("div",{style:e,id:this.playerID})}}],[{key:"canPlay",value:function(e){return d.test(e)||h.test(e)}}]),t}(f.default);b.displayName="Twitch",t.default=b,e.exports=t.default}]);
var ReactPlayer=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t){e.exports=React},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=e.match(b);if(t){var r=t[1];if(r.match(m))return i(r);if(g.test(r))return parseInt(r,10)}return 0}function i(e){for(var t=0,r=m.exec(e);null!==r;){var n=r,o=p(n,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),r=m.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};return window[t]&&n(window[t])?Promise.resolve(window[t]):new Promise(function(n,o){if(r){var a=window[r];window[r]=function(){a&&a(),n(window[t])}}(0,y.default)(e,function(e){e&&o(e),r||n(window[t])})})}function s(e,t,r){var n=(0,h.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=v.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var p=c.replace(/Config$/,"");if(n=(0,h.default)(n,o({},p,e[c])),r){var f="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(f,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return n}function c(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=(t=[]).concat.apply(t,n),i={},l=Object.keys(e),u=!0,s=!1,c=void 0;try{for(var p,f=l[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var y=p.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}return i}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=a,t.randomString=l,t.getSDK=u,t.getConfig=s,t.omit=c;var f=r(11),y=n(f),d=r(12),h=n(d),v=r(3),b=/[?&#](?:start|t)=([0-9hms]+)/,m=/(\d+)(h|m|s)/g,g=/^\d+$/},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(0),u=r(3),s=function(e){function t(){var e,r,a,i;n(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.isReady=!1,a.startOnPlay=!0,a.seekOnPlay=null,a.onPlay=function(){var e=a.props,t=e.volume,r=e.muted,n=e.onStart,o=e.onPlay,i=e.playbackRate;a.startOnPlay&&(a.setPlaybackRate&&a.setPlaybackRate(i),a.setVolume(r?0:t),n(),a.startOnPlay=!1),o(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onReady=function(){var e=a.props,t=e.onReady,r=e.playing;a.isReady=!0,a.loadingSDK=!1,t(),(r||a.preloading)&&(a.preloading=!1,a.loadOnReady?(a.load(a.loadOnReady),a.loadOnReady=null):a.play()),a.onDurationCheck()},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.props.onDuration(e):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},i=r,o(a,i)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){var e=this.props.url;this.mounted=!0,e&&this.load(e)}},{key:"componentWillUnmount",value:function(){this.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,r=t.url,n=t.playing,o=t.volume,a=t.muted,i=t.playbackRate;r!==e.url&&e.url&&(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)),r&&!e.url&&(this.stop(),clearTimeout(this.updateTimeout)),!n&&e.playing&&this.play(),n&&!e.playing&&this.pause(),o===e.volume||e.muted||this.setVolume(e.volume),a!==e.muted&&this.setVolume(e.muted?0:e.volume),i!==e.playbackRate&&this.setPlaybackRate&&this.setPlaybackRate(e.playbackRate)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"callPlayer",value:function(e){var t;if(!this.isReady||!this.player||!this.player[e]){var r="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.isReady?this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available":r+="The player was not ready",console.warn(r,"font-weight: bold",""),null}for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}},{key:"seekTo",value:function(e){var t=this;return this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},5e3)),e>0&&e<1?this.getDuration()*e:e}}]),t}(l.Component);s.propTypes=u.propTypes,s.defaultProps=u.defaultProps,t.default=s,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var n=r(6),o=function(e){return e&&e.__esModule?e:{default:e}}(n),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,s=o.default.oneOfType,c=o.default.shape,p=o.default.object,f=o.default.func;t.propTypes={url:s([a,u]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:s([a,l]),height:s([a,l]),style:p,progressFrequency:l,playsinline:i,config:c({soundcloud:c({options:p}),youtube:c({playerVars:p,preload:i}),facebook:c({appId:a}),dailymotion:c({params:p,preload:i}),vimeo:c({iframeParams:p,preload:i}),vidme:c({format:a}),file:c({attributes:p,tracks:u,forceAudio:i,forceHLS:i,forceDASH:i}),wistia:c({options:p})}),onReady:f,onStart:f,onPlay:f,onPause:f,onBuffer:f,onEnded:f,onError:f,onDuration:f,onSeek:f,onProgress:f},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,muted:!1,playbackRate:1,width:640,height:360,style:{},progressFrequency:1e3,playsinline:!1,config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},preload:!1},facebook:{appId:"1309697205772819"},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,autoplay:!1,byline:!1,portrait:!1,title:!1},preload:!1},vidme:{format:null},file:{attributes:{},tracks:[],forceAudio:!1,forceHLS:!1,forceDASH:!1},wistia:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","vidmeConfig","fileConfig","wistiaConfig"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,v=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,b=/\.(m3u8)($|\?)/i,m=/\.(mpd)($|\?)/i,g=function(e){function t(){var e,r,n,i;o(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),n.onSeek=function(e){n.props.onSeek(e.target.currentTime)},n.renderSource=function(e){if("string"==typeof e)return p.default.createElement("source",{key:e,src:e});var t=e.src,r=e.type;return p.default.createElement("source",{key:t,src:t,type:r})},n.renderTrack=function(e,t){return p.default.createElement("track",l({key:t},e))},n.ref=function(e){n.player=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.addListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillReceiveProps",this).call(this,e)}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"addListeners",value:function(){var e=this.props,t=e.playsinline,r=e.onPause,n=e.onEnded,o=e.onError;this.player.addEventListener("canplay",this.onReady),this.player.addEventListener("play",this.onPlay),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",n),this.player.addEventListener("error",o),t&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onPause,r=e.onEnded,n=e.onError;this.player.removeEventListener("canplay",this.onReady),this.player.removeEventListener("play",this.onPlay),this.player.removeEventListener("pause",t),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",r),this.player.removeEventListener("error",n)}},{key:"shouldUseAudio",value:function(e){return h.test(e.url)||e.config.file.forceAudio}},{key:"shouldUseHLS",value:function(e){return b.test(e)||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return m.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;this.shouldUseHLS(e)&&(0,d.getSDK)("https://cdn.jsdelivr.net/hls.js/latest/hls.min.js","Hls").then(function(r){t.hls=new r,t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,d.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.5.0/dash.all.min.js","dashjs").then(function(r){t.dash=r.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)})}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.detachMedia()}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.player.currentTime=r}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return 0===this.player.buffered.length?0:this.player.buffered.end(0)}},{key:"render",value:function(){var e=this.props,t=e.url,r=e.loop,n=e.controls,o=e.config,a=e.width,i=e.height,u=this.shouldUseAudio(this.props),s=this.shouldUseHLS(t),c=this.shouldUseDASH(t),f=u?"audio":"video",y=t instanceof Array||s||c?void 0:t,d={width:a&&"auto"!==a?"100%":a,height:i&&"auto"!==i?"100%":i,display:t?"block":"none"};return p.default.createElement(f,l({ref:this.ref,src:y,style:d,preload:"auto",controls:n,loop:r},o.file.attributes),t instanceof Array&&t.map(this.renderSource),o.file.tracks.map(this.renderTrack))}}],[{key:"canPlay",value:function(e){if(e instanceof Array){var t=!0,r=!1,n=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if("string"==typeof i&&this.canPlay(i))return!0;if(this.canPlay(i.src))return!0}}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}return!1}return h.test(e)||v.test(e)||b.test(e)||m.test(e)}}]),t}(y.default);g.displayName="FilePlayer",t.default=g,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(0),c=n(s),p=r(3),f=r(1),y=r(13),d=n(y),h=r(14),v=n(h),b=r(15),m=n(b),g=r(16),P=n(g),k=r(4),w=n(k),_=r(17),O=n(_),j=r(18),E=n(j),T=r(19),S=n(T),D=r(20),R=n(D),C=r(21),A=n(C),L=Object.keys(p.propTypes),x=[d.default,v.default,m.default,P.default,O.default,E.default,S.default,A.default,R.default],ReactPlayer=function(e){function ReactPlayer(){var e,t,r,n;o(this,ReactPlayer);for(var i=arguments.length,u=Array(i),s=0;s<i;s++)u[s]=arguments[s];return t=r=a(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(u))),r.config=(0,f.getConfig)(r.props,p.defaultProps,!0),r.seekTo=function(e){if(!r.player)return null;r.player.seekTo(e)},r.getDuration=function(){return r.player?r.player.getDuration():null},r.getCurrentTime=function(){return r.player?r.player.getCurrentTime():null},r.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return r.player?r.player[e]:null},r.progress=function(){if(r.props.url&&r.player&&r.player.isReady){var e=r.player.getCurrentTime()||0,t=r.player.getSecondsLoaded(),n=r.player.getDuration();if(n){var o={playedSeconds:e,played:e/n};null!==t&&(o.loadedSeconds=t,o.loaded=t/n),o.played===r.prevPlayed&&o.loaded===r.prevLoaded||r.props.onProgress(o),r.prevPlayed=o.played,r.prevLoaded=o.loaded}}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.renderPlayer=function(e){return c.default.createElement(e,l({},r.props,{ref:r.activePlayerRef,key:e.displayName,config:r.config}))},r.activePlayerRef=function(e){r.player=e},r.wrapperRef=function(e){r.wrapper=e},r.renderPreloadPlayer=function(e){return c.default.createElement(e,{key:e.displayName,config:r.config})},n=t,a(r,n)}return i(ReactPlayer,e),u(ReactPlayer,[{key:"componentDidMount",value:function(){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.muted!==e.muted||this.props.playbackRate!==e.playbackRate||this.props.height!==e.height||this.props.width!==e.width||this.props.hidden!==e.hidden}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=!0,r=!1,n=void 0;try{for(var o,a=x[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if(i.canPlay(e))return this.renderPlayer(i)}}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}return this.renderPlayer(w.default)}},{key:"renderPreloadPlayers",value:function(e){var t=[];return!d.default.canPlay(e)&&this.config.youtube.preload&&t.push(d.default),!m.default.canPlay(e)&&this.config.vimeo.preload&&t.push(m.default),!R.default.canPlay(e)&&this.config.dailymotion.preload&&t.push(R.default),t.map(this.renderPreloadPlayer)}},{key:"render",value:function(){var e=this.props,t=e.url,r=e.style,n=e.width,o=e.height,a=(0,f.omit)(this.props,L,p.DEPRECATED_CONFIG_PROPS),i=this.renderActivePlayer(t),u=this.renderPreloadPlayers(t);return c.default.createElement("div",l({ref:this.wrapperRef,style:l({},r,{width:n,height:o})},a),i,u)}}]),ReactPlayer}(s.Component);ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=p.propTypes,ReactPlayer.defaultProps=p.defaultProps,ReactPlayer.canPlay=function(e){var t=[].concat(x,[w.default]),r=!0,n=!1,o=void 0;try{for(var a,i=t[Symbol.iterator]();!(r=(a=i.next()).done);r=!0){if(a.value.canPlay(e))return!0}}catch(e){n=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(n)throw o}}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,r){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=r(7)()},function(e,t,r){"use strict";var n=r(8),o=r(9),a=r(10);e.exports=function(){function e(e,t,r,n,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";function n(e,t,r,n,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,a,i,l,u],p=0;s=new Error(t.replace(/%s/g,function(){return c[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";function n(e,t){for(var r in t)e.setAttribute(r,t[r])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,r){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&n(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,r),l.onload||o(l,r),i.appendChild(l)}},function(e,t,r){"use strict";function n(e){return!!e&&"object"===(void 0===e?"undefined":p(e))}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||a(e)}function a(e){return e.$$typeof===d}function i(e){return Array.isArray(e)?[]:{}}function l(e,t){return t&&!1===t.clone||!f(e)?e:c(i(e),e,t)}function u(e,t,r){return e.concat(t).map(function(e){return l(e,r)})}function s(e,t,r){var n={};return f(e)&&Object.keys(e).forEach(function(t){n[t]=l(e[t],r)}),Object.keys(t).forEach(function(o){f(t[o])&&e[o]?n[o]=c(e[o],t[o],r):n[o]=l(t[o],r)}),n}function c(e,t,r){var n=Array.isArray(t),o=Array.isArray(e),a=r||{arrayMerge:u};if(n===o)return n?(a.arrayMerge||u)(e,t,r):s(e,t,r);return l(t,r)}Object.defineProperty(t,"__esModule",{value:!0});var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e){return n(e)&&!o(e)},y="function"==typeof Symbol&&Symbol.for,d=y?Symbol.for("react.element"):60103;c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,r){return c(e,r,t)},{})};var h=c;t.default=h,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h="YT",v=/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.onStateChange=function(e){var t=e.data,r=n.props,o=r.onPause,a=r.onBuffer,i=window[h].PlayerState,l=i.PLAYING,u=i.PAUSED,s=i.BUFFERING,c=i.ENDED,p=i.CUED;t===l&&n.onPlay(),t===u&&o(),t===s&&a(),t===c&&n.onEnded(),t===p&&n.onReady()},n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.youtube.preload&&(this.preloading=!0,this.load("https://www.youtube.com/watch?v=GlCmAC4MHek")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"load",value:function(e){var t=this,r=this.props,n=r.playsinline,o=r.controls,a=r.config,i=r.onError,u=e&&e.match(v)[1];return this.isReady?void this.player.cueVideoById({videoId:u,startSeconds:(0,d.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://www.youtube.com/iframe_api",h,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(r){t.player=new r.Player(t.container,{width:"100%",height:"100%",videoId:u,playerVars:l({controls:o?1:0,start:(0,d.parseStartTime)(e),origin:window.location.origin,playsinline:n},a.youtube.playerVars),events:{onReady:t.onReady,onStateChange:t.onStateChange,onError:function(e){return i(e.data)}}})},i))}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){this.preloading||document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seekTo",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(y.default);b.displayName="YouTube",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,v={visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1},b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.fractionLoaded=null,n.ref=function(e){n.iframe=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"load",value:function(e){var t=this;(0,d.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){var n=r.Widget.Events,o=n.PLAY,a=n.PLAY_PROGRESS,i=n.PAUSE,u=n.FINISH,s=n.ERROR;t.isReady||(t.player=r.Widget(t.iframe),t.player.bind(o,function(){t.widgetIsPlaying=!0,t.onPlay()}),t.player.bind(i,function(){t.widgetIsPlaying=!1,t.props.onPause()}),t.player.bind(a,function(e){t.currentTime=e.currentPosition/1e3,t.fractionLoaded=e.loadedProgress}),t.player.bind(u,function(){return t.props.onEnded()}),t.player.bind(s,function(e){return t.props.onError(e)})),t.player.load(e,l({},v,t.props.config.soundcloud.options,{callback:function(){t.widgetIsPlaying=!1,t.player.getDuration(function(e){t.duration=e/1e3,t.onReady()})}}))})}},{key:"play",value:function(){this.widgetIsPlaying||this.callPlayer("play")}},{key:"pause",value:function(){this.widgetIsPlaying&&this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seekTo",1e3*r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);b.displayName="SoundCloud",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,v=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.secondsLoaded=null,n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.vimeo.preload&&(this.preloading=!0,this.load("https://vimeo.com/127250231")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"load",value:function(e){var t=this,r=e.match(h)[3];return this.duration=null,this.isReady?void this.player.loadVideo(r).catch(this.props.onError):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(r){t.player=new r.Player(t.container,l({},t.props.config.vimeo.playerOptions,{url:e,loop:t.props.loop})),t.player.ready().then(function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"}).catch(t.props.onError),t.player.on("loaded",function(){t.onReady(),t.player.getDuration().then(function(e){t.duration=e})}),t.player.on("play",t.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",function(e){return t.props.onSeek(e.seconds)}),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var r=e.seconds;t.currentTime=r}),t.player.on("progress",function(e){var r=e.seconds;t.secondsLoaded=r})},this.props.onError))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.preloading||this.callPlayer("unload")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("setCurrentTime",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e={width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e,ref:this.ref})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="Vimeo",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d="//connect.facebook.net/en_US/sdk.js",h=/^https:\/\/www\.facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,v="facebook-player-",b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.playerID=v+(0,y.randomString)(),n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this;if(this.isReady)return void(0,y.getSDK)(d,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,y.getSDK)(d,"FB","fbAsyncInit").then(function(e){e.init({appId:t.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",function(e){"video"===e.type&&e.id===t.playerID&&(t.player=e.instance,t.player.subscribe("startedPlaying",t.onPlay),t.player.subscribe("paused",t.props.onPause),t.player.subscribe("finishedPlaying",t.onEnded),t.player.subscribe("startedBuffering",t.props.onBuffer),t.player.subscribe("error",t.props.onError),t.onReady())})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.player.seek(r)}},{key:"setVolume",value:function(e){0!==e&&this.callPlayer("unmute"),this.player.setVolume(e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black"};return c.default.createElement("div",{style:e,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-allowfullscreen":"true","data-controls":this.props.controls?void 0:"false"})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(f.default);b.displayName="Facebook",t.default=b,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,h=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.duration=null,n.currentTime=null,n.secondsLoaded=null,n.ref=function(e){n.iframe=e},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this;if(this.loadingSDK)return void(this.loadOnReady=e);this.loadingSDK=!0,(0,y.getSDK)("//cdn.embed.ly/player-0.0.12.min.js","playerjs").then(function(e){t.player=new e.Player(t.iframe),t.player.on("ready",t.onReady),t.player.on("play",t.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var r=e.duration,n=e.seconds;t.duration=r,t.currentTime=n}),t.player.on("progress",function(e){var r=e.percent;t.duration&&(t.secondsLoaded=t.duration*r)})},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("setCurrentTime",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(d)[1],t={width:"100%",height:"100%"};return c.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}],[{key:"canPlay",value:function(e){return d.test(e)}}]),t}(f.default);h.displayName="Streamable",t.default=h,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(4),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=/^https?:\/\/vid.me\/([a-z0-9]+)$/i,c={},p=function(e){function t(){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"getData",value:function(e){var t=this.props.onError,r=e.match(s)[1];return c[r]?Promise.resolve(c[r]):window.fetch("https://api.vid.me/videoByUrl/"+r).then(function(e){if(200===e.status)return c[r]=e.json(),c[r];t(new Error("Vidme track could not be resolved"))})}},{key:"getURL",value:function(e){var t=e.video,r=this.props.config;if(r.vidme.format&&t.formats&&0!==t.formats.length){var n=t.formats.findIndex(function(e){return e.type===r.vidme.format});if(-1!==n)return t.formats[n].uri;console.warn('Vidme format "'+r.vidme.format+'" was not found for '+t.full_url)}return t.complete_url}},{key:"load",value:function(e){var t=this,r=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=t.getURL(e))},r)}}],[{key:"canPlay",value:function(e){return s.test(e)}}]),t}(u.default);p.displayName="Vidme",t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,v=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"getID",value:function(e){return e&&e.match(h)[4]}},{key:"load",value:function(e){var t=this,r=this.props,n=r.controls,o=r.onStart,a=r.onPause,i=r.onSeek,u=r.onEnded,s=r.config;this.loadingSDK=!0,(0,d.getSDK)("//fast.wistia.com/assets/external/E-v1.js","Wistia").then(function(){window._wq=window._wq||[],window._wq.push({id:t.getID(e),options:l({controlsVisibleOnLoad:n},s.wistia.options),onReady:function(e){t.player=e,t.player.bind("start",o),t.player.bind("play",t.onPlay),t.player.bind("pause",a),t.player.bind("seek",i),t.player.bind("end",u),t.onReady()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("remove")}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("time",r)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,r={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{key:e,className:t,style:r})}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="Wistia",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},c=r(0),p=n(c),f=r(2),y=n(f),d=r(1),h=/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,v=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.onDurationChange=function(e){(0,n.props.onDuration)(n.getDuration())},n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},n.ref=function(e){n.container=e},i=r,a(n,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props,r=e.url,n=e.config;!r&&n.dailymotion.preload&&(this.preloading=!0,this.load("http://www.dailymotion.com/video/x522udb")),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"parseId",value:function(e){var t=e.match(h);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,r=this.props,n=r.controls,o=r.config,a=r.onError,i=r.playing,u=this.parseId(e);return this.player?void this.player.load(u,{start:(0,d.parseStartTime)(e),autoplay:i}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,d.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(r){var i=r.player;t.player=new i(t.container,{width:"100%",height:"100%",video:u,params:l({controls:n,autoplay:t.props.playing,start:(0,d.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:function(){t.loadingSDK=!1,t.onReady()},seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})},a))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){var r=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seek",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.isReady?this.player.duration||null:null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return h.test(e)}}]),t}(y.default);v.displayName="DailyMotion",t.default=v,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,n)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(n)},s=r(0),c=n(s),p=r(2),f=n(p),y=r(1),d=/^(?:https?:\/\/)?(?:www\.)twitch\.tv\/videos\/(\d+)($|\?)/,h=/^(?:https?:\/\/)?(?:www\.)twitch\.tv\/([a-z0-9_]+)($|\?)/,v="twitch-player-",b=function(e){function t(){var e,r,n,i;o(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.playerID=v+(0,y.randomString)(),n.onEnded=function(){var e=n.props,t=e.loop,r=e.onEnded;t&&n.seekTo(0),r()},i=r,a(n,i)}return i(t,e),l(t,[{key:"load",value:function(e){var t=this,r=this.props,n=r.playsinline,o=r.onError,a=h.test(e),i=a?e.match(h)[1]:e.match(d)[1];return this.isReady?void(a?this.player.setChannel(i):this.player.setVideo("v"+i)):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void(0,y.getSDK)("//player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){t.player=new e.Player(t.playerID,{video:a?"":i,channel:a?i:"",height:"100%",width:"100%",playsinline:n});var r=e.Player,o=r.READY,l=r.PLAY,u=r.PAUSE,s=r.ENDED;t.player.addEventListener(o,t.onReady),t.player.addEventListener(l,t.onPlay),t.player.addEventListener(u,t.props.onPause),t.player.addEventListener(s,t.onEnded)},o))}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){var r=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e);this.callPlayer("seek",r)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return c.default.createElement("div",{style:e,id:this.playerID})}}],[{key:"canPlay",value:function(e){return d.test(e)||h.test(e)}}]),t}(f.default);b.displayName="Twitch",t.default=b,e.exports=t.default}]);
//# sourceMappingURL=ReactPlayer.js.map

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

_this2.dash = dashjs.MediaPlayer().create();
_this2.dash.initialize(_this2.player, url, true);
_this2.dash.initialize(_this2.player, url, _this2.props.playing);
_this2.dash.getDebug().setLogToBrowserConsole(false);

@@ -166,0 +166,0 @@ });

@@ -93,7 +93,9 @@ 'use strict';

iframe.style.height = '100%';
})['catch'](_this2.props.onError);
_this2.player.on('loaded', function () {
_this2.onReady();
_this2.player.getDuration().then(function (duration) {
_this2.duration = duration;
});
})['catch'](_this2.props.onError);
_this2.player.on('loaded', _this2.onReady);
});
_this2.player.on('play', _this2.onPlay);

@@ -100,0 +102,0 @@ _this2.player.on('pause', _this2.props.onPause);

{
"name": "react-player",
"version": "0.25.1",
"version": "0.25.2",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, Facebook, SoundCloud, Streamable, Vidme, Vimeo and Wistia",

@@ -82,3 +82,3 @@ "main": "lib/ReactPlayer.js",

"react-dom": "^16.0.0",
"react-hot-loader": "3.0.0-beta.7",
"react-hot-loader": "3.1.1",
"rimraf": "^2.5.4",

@@ -95,3 +95,3 @@ "sass-loader": "^6.0.1",

"dependencies": {
"deepmerge": "^1.5.1",
"deepmerge": "^2.0.0",
"load-script": "^1.0.0",

@@ -98,0 +98,0 @@ "prop-types": "^15.5.6"

Sorry, the diff of this file is not supported yet

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