react-player
Advanced tools
Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
@@ -0,0 +0,0 @@ { |
### Changelog | ||
All notable changes to this project will be documented in this file. | ||
Generated by [auto-changelog](https://github.com/CookPete/auto-changelog). | ||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
#### [v1.0.0-beta.6](https://github.com/CookPete/react-player/compare/v1.0.0-beta.5...v1.0.0-beta.6) | ||
> 5 December 2017 | ||
- Vimeo On Demand URL Support [`#289`](https://github.com/CookPete/react-player/pull/289) | ||
- Use index keys for FilePlayer source array [`#276`](https://github.com/CookPete/react-player/issues/276) | ||
- Add more tests [`2e88e5e`](https://github.com/CookPete/react-player/commit/2e88e5e771fe4c6fc08ff681820e62e5b7d45fec) | ||
- Bump auto-changelog [`cd26b44`](https://github.com/CookPete/react-player/commit/cd26b44ea7a10b6430329f935c57fd017b5b3f64) | ||
- Remove unused stop method [`a1b6a6e`](https://github.com/CookPete/react-player/commit/a1b6a6ee978c0677dbc5f03085b0d36331bac11a) | ||
#### [v1.0.0-beta.5](https://github.com/CookPete/react-player/compare/v1.0.0-beta.4...v1.0.0-beta.5) | ||
@@ -22,4 +30,4 @@ > 10 November 2017 | ||
> 30 October 2017 | ||
- Add Soundcloud preload support [`#262`](https://github.com/CookPete/react-player/pull/262) | ||
- Use MIT license [`dd5a0ac`](https://github.com/CookPete/react-player/commit/dd5a0ac64d997aac5e81252ed591b07f9e4835a2) | ||
- Add Soundcloud preload support [`1c4dd52`](https://github.com/CookPete/react-player/commit/1c4dd52104573e71d5d10fbae611313e5a30a633) | ||
- Fix isPlaying bug [`193f3dd`](https://github.com/CookPete/react-player/commit/193f3dde5cec068e5ec1379d9e789e9c5aa2edfd) | ||
@@ -148,5 +156,6 @@ | ||
- Detatch HLS media when stopping [`#212`](https://github.com/CookPete/react-player/issues/212) | ||
- Add wistia player options [`#198`](https://github.com/CookPete/react-player/pull/198) | ||
- Pass through auto or falsey width and height to FilePlayer [`#211`](https://github.com/CookPete/react-player/issues/211) | ||
- Only use add-module-exports plugin for bower build [`#193`](https://github.com/CookPete/react-player/issues/193) | ||
- Add wistia player options [`d447a32`](https://github.com/CookPete/react-player/commit/d447a32c05549ff738cce6bee0853a90b74a273e) | ||
- Only use add-module-exports plugin for bower build [`#193`](https://github.com/CookPete/react-player/issues/193) [`#196`](https://github.com/CookPete/react-player/pull/196) | ||
- Bump packages [`7372bcb`](https://github.com/CookPete/react-player/commit/7372bcba6c737e195a3df1d772622f5324cff619) | ||
- Remove need for findDOMNode in Vimeo player [`f6abc06`](https://github.com/CookPete/react-player/commit/f6abc065deb0d526706170c91436f344de8ddc88) | ||
@@ -178,7 +187,10 @@ - Add streaming tools to readme [`adf1338`](https://github.com/CookPete/react-player/commit/adf1338f709bdb6eab5486b57f6bfbc2b9df3122) | ||
- Apply all non-valid props to the wrapper element [`#183`](https://github.com/CookPete/react-player/pull/183) | ||
- Ensure YouTube player is in DOM when stopping [`#180`](https://github.com/CookPete/react-player/pull/180) | ||
- Use new Vimeo player API [`#142`](https://github.com/CookPete/react-player/pull/142) | ||
- Fix FilePlayer seekTo bug [`#149`](https://github.com/CookPete/react-player/pull/149) | ||
- Add Facebook player [`#109`](https://github.com/CookPete/react-player/issues/109) | ||
- Apply all non-valid props to the wrapper element [`#167`](https://github.com/CookPete/react-player/issues/167) | ||
- DailyMotion tweaks [`64f3cd3`](https://github.com/CookPete/react-player/commit/64f3cd3add0ec6dcea3a0980963676e3b8aa12f0) | ||
- Bump babel-loader [`478c2c3`](https://github.com/CookPete/react-player/commit/478c2c3e987bb849d7e00ffc613f4cac5f3fd949) | ||
- Add Facebook to readme and package description [`ad9c472`](https://github.com/CookPete/react-player/commit/ad9c47217871bd8502d4951dbee2f73f66a561c5) | ||
- Ensure YouTube player is in DOM when stopping [`16fd888`](https://github.com/CookPete/react-player/commit/16fd888300fb53cf4bfe754dc04946d049c70075) | ||
@@ -493,4 +505,4 @@ #### [v0.15.0](https://github.com/CookPete/react-player/compare/v0.14.3...v0.15.0) | ||
> 10 September 2015 | ||
- Set correct initial state in ReactPlayer [`f912f13`](https://github.com/CookPete/react-player/commit/f912f13f322633cb8c0b4908edf4caf1b02ec589) | ||
- Guard against no iframe contentWindow in Vimeo player [`da15b0a`](https://github.com/CookPete/react-player/commit/da15b0ade7f8401566cfc64de5f80396556be30b) | ||
- Guard against no iframe contentWindow in Vimeo player [`#2`](https://github.com/CookPete/react-player/pull/2) | ||
- Set correct initial state in ReactPlayer [`#2`](https://github.com/CookPete/react-player/pull/2) | ||
- Stop soundcloud track before playing another [`61bc61e`](https://github.com/CookPete/react-player/commit/61bc61e56fc5c7c2550d2a5e36bc072ae447329b) | ||
@@ -497,0 +509,0 @@ |
@@ -0,0 +0,0 @@ # Contributing to ReactPlayer |
@@ -1,2 +0,2 @@ | ||
var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=e.match(P);if(t){var n=t[1];if(n.match(w))return i(n);if(k.test(n))return parseInt(n,10)}return 0}function i(e){for(var t=0,n=w.exec(e);null!==n;){var r=n,o=d(r,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),n=w.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,o){if(n){var a=window[n];window[n]=function(){a&&a(),r(window[t])}}(0,v.default)(e,function(e){e&&o(e),n||r(window[t])})})}function s(e,t,n){var r=(0,b.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=g.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var f=c.replace(/Config$/,"");if(r=(0,b.default)(r,o({},f,e[c])),n){var p="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(p,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return r}function c(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(t=[]).concat.apply(t,r),i={},l=Object.keys(e),u=!0,s=!1,c=void 0;try{for(var f,p=l[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var y=f.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&p.return&&p.return()}finally{if(s)throw c}}return i}function f(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}function p(e){return null!==e&&("function"==typeof e||"object"===(void 0===e?"undefined":y(e)))}Object.defineProperty(t,"__esModule",{value:!0});var y="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},d=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=a,t.randomString=l,t.getSDK=u,t.getConfig=s,t.omit=c,t.callPlayer=f,t.isObject=p;var h=n(15),v=r(h),m=n(16),b=r(m),g=n(2),P=/[?&#](?:start|t)=([0-9hms]+)/,w=/(\d+)(h|m|s)/g,k=/^\d+$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var r=n(10),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,s=o.default.oneOfType,c=o.default.shape,f=o.default.object,p=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:f,progressFrequency:l,playsinline:i,config:c({soundcloud:c({options:f}),youtube:c({playerVars:f,preload:i}),facebook:c({appId:a}),dailymotion:c({params:f,preload:i}),vimeo:c({iframeParams:f,preload:i}),vidme:c({format:a}),file:c({attributes:f,tracks:u,forceAudio:i,forceHLS:i,forceDASH:i}),wistia:c({options:f})}),onReady:p,onStart:p,onPlay:p,onPause:p,onBuffer:p,onEnded:p,onError:p,onDuration:p,onSeek:p,onProgress:p},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,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){if(e instanceof Array){var t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var l=o.value;if("string"==typeof l&&i(l))return!0;if(i(l.src))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}return p.test(e)||y.test(e)||d.test(e)||h.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(s),f=n(1),p=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,y=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,d=/\.(m3u8)($|\?)/i,h=/\.(mpd)($|\?)/i,v=function(e){function t(){var e,n,a,i;r(this,t);for(var u=arguments.length,s=Array(u),f=0;f<u;f++)s[f]=arguments[f];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),a.onSeek=function(e){a.props.onSeek(e.target.currentTime)},a.renderSource=function(e){if("string"==typeof e)return c.default.createElement("source",{key:e,src:e});var t=e.src,n=e.type;return c.default.createElement("source",{key:t,src:t,type:n})},a.renderTrack=function(e,t){return c.default.createElement("track",l({key:t},e))},a.ref=function(e){a.player=e},i=n,o(a,i)}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError,i=e.playsinline;this.player.addEventListener("canplay",t),this.player.addEventListener("play",n),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",o),this.player.addEventListener("error",a),i&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError;this.player.removeEventListener("canplay",t),this.player.removeEventListener("play",n),this.player.removeEventListener("pause",r),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",o),this.player.removeEventListener("error",a)}},{key:"shouldUseAudio",value:function(e){return p.test(e.url)||e.config.file.forceAudio}},{key:"shouldUseHLS",value:function(e){return d.test(e)||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return h.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;this.shouldUseHLS(e)&&(0,f.getSDK)("https://cdn.jsdelivr.net/hls.js/latest/hls.min.js","Hls").then(function(n){t.hls=new n,t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.5.0/dash.all.min.js","dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)})}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.destroy(),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return 0===this.player.buffered.length?0:this.player.buffered.end(0)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o=e.config,a=e.width,i=e.height,u=this.shouldUseAudio(this.props),s=this.shouldUseHLS(t),f=this.shouldUseDASH(t),p=u?"audio":"video",y=t instanceof Array||s||f?void 0:t,d={width:a&&"auto"!==a?"100%":a,height:i&&"auto"!==i?"100%":i};return c.default.createElement(p,l({ref:this.ref,src:y,style:d,preload:"auto",controls:r,loop:n},o.file.attributes),t instanceof Array&&t.map(this.renderSource),o.file.tracks.map(this.renderTrack))}}]),t}(s.Component);v.displayName="FilePlayer",v.canPlay=i,t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f="YT",p=/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.onStateChange=function(e){var t=e.data,n=a.props,r=n.onPlay,o=n.onPause,i=n.onBuffer,l=n.onEnded,u=n.onReady,s=window[f].PlayerState,c=s.PLAYING,p=s.PAUSED,y=s.BUFFERING,d=s.ENDED,h=s.CUED;t===c&&r(),t===p&&o(),t===y&&i(),t===d&&l(),t===h&&u()},a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.controls,l=r.config,u=r.onError,s=e&&e.match(p)[1];if(t)return void this.player.cueVideoById({videoId:s,startSeconds:(0,c.parseStartTime)(e)});(0,c.getSDK)("https://www.youtube.com/iframe_api",f,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,{width:"100%",height:"100%",videoId:s,playerVars:i({controls:a?1:0,start:(0,c.parseStartTime)(e),origin:window.location.origin,playsinline:o},l.youtube.playerVars),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return u(e.data)}}}))},u)}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e=i({width:"100%",height:"100%"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(u.Component);y.displayName="YouTube",y.canPlay=function(e){return p.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.duration=null,a.currentTime=null,a.fractionLoaded=null,a.ref=function(e){a.iframe=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this;(0,c.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){if(n.iframe){var o=r.Widget.Events,a=o.PLAY,l=o.PLAY_PROGRESS,u=o.PAUSE,s=o.FINISH,c=o.ERROR;t||(n.player=r.Widget(n.iframe),n.player.bind(a,n.props.onPlay),n.player.bind(u,n.props.onPause),n.player.bind(l,function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress}),n.player.bind(s,function(){return n.props.onEnded()}),n.player.bind(c,function(e){return n.props.onError(e)})),n.player.load(e,i({},n.props.config.soundcloud.options,{callback:function(){n.player.getDuration(function(e){n.duration=e/1e3,n.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e=i({width:"100%",height:"100%"},this.props.style);return s.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}]),t}(u.Component);p.displayName="SoundCloud",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.duration=null,a.currentTime=null,a.secondsLoaded=null,a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this,r=e.match(f)[3];if(this.duration=null,t)return void this.player.loadVideo(r).catch(this.props.onError);(0,c.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(t){n.container&&(n.player=new t.Player(n.container,i({},n.props.config.vimeo.playerOptions,{url:e,loop:n.props.loop})),n.player.ready().then(function(){var e=n.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"}).catch(n.props.onError),n.player.on("loaded",function(){n.props.onReady(),n.player.getDuration().then(function(e){n.duration=e})}),n.player.on("play",n.props.onPlay),n.player.on("pause",n.props.onPause),n.player.on("seeked",function(e){return n.props.onSeek(e.seconds)}),n.player.on("ended",n.props.onEnded),n.player.on("error",n.props.onError),n.player.on("timeupdate",function(e){var t=e.seconds;n.currentTime=t}),n.player.on("progress",function(e){var t=e.seconds;n.secondsLoaded=t}))},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=i({width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{style:e,ref:this.ref})}}]),t}(u.Component);p.displayName="Vimeo",p.canPlay=function(e){return f.test(e)},t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.onDurationChange=function(){var e=a.getDuration();a.props.onDuration(e)},a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"parseId",value:function(e){var t=e.match(f);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,l=n.playing,u=this.parseId(e);if(this.player)return void this.player.load(u,{start:(0,c.parseStartTime)(e),autoplay:l});(0,c.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(n){if(t.container){var l=n.player;t.player=new l(t.container,{width:"100%",height:"100%",video:u,params:i({controls:r,autoplay:t.props.playing,start:(0,c.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})}},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e=i({width:"100%",height:"100%",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(u.Component);p.displayName="DailyMotion",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(2),f=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.mounted=!1,a.isReady=!1,a.isPlaying=!1,a.startOnPlay=!0,a.seekOnPlay=null,a.onReady=function(){if(a.mounted){var e=a.props,t=e.onReady,n=e.playing;a.isReady=!0,a.loadingSDK=!1,t(),n&&(a.loadOnReady?(a.player.load(a.loadOnReady),a.loadOnReady=null):a.player.play()),a.onDurationCheck()}},a.onPlay=function(){a.isPlaying=!0;var e=a.props,t=e.volume,n=e.muted,r=e.onStart,o=e.onPlay,i=e.playbackRate;a.startOnPlay&&(a.player.setPlaybackRate&&a.player.setPlaybackRate(i),a.player.setVolume(n?0:t),r(),a.startOnPlay=!1),o(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onPause=function(){a.isPlaying=!1,a.props.onPause()},a.onEnded=function(){var e=a.props,t=e.activePlayer,n=e.loop,r=e.onEnded;t.loopOnEnded&&n&&a.seekTo(0),n||(a.isPlaying=!1),r()},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.props.onDuration(e):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},a.ref=function(e){e&&(a.player=e)},i=n,o(a,i)}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.player.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.isReady&&this.player.stop(),this.mounted=!1}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.activePlayer,r=t.url;e.activePlayer!==n&&(this.isReady=!1,this.seekOnPlay=null,this.startOnPlay=!0,this.player.load(r,this.isReady))}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.activePlayer,r=t.url,o=t.playing,a=t.volume,i=t.muted,l=t.playbackRate;if(n!==e.activePlayer)return void this.player.stop();r!==e.url&&this.player.load(e.url,this.isReady),r&&!e.url&&this.player.stop(),o||!e.playing||this.isPlaying||this.player.play(),o&&!e.playing&&this.isPlaying&&this.player.pause(),a===e.volume||e.muted||this.player.setVolume(e.volume),i!==e.muted&&this.player.setVolume(e.muted?0:e.volume),l!==e.playbackRate&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e.playbackRate)}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"seekTo",value:function(e){var t=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){t.seekOnPlay=null},5e3);if(e>0&&e<1){var n=this.player.getDuration();return n?void this.player.seekTo(n*e):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return s.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded}))}}]),t}(u.Component);f.displayName="Player",f.propTypes=c.propTypes,f.defaultProps=c.defaultProps,t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),f=r(c),p=n(2),y=n(1),d=n(17),h=r(d),v=n(8),m=r(v),b=n(3),g=r(b),P=n(23),w=r(P),k=Object.keys(p.propTypes),ReactPlayer=function(e){function ReactPlayer(){var e,t,n,r;a(this,ReactPlayer);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return t=n=i(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(l))),n.config=(0,y.getConfig)(n.props,p.defaultProps,!0),n.seekTo=function(e){if(!n.player)return null;n.player.seekTo(e)},n.getDuration=function(){return n.player?n.player.getDuration():null},n.getCurrentTime=function(){return n.player?n.player.getCurrentTime():null},n.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player[e]:null},n.progress=function(){if(n.props.url&&n.player&&n.player.isReady){var e=n.player.getCurrentTime()||0,t=n.player.getSecondsLoaded(),r=n.player.getDuration();if(r){var o={playedSeconds:e,played:e/r};null!==t&&(o.loadedSeconds=t,o.loaded=t/r),o.played===n.prevPlayed&&o.loaded===n.prevLoaded||n.props.onProgress(o),n.prevPlayed=o.played,n.prevLoaded=o.loaded}}n.progressTimeout=setTimeout(n.progress,n.props.progressFrequency)},n.wrapperRef=function(e){n.wrapper=e},n.activePlayerRef=function(e){n.player=e},r=t,i(n,r)}return l(ReactPlayer,e),s(ReactPlayer,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=Object.keys(this.props)[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value,l=this.props[i];if(!(0,y.isObject)(l)&&l!==e[i])return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}},{key:"getActivePlayer",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=h.default[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if(i.canPlay(e))return i}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return g.default}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=this.getActivePlayer(e);return f.default.createElement(m.default,u({},this.props,{key:t.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:t}))}},{key:"sortPlayers",value:function(e,t){return e&&t?e.key<t.key?-1:1:0}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,a=e.height,i=(0,y.omit)(this.props,k,p.DEPRECATED_CONFIG_PROPS),l=this.renderActivePlayer(t),s=(0,w.default)(t,this.config),c=[l].concat(o(s)).sort(this.sortPlayers);return f.default.createElement("div",u({ref:this.wrapperRef,style:u({},n,{width:r,height:a})},i),c)}}]),ReactPlayer}(c.Component);ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=p.propTypes,ReactPlayer.defaultProps=p.defaultProps,ReactPlayer.canPlay=function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=h.default[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){if(o.value.canPlay(e))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=n(11)()},function(e,t,n){"use strict";var r=n(12),o=n(13),a=n(14);e.exports=function(){function e(e,t,n,r,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,l,u],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,n){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&r(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,n),l.onload||o(l,n),i.appendChild(l)}},function(e,t,n){"use strict";function r(e){return!!e&&"object"===(void 0===e?"undefined":f(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||!p(e)?e:c(i(e),e,t)}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}function s(e,t,n){var r={};return p(e)&&Object.keys(e).forEach(function(t){r[t]=l(e[t],n)}),Object.keys(t).forEach(function(o){p(t[o])&&e[o]?r[o]=c(e[o],t[o],n):r[o]=l(t[o],n)}),r}function c(e,t,n){var r=Array.isArray(t),o=Array.isArray(e),a=n||{arrayMerge:u};if(r===o)return r?(a.arrayMerge||u)(e,t,n):s(e,t,n);return l(t,n)}Object.defineProperty(t,"__esModule",{value:!0});var f="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 r(e)&&!o(e)},y="function"==typeof Symbol&&Symbol.for,d=y?Symbol.for("react.element"):60103;c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return c(e,n,t)},{})};var h=c;t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=r(o),i=n(5),l=r(i),u=n(6),s=r(u),c=n(18),f=r(c),p=n(19),y=r(p),d=n(20),h=r(d),v=n(21),m=r(v),b=n(22),g=r(b),P=n(7),w=r(P),k=n(3),_=r(k);t.default=[a.default,l.default,s.default,f.default,y.default,h.default,m.default,g.default,w.default,_.default],e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c="//connect.facebook.net/en_US/sdk.js",f=/^https:\/\/www\.facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,p="facebook-player-",y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.playerID=p+(0,s.randomString)(),i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e,t){var n=this;if(t)return void(0,s.getSDK)(c,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,s.getSDK)(c,"FB","fbAsyncInit").then(function(e){e.init({appId:n.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",function(e){"video"===e.type&&e.id===n.playerID&&(n.player=e.instance,n.player.subscribe("startedPlaying",n.props.onPlay),n.player.subscribe("paused",n.props.onPause),n.player.subscribe("finishedPlaying",n.props.onEnded),n.player.subscribe("startedBuffering",n.props.onBuffer),n.player.subscribe("error",n.props.onError),n.props.onReady())})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){0!==e&&this.callPlayer("unmute"),this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black"};return u.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"})}}]),t}(l.Component);y.displayName="Facebook",y.canPlay=function(e){return f.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,f=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.duration=null,a.currentTime=null,a.secondsLoaded=null,a.ref=function(e){a.iframe=e},i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e){var t=this;(0,s.getSDK)("//cdn.embed.ly/player-0.0.12.min.js","playerjs").then(function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var n=e.duration,r=e.seconds;t.duration=n,t.currentTime=r}),t.player.on("progress",function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)}))},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(c)[1],t={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}]),t}(l.Component);f.displayName="Streamable",f.canPlay=function(e){return c.test(e)},t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(3),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=/^https?:\/\/vid.me\/([a-z0-9]+)$/i,c={},f=function(e){function t(){return r(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,n=e.match(s)[1];return c[n]?Promise.resolve(c[n]):window.fetch("https://api.vid.me/videoByUrl/"+n).then(function(e){if(200===e.status)return c[n]=e.json(),c[n];t(new Error("Vidme track could not be resolved"))})}},{key:"getURL",value:function(e){var t=e.video,n=this.props.config;if(n.vidme.format&&t.formats&&0!==t.formats.length){var r=t.formats.findIndex(function(e){return e.type===n.vidme.format});if(-1!==r)return t.formats[r].uri;console.warn('Vidme format "'+n.vidme.format+'" was not found for '+t.full_url)}return t.complete_url}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.player&&(t.player.src=t.getURL(e))},n)}}]),t}(u.default);f.displayName="Vidme",f.canPlay=function(e){return s.test(e)},t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,i=n,o(a,i)}return a(t,e),l(t,[{key:"getID",value:function(e){return e&&e.match(f)[4]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.onReady,a=n.onPlay,l=n.onPause,u=n.onSeek,s=n.onEnded,f=n.config;(0,c.getSDK)("//fast.wistia.com/assets/external/E-v1.js","Wistia").then(function(){window._wq=window._wq||[],window._wq.push({id:t.getID(e),options:i({controlsVisibleOnLoad:r},f.wistia.options),onReady:function(e){t.player=e,t.player.bind("play",a),t.player.bind("pause",l),t.player.bind("seek",u),t.player.bind("end",s),o()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("remove")}},{key:"seekTo",value:function(e){this.callPlayer("time",e)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,n={width:"100%",height:"100%"};return s.default.createElement("div",{key:e,className:t,style:n})}}]),t}(u.Component);p.displayName="Wistia",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c=/^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,f=/^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,p="twitch-player-",y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.playerID=p+(0,s.randomString)(),i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.onError,i=f.test(e),l=i?e.match(f)[1]:e.match(c)[1];if(t)return void(i?this.player.setChannel(l):this.player.setVideo("v"+l));(0,s.getSDK)("//player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){n.player=new e.Player(n.playerID,{video:i?"":l,channel:i?l:"",height:"100%",width:"100%",playsinline:o});var t=e.Player,r=t.READY,a=t.PLAY,u=t.PAUSE,s=t.ENDED;n.player.addEventListener(r,n.props.onReady),n.player.addEventListener(a,n.props.onPlay),n.player.addEventListener(u,n.props.onPause),n.player.addEventListener(s,n.props.onEnded)},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return u.default.createElement("div",{style:e,id:this.playerID})}}]),t}(l.Component);y.displayName="Twitch",y.canPlay=function(e){return c.test(e)||f.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var l,s=m[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;!c.Player.canPlay(e)&&t[c.configKey].preload&&n.push(i.default.createElement(u.default,{key:c.Player.displayName,activePlayer:c.Player,url:c.url,playing:!0,style:{display:"none"}}))}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(0),i=r(a),l=n(8),u=r(l),s=n(4),c=r(s),f=n(5),p=r(f),y=n(6),d=r(y),h=n(7),v=r(h),m=[{Player:c.default,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:p.default,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:d.default,configKey:"vimeo",url:"https://vimeo.com/127250231"},{Player:v.default,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];e.exports=t.default}]); | ||
var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=e.match(P);if(t){var n=t[1];if(n.match(w))return i(n);if(k.test(n))return parseInt(n,10)}return 0}function i(e){for(var t=0,n=w.exec(e);null!==n;){var r=n,o=d(r,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),n=w.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,o){if(n){var a=window[n];window[n]=function(){a&&a(),r(window[t])}}(0,v.default)(e,function(e){e&&o(e),n||r(window[t])})})}function s(e,t,n){var r=(0,b.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,s=g.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=u.value;if(e[c]){var f=c.replace(/Config$/,"");if(r=(0,b.default)(r,o({},f,e[c])),n){var p="ReactPlayer: %c"+c+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(p,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}return r}function c(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(t=[]).concat.apply(t,r),i={},l=Object.keys(e),u=!0,s=!1,c=void 0;try{for(var f,p=l[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var y=f.value;-1===a.indexOf(y)&&(i[y]=e[y])}}catch(e){s=!0,c=e}finally{try{!u&&p.return&&p.return()}finally{if(s)throw c}}return i}function f(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}function p(e){return null!==e&&("function"==typeof e||"object"===(void 0===e?"undefined":y(e)))}Object.defineProperty(t,"__esModule",{value:!0});var y="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},d=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=a,t.randomString=l,t.getSDK=u,t.getConfig=s,t.omit=c,t.callPlayer=f,t.isObject=p;var h=n(15),v=r(h),m=n(16),b=r(m),g=n(2),P=/[?&#](?:start|t)=([0-9hms]+)/,w=/(\d+)(h|m|s)/g,k=/^\d+$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var r=n(10),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,s=o.default.oneOfType,c=o.default.shape,f=o.default.object,p=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:f,progressFrequency:l,playsinline:i,config:c({soundcloud:c({options:f}),youtube:c({playerVars:f,preload:i}),facebook:c({appId:a}),dailymotion:c({params:f,preload:i}),vimeo:c({iframeParams:f,preload:i}),vidme:c({format:a}),file:c({attributes:f,tracks:u,forceAudio:i,forceHLS:i,forceDASH:i}),wistia:c({options:f})}),onReady:p,onStart:p,onPlay:p,onPause:p,onBuffer:p,onEnded:p,onError:p,onDuration:p,onSeek:p,onProgress:p},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,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){if(e instanceof Array){var t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var l=o.value;if("string"==typeof l&&i(l))return!0;if(i(l.src))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}return p.test(e)||y.test(e)||d.test(e)||h.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(s),f=n(1),p=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,y=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,d=/\.(m3u8)($|\?)/i,h=/\.(mpd)($|\?)/i,v=function(e){function t(){var e,n,a,i;r(this,t);for(var u=arguments.length,s=Array(u),f=0;f<u;f++)s[f]=arguments[f];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),a.onSeek=function(e){a.props.onSeek(e.target.currentTime)},a.renderSource=function(e,t){if("string"==typeof e)return c.default.createElement("source",{key:t,src:e});var n=e.src,r=e.type;return c.default.createElement("source",{key:t,src:n,type:r})},a.renderTrack=function(e,t){return c.default.createElement("track",l({key:t},e))},a.ref=function(e){a.player=e},i=n,o(a,i)}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError,i=e.playsinline;this.player.addEventListener("canplay",t),this.player.addEventListener("play",n),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",o),this.player.addEventListener("error",a),i&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError;this.player.removeEventListener("canplay",t),this.player.removeEventListener("play",n),this.player.removeEventListener("pause",r),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",o),this.player.removeEventListener("error",a)}},{key:"shouldUseAudio",value:function(e){return p.test(e.url)||e.config.file.forceAudio}},{key:"shouldUseHLS",value:function(e){return d.test(e)||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return h.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;this.shouldUseHLS(e)&&(0,f.getSDK)("https://cdn.jsdelivr.net/hls.js/latest/hls.min.js","Hls").then(function(n){t.hls=new n,t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,f.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.5.0/dash.all.min.js","dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)})}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.destroy(),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return 0===this.player.buffered.length?0:this.player.buffered.end(0)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o=e.config,a=e.width,i=e.height,u=this.shouldUseAudio(this.props),s=this.shouldUseHLS(t),f=this.shouldUseDASH(t),p=u?"audio":"video",y=t instanceof Array||s||f?void 0:t,d={width:a&&"auto"!==a?"100%":a,height:i&&"auto"!==i?"100%":i};return c.default.createElement(p,l({ref:this.ref,src:y,style:d,preload:"auto",controls:r,loop:n},o.file.attributes),t instanceof Array&&t.map(this.renderSource),o.file.tracks.map(this.renderTrack))}}]),t}(s.Component);v.displayName="FilePlayer",v.canPlay=i,t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f="YT",p=/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.onStateChange=function(e){var t=e.data,n=a.props,r=n.onPlay,o=n.onPause,i=n.onBuffer,l=n.onEnded,u=n.onReady,s=window[f].PlayerState,c=s.PLAYING,p=s.PAUSED,y=s.BUFFERING,d=s.ENDED,h=s.CUED;t===c&&r(),t===p&&o(),t===y&&i(),t===d&&l(),t===h&&u()},a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.controls,l=r.config,u=r.onError,s=e&&e.match(p)[1];if(t)return void this.player.cueVideoById({videoId:s,startSeconds:(0,c.parseStartTime)(e)});(0,c.getSDK)("https://www.youtube.com/iframe_api",f,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,{width:"100%",height:"100%",videoId:s,playerVars:i({controls:a?1:0,start:(0,c.parseStartTime)(e),origin:window.location.origin,playsinline:o},l.youtube.playerVars),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return u(e.data)}}}))},u)}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e=i({width:"100%",height:"100%"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(u.Component);y.displayName="YouTube",y.canPlay=function(e){return p.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.duration=null,a.currentTime=null,a.fractionLoaded=null,a.ref=function(e){a.iframe=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this;(0,c.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){if(n.iframe){var o=r.Widget.Events,a=o.PLAY,l=o.PLAY_PROGRESS,u=o.PAUSE,s=o.FINISH,c=o.ERROR;t||(n.player=r.Widget(n.iframe),n.player.bind(a,n.props.onPlay),n.player.bind(u,n.props.onPause),n.player.bind(l,function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress}),n.player.bind(s,function(){return n.props.onEnded()}),n.player.bind(c,function(e){return n.props.onError(e)})),n.player.load(e,i({},n.props.config.soundcloud.options,{callback:function(){n.player.getDuration(function(e){n.duration=e/1e3,n.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e=i({width:"100%",height:"100%"},this.props.style);return s.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}]),t}(u.Component);p.displayName="SoundCloud",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:(?:channels|ondemand)\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.duration=null,a.currentTime=null,a.secondsLoaded=null,a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"load",value:function(e,t){var n=this,r=e.match(f)[3];if(this.duration=null,t)return void this.player.loadVideo(r).catch(this.props.onError);(0,c.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(t){n.container&&(n.player=new t.Player(n.container,i({},n.props.config.vimeo.playerOptions,{url:e,loop:n.props.loop})),n.player.ready().then(function(){var e=n.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"}).catch(n.props.onError),n.player.on("loaded",function(){n.props.onReady(),n.player.getDuration().then(function(e){n.duration=e})}),n.player.on("play",n.props.onPlay),n.player.on("pause",n.props.onPause),n.player.on("seeked",function(e){return n.props.onSeek(e.seconds)}),n.player.on("ended",n.props.onEnded),n.player.on("error",n.props.onError),n.player.on("timeupdate",function(e){var t=e.seconds;n.currentTime=t}),n.player.on("progress",function(e){var t=e.seconds;n.secondsLoaded=t}))},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=i({width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{style:e,ref:this.ref})}}]),t}(u.Component);p.displayName="Vimeo",p.canPlay=function(e){return f.test(e)},t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,a.onDurationChange=function(){var e=a.getDuration();a.props.onDuration(e)},a.ref=function(e){a.container=e},i=n,o(a,i)}return a(t,e),l(t,[{key:"parseId",value:function(e){var t=e.match(f);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,l=n.playing,u=this.parseId(e);if(this.player)return void this.player.load(u,{start:(0,c.parseStartTime)(e),autoplay:l});(0,c.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(n){if(t.container){var l=n.player;t.player=new l(t.container,{width:"100%",height:"100%",video:u,params:i({controls:r,autoplay:t.props.playing,start:(0,c.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})}},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e=i({width:"100%",height:"100%",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(u.Component);p.displayName="DailyMotion",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(2),f=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.mounted=!1,a.isReady=!1,a.isPlaying=!1,a.startOnPlay=!0,a.seekOnPlay=null,a.onReady=function(){if(a.mounted){var e=a.props,t=e.onReady,n=e.playing;a.isReady=!0,a.loadingSDK=!1,t(),n&&(a.loadOnReady?(a.player.load(a.loadOnReady),a.loadOnReady=null):a.player.play()),a.onDurationCheck()}},a.onPlay=function(){a.isPlaying=!0;var e=a.props,t=e.volume,n=e.muted,r=e.onStart,o=e.onPlay,i=e.playbackRate;a.startOnPlay&&(a.player.setPlaybackRate&&a.player.setPlaybackRate(i),a.player.setVolume(n?0:t),r(),a.startOnPlay=!1),o(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onPause=function(){a.isPlaying=!1,a.props.onPause()},a.onEnded=function(){var e=a.props,t=e.activePlayer,n=e.loop,r=e.onEnded;t.loopOnEnded&&n&&a.seekTo(0),n||(a.isPlaying=!1),r()},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.props.onDuration(e):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},a.ref=function(e){e&&(a.player=e)},i=n,o(a,i)}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.player.load(this.props.url)}},{key:"componentWillUnmount",value:function(){this.isReady&&this.player.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.url,r=t.playing,o=t.volume,a=t.muted,i=t.playbackRate;n!==e.url&&this.player.load(e.url,this.isReady),r||!e.playing||this.isPlaying||this.player.play(),r&&!e.playing&&this.isPlaying&&this.player.pause(),o===e.volume||e.muted||this.player.setVolume(e.volume),a!==e.muted&&this.player.setVolume(e.muted?0:e.volume),i!==e.playbackRate&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e.playbackRate)}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"seekTo",value:function(e){var t=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){t.seekOnPlay=null},5e3);if(e>0&&e<1){var n=this.player.getDuration();return n?void this.player.seekTo(n*e):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return s.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded}))}}]),t}(u.Component);f.displayName="Player",f.propTypes=c.propTypes,f.defaultProps=c.defaultProps,t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),f=r(c),p=n(2),y=n(1),d=n(17),h=r(d),v=n(8),m=r(v),b=n(3),g=r(b),P=n(23),w=r(P),k=Object.keys(p.propTypes),ReactPlayer=function(e){function ReactPlayer(){var e,t,n,r;a(this,ReactPlayer);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return t=n=i(this,(e=ReactPlayer.__proto__||Object.getPrototypeOf(ReactPlayer)).call.apply(e,[this].concat(l))),n.config=(0,y.getConfig)(n.props,p.defaultProps,!0),n.seekTo=function(e){if(!n.player)return null;n.player.seekTo(e)},n.getDuration=function(){return n.player?n.player.getDuration():null},n.getCurrentTime=function(){return n.player?n.player.getCurrentTime():null},n.getInternalPlayer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player[e]:null},n.progress=function(){if(n.props.url&&n.player&&n.player.isReady){var e=n.player.getCurrentTime()||0,t=n.player.getSecondsLoaded(),r=n.player.getDuration();if(r){var o={playedSeconds:e,played:e/r};null!==t&&(o.loadedSeconds=t,o.loaded=t/r),o.played===n.prevPlayed&&o.loaded===n.prevLoaded||n.props.onProgress(o),n.prevPlayed=o.played,n.prevLoaded=o.loaded}}n.progressTimeout=setTimeout(n.progress,n.props.progressFrequency)},n.wrapperRef=function(e){n.wrapper=e},n.activePlayerRef=function(e){n.player=e},r=t,i(n,r)}return l(ReactPlayer,e),s(ReactPlayer,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=Object.keys(this.props)[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value,l=this.props[i];if(!(0,y.isObject)(l)&&l!==e[i])return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}},{key:"getActivePlayer",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=h.default[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if(i.canPlay(e))return i}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return g.default}},{key:"renderActivePlayer",value:function(e){if(!e)return null;var t=this.getActivePlayer(e);return f.default.createElement(m.default,u({},this.props,{key:t.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:t}))}},{key:"sortPlayers",value:function(e,t){return e&&t?e.key<t.key?-1:1:0}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,a=e.height,i=(0,y.omit)(this.props,k,p.DEPRECATED_CONFIG_PROPS),l=this.renderActivePlayer(t),s=(0,w.default)(t,this.config),c=[l].concat(o(s)).sort(this.sortPlayers);return f.default.createElement("div",u({ref:this.wrapperRef,style:u({},n,{width:r,height:a})},i),c)}}]),ReactPlayer}(c.Component);ReactPlayer.displayName="ReactPlayer",ReactPlayer.propTypes=p.propTypes,ReactPlayer.defaultProps=p.defaultProps,ReactPlayer.canPlay=function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=h.default[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){if(o.value.canPlay(e))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1},t.default=ReactPlayer,e.exports=t.default},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator;e.exports=n(11)()},function(e,t,n){"use strict";var r=n(12),o=n(13),a=n(14);e.exports=function(){function e(e,t,n,r,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,a,i,l,u){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,l,u],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function a(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,n){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},l.type=t.type||"text/javascript",l.charset=t.charset||"utf8",l.async=!("async"in t)||!!t.async,l.src=e,t.attrs&&r(l,t.attrs),t.text&&(l.text=""+t.text),("onload"in l?o:a)(l,n),l.onload||o(l,n),i.appendChild(l)}},function(e,t,n){"use strict";function r(e){return!!e&&"object"===(void 0===e?"undefined":f(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||!p(e)?e:c(i(e),e,t)}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}function s(e,t,n){var r={};return p(e)&&Object.keys(e).forEach(function(t){r[t]=l(e[t],n)}),Object.keys(t).forEach(function(o){p(t[o])&&e[o]?r[o]=c(e[o],t[o],n):r[o]=l(t[o],n)}),r}function c(e,t,n){var r=Array.isArray(t),o=Array.isArray(e),a=n||{arrayMerge:u};if(r===o)return r?(a.arrayMerge||u)(e,t,n):s(e,t,n);return l(t,n)}Object.defineProperty(t,"__esModule",{value:!0});var f="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 r(e)&&!o(e)},y="function"==typeof Symbol&&Symbol.for,d=y?Symbol.for("react.element"):60103;c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return c(e,n,t)},{})};var h=c;t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=r(o),i=n(5),l=r(i),u=n(6),s=r(u),c=n(18),f=r(c),p=n(19),y=r(p),d=n(20),h=r(d),v=n(21),m=r(v),b=n(22),g=r(b),P=n(7),w=r(P),k=n(3),_=r(k);t.default=[a.default,l.default,s.default,f.default,y.default,h.default,m.default,g.default,w.default,_.default],e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c="//connect.facebook.net/en_US/sdk.js",f=/^https:\/\/www\.facebook\.com\/([^\/?].+\/)?video(s|\.php)[\/?].*$/,p="facebook-player-",y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.playerID=p+(0,s.randomString)(),i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e,t){var n=this;if(t)return void(0,s.getSDK)(c,"FB","fbAsyncInit").then(function(e){return e.XFBML.parse()});(0,s.getSDK)(c,"FB","fbAsyncInit").then(function(e){e.init({appId:n.props.config.facebook.appId,xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",function(e){"video"===e.type&&e.id===n.playerID&&(n.player=e.instance,n.player.subscribe("startedPlaying",n.props.onPlay),n.player.subscribe("paused",n.props.onPause),n.player.subscribe("finishedPlaying",n.props.onEnded),n.player.subscribe("startedBuffering",n.props.onBuffer),n.player.subscribe("error",n.props.onError),n.props.onReady())})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){0!==e&&this.callPlayer("unmute"),this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%",backgroundColor:"black"};return u.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"})}}]),t}(l.Component);y.displayName="Facebook",y.canPlay=function(e){return f.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,f=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.duration=null,a.currentTime=null,a.secondsLoaded=null,a.ref=function(e){a.iframe=e},i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e){var t=this;(0,s.getSDK)("//cdn.embed.ly/player-0.0.12.min.js","playerjs").then(function(e){t.iframe&&(t.player=new e.Player(t.iframe),t.player.on("ready",t.props.onReady),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",t.props.onSeek),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var n=e.duration,r=e.seconds;t.duration=n,t.currentTime=r}),t.player.on("progress",function(e){var n=e.percent;t.duration&&(t.secondsLoaded=t.duration*n)}))},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=this.props.url.match(c)[1],t={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/"+e,frameBorder:"0",scrolling:"no",style:t,allowFullScreen:!0})}}]),t}(l.Component);f.displayName="Streamable",f.canPlay=function(e){return c.test(e)},t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(3),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=/^https?:\/\/vid.me\/([a-z0-9]+)$/i,c={},f=function(e){function t(){return r(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,n=e.match(s)[1];return c[n]?Promise.resolve(c[n]):window.fetch("https://api.vid.me/videoByUrl/"+n).then(function(e){if(200===e.status)return c[n]=e.json(),c[n];t(new Error("Vidme track could not be resolved"))})}},{key:"getURL",value:function(e){var t=e.video,n=this.props.config;if(n.vidme.format&&t.formats&&0!==t.formats.length){var r=t.formats.findIndex(function(e){return e.type===n.vidme.format});if(-1!==r)return t.formats[r].uri;console.warn('Vidme format "'+n.vidme.format+'" was not found for '+t.full_url)}return t.complete_url}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.player&&(t.player.src=t.getURL(e))},n)}}]),t}(u.default);f.displayName="Vidme",f.canPlay=function(e){return s.test(e)},t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=n(1),f=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,p=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=c.callPlayer,i=n,o(a,i)}return a(t,e),l(t,[{key:"getID",value:function(e){return e&&e.match(f)[4]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.onReady,a=n.onPlay,l=n.onPause,u=n.onSeek,s=n.onEnded,f=n.config;(0,c.getSDK)("//fast.wistia.com/assets/external/E-v1.js","Wistia").then(function(){window._wq=window._wq||[],window._wq.push({id:t.getID(e),options:i({controlsVisibleOnLoad:r},f.wistia.options),onReady:function(e){t.player=e,t.player.bind("play",a),t.player.bind("pause",l),t.player.bind("seek",u),t.player.bind("end",s),o()}})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("remove")}},{key:"seekTo",value:function(e){this.callPlayer("time",e)}},{key:"setVolume",value:function(e){this.callPlayer("volume",e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("playbackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,n={width:"100%",height:"100%"};return s.default.createElement("div",{key:e,className:t,style:n})}}]),t}(u.Component);p.displayName="Wistia",p.canPlay=function(e){return f.test(e)},p.loopOnEnded=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=n(1),c=/^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,f=/^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,p="twitch-player-",y=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.callPlayer=s.callPlayer,a.playerID=p+(0,s.randomString)(),i=n,o(a,i)}return a(t,e),i(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.onError,i=f.test(e),l=i?e.match(f)[1]:e.match(c)[1];if(t)return void(i?this.player.setChannel(l):this.player.setVideo("v"+l));(0,s.getSDK)("//player.twitch.tv/js/embed/v1.js","Twitch").then(function(e){n.player=new e.Player(n.playerID,{video:i?"":l,channel:i?l:"",height:"100%",width:"100%",playsinline:o});var t=e.Player,r=t.READY,a=t.PLAY,u=t.PAUSE,s=t.ENDED;n.player.addEventListener(r,n.props.onReady),n.player.addEventListener(a,n.props.onPlay),n.player.addEventListener(u,n.props.onPause),n.player.addEventListener(s,n.props.onEnded)},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var e={width:"100%",height:"100%"};return u.default.createElement("div",{style:e,id:this.playerID})}}]),t}(l.Component);y.displayName="Twitch",y.canPlay=function(e){return c.test(e)||f.test(e)},y.loopOnEnded=!0,t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var l,s=m[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;!c.Player.canPlay(e)&&t[c.configKey].preload&&n.push(i.default.createElement(u.default,{key:c.Player.displayName,activePlayer:c.Player,url:c.url,playing:!0,style:{display:"none"}}))}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(0),i=r(a),l=n(8),u=r(l),s=n(4),c=r(s),f=n(5),p=r(f),y=n(6),d=r(y),h=n(7),v=r(h),m=[{Player:c.default,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:p.default,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:d.default,configKey:"vimeo",url:"https://vimeo.com/127250231"},{Player:v.default,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];e.exports=t.default}]); | ||
//# sourceMappingURL=ReactPlayer.js.map |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
var _props3 = require('./props'); | ||
var _props2 = require('./props'); | ||
@@ -130,37 +130,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
var _props = this.props, | ||
activePlayer = _props.activePlayer, | ||
url = _props.url; | ||
if (prevProps.activePlayer !== activePlayer) { | ||
this.isReady = false; | ||
this.seekOnPlay = null; | ||
this.startOnPlay = true; | ||
this.player.load(url, this.isReady); | ||
} | ||
} | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
// Invoke player methods based on incoming props | ||
var _props2 = this.props, | ||
activePlayer = _props2.activePlayer, | ||
url = _props2.url, | ||
playing = _props2.playing, | ||
volume = _props2.volume, | ||
muted = _props2.muted, | ||
playbackRate = _props2.playbackRate; | ||
var _props = this.props, | ||
url = _props.url, | ||
playing = _props.playing, | ||
volume = _props.volume, | ||
muted = _props.muted, | ||
playbackRate = _props.playbackRate; | ||
if (activePlayer !== nextProps.activePlayer) { | ||
this.player.stop(); | ||
return; // A new player is coming, so don't invoke any other methods | ||
} | ||
if (url !== nextProps.url) { | ||
this.player.load(nextProps.url, this.isReady); | ||
} | ||
if (url && !nextProps.url) { | ||
this.player.stop(); | ||
} | ||
if (!playing && nextProps.playing && !this.isPlaying) { | ||
@@ -243,4 +221,4 @@ this.player.play(); | ||
Player.displayName = 'Player'; | ||
Player.propTypes = _props3.propTypes; | ||
Player.defaultProps = _props3.defaultProps; | ||
Player.propTypes = _props2.propTypes; | ||
Player.defaultProps = _props2.defaultProps; | ||
exports['default'] = Player; |
@@ -87,5 +87,5 @@ 'use strict'; | ||
_this.props.onSeek(e.target.currentTime); | ||
}, _this.renderSource = function (source) { | ||
}, _this.renderSource = function (source, index) { | ||
if (typeof source === 'string') { | ||
return _react2['default'].createElement('source', { key: source, src: source }); | ||
return _react2['default'].createElement('source', { key: index, src: source }); | ||
} | ||
@@ -95,3 +95,3 @@ var src = source.src, | ||
return _react2['default'].createElement('source', { key: src, src: src, type: type }); | ||
return _react2['default'].createElement('source', { key: index, src: src, type: type }); | ||
}, _this.renderTrack = function (track, index) { | ||
@@ -98,0 +98,0 @@ return _react2['default'].createElement('track', _extends({ key: index }, track)); |
@@ -27,3 +27,3 @@ 'use strict'; | ||
var SDK_GLOBAL = 'Vimeo'; | ||
var MATCH_URL = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/; | ||
var MATCH_URL = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:(?:channels|ondemand)\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/; | ||
@@ -30,0 +30,0 @@ var Vimeo = function (_Component) { |
@@ -0,0 +0,0 @@ The MIT License |
{ | ||
"name": "react-player", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "A react component for playing a variety of URLs, including file paths, YouTube, Facebook, SoundCloud, Streamable, Vidme, Vimeo and Wistia", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js", |
@@ -0,0 +0,0 @@ ReactPlayer |
@@ -0,0 +0,0 @@ import webpack from 'webpack' |
@@ -0,0 +0,0 @@ import path from 'path' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
674841
2641