video-react
Advanced tools
Comparing version 0.0.2 to 0.1.1
@@ -0,1 +1,6 @@ | ||
<a name="0.1.1"></a> | ||
## 0.1.1 (2016-11-08) | ||
<a name="0.0.2"></a> | ||
@@ -2,0 +7,0 @@ # [0.0.2]() |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("video-react",["react"],t):"object"==typeof exports?exports["video-react"]=t(require("react")):e["video-react"]=t(e.React)}(this,function(e){return function(e){function t(a){if(n[a])return n[a].exports;var i=n[a]={exports:{},id:a,loaded:!1};return e[a].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(5)},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(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 r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),s=n(2),u=a(s),d=n(7),h=a(d),c={actions:s.PropTypes.object.isRequired,player:s.PropTypes.object.isRequired,starttime:s.PropTypes.number,loop:s.PropTypes.bool,source:s.PropTypes.string},p=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.play=n.play.bind(n),n.pause=n.pause.bind(n),n.seek=n.seek.bind(n),n.forward=n.forward.bind(n),n.replay=n.replay.bind(n),n.toggleFullscreen=n.toggleFullscreen.bind(n),n.videoWidth=n.videoWidth.bind(n),n.videoHeight=n.videoHeight.bind(n),n.handleLoadStart=n.handleLoadStart.bind(n),n.handleCanPlay=n.handleCanPlay.bind(n),n.handleCanPlayThrough=n.handleCanPlayThrough.bind(n),n.handlePlay=n.handlePlay.bind(n),n.handlePlaying=n.handlePlaying.bind(n),n.handlePause=n.handlePause.bind(n),n.handleEnded=n.handleEnded.bind(n),n.handleWaiting=n.handleWaiting.bind(n),n.handleSeeking=n.handleSeeking.bind(n),n.handleSeeked=n.handleSeeked.bind(n),n.handleFullscreenChange=n.handleFullscreenChange.bind(n),n.handleError=n.handleError.bind(n),n.handleSuspend=n.handleSuspend.bind(n),n.handleAbort=n.handleAbort.bind(n),n.handleEmptied=n.handleEmptied.bind(n),n.handleStalled=n.handleStalled.bind(n),n.handleLoadedMetaData=n.handleLoadedMetaData.bind(n),n.handleLoadedData=n.handleLoadedData.bind(n),n.handleTimeUpdate=(0,h["default"])(n.handleTimeUpdate.bind(n),250),n.handleRateChange=n.handleRateChange.bind(n),n.handleVolumeChange=n.handleVolumeChange.bind(n),n.handleDurationChange=n.handleDurationChange.bind(n),n.handleProgress=(0,h["default"])(n.handleProgress.bind(n),1e3),n.handleKeypress=n.handleKeypress.bind(n),n.renderSources=n.renderSources.bind(n),n}return r(t,e),l(t,[{key:"play",value:function(){this.video.play()}},{key:"pause",value:function(){this.video.pause()}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"videoWidth",value:function(){return this.video.videoWidth}},{key:"videoHeight",value:function(){return this.video.videoHeight}},{key:"seek",value:function(e){try{this.video.currentTime=e}catch(t){}}},{key:"forward",value:function(e){this.seek(this.video.currentTime+e)}},{key:"replay",value:function(e){this.forward(-e)}},{key:"toggleFullscreen",value:function(){var e=this.props,t=e.player,n=e.actions;n.toggleFullscreen(t)}},{key:"handleLoadStart",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused&&t.hasStarted&&n.handleLoadStart(this.video.buffered)}},{key:"handleCanPlay",value:function(){this.props.actions.handleCanPlay({videoWidth:this.videoWidth(),videoHeight:this.videoHeight()})}},{key:"handleCanPlayThrough",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting&&n.handleCanPlayThrough()}},{key:"handlePlaying",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting&&n.handlePlaying()}},{key:"handlePlay",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused&&n.handlePlay()}},{key:"handlePause",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused||n.handlePause()}},{key:"handleFirstPlay",value:function(){var e=this.props,t=e.player,n=e.starttime,a=e.actions;n&&this.seek(n),t.hasStarted||a.handleFirstPlay()}},{key:"handleDurationChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.duration!==this.video.duration&&n.handleDurationChange(this.video.duration)}},{key:"handleProgress",value:function(){var e=this.props.actions;e.handleProgressChange(this.video.buffered)}},{key:"handleEnded",value:function(){var e=this.props,t=e.loop,n=e.player,a=e.actions;t?(this.seek(0),this.play()):n.paused||this.pause(),n.ended||a.handleEnd()}},{key:"handleWaiting",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting||n.handleWaiting()}},{key:"handleSeeking",value:function(){var e=this.props,t=e.player,n=e.actions;t.seeking||n.handleSeeking()}},{key:"handleSeeked",value:function(){var e=this.props,t=e.player,n=e.actions;t.seeking&&n.handleSeeked()}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){}},{key:"handleAbort",value:function(){}},{key:"handleEmptied",value:function(){}},{key:"handleStalled",value:function(){}},{key:"handleLoadedMetaData",value:function(){}},{key:"handleLoadedData",value:function(){}},{key:"handleTimeUpdate",value:function(){var e=this.props,t=e.player,n=e.actions;t.currentTime!==this.video.currentTime&&n.handleTimeUpdate(this.video.currentTime)}},{key:"handleRateChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.playbackRate!==this.video.playbackRate&&n.handleRateChange(this.video.playbackRate)}},{key:"handleVolumeChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.volume!==this.video.volume&&n.handleVolumeChange(this.video.volume)}},{key:"handleError",value:function(){}},{key:"handleKeypress",value:function(){}},{key:"renderSources",value:function(){var e=this.props.source;return u["default"].createElement("source",{src:e})}},{key:"render",value:function(){var e=this;return u["default"].createElement("video",{className:"video-react-video",ref:function(t){e.video=t},controls:!0,style:{width:"100%",height:"100%"},onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange},this.renderSources())}},{key:"playbackRate",set:function(e){this.video.playbackRate=e},get:function(){return this.video.playbackRate}},{key:"muted",set:function(e){this.video.muted=e}},{key:"volume",set:function(e){this.video.volume=e}}]),t}(s.Component);t["default"]=p,p.propTypes=c},function(t,n){t.exports=e},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(){function e(t){n(this,e),this.setState=t}return a(e,[{key:"setVideo",value:function(e){this.video=e}},{key:"setPlayerElement",value:function(e){this.playerElement=e}},{key:"play",value:function(){this.video.play()}},{key:"pause",value:function(){this.video.pause()}},{key:"toggleFullscreen",value:function(e){this.setState({isFullscreen:!e.isFullscreen})}},{key:"handleFullscreenChange",value:function(e){this.setState({isFullscreen:e})}},{key:"handleLoadStart",value:function(e){this.setState({hasStarted:!1,ended:!1,buffered:e})}},{key:"handleCanPlay",value:function(e){var t=e.videoWidth,n=e.videoHeight;this.setState({waiting:!1,videoWidth:t,videoHeight:n})}},{key:"handleWaiting",value:function(){this.setState({waiting:!0})}},{key:"handleCanPlayThrough",value:function(){this.setState({waiting:!1})}},{key:"handlePlaying",value:function(){this.setState({waiting:!1})}},{key:"handlePlay",value:function(){this.setState({ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0})}},{key:"handlePause",value:function(){this.setState({paused:!0})}},{key:"handleEnd",value:function(){this.setState({ended:!0})}},{key:"handleSeeking",value:function(){this.setState({seeking:!0})}},{key:"handleSeeked",value:function(){this.setState({seeking:!1})}},{key:"handleSeekingTime",value:function(e){this.setState({seekingTime:e})}},{key:"handleEndSeeking",value:function(e){this.setState({seekingTime:0,currentTime:e})}},{key:"handleDurationChange",value:function(e){this.setState({duration:e})}},{key:"handleTimeUpdate",value:function(e){this.setState({currentTime:e})}},{key:"handleVolumeChange",value:function(e){this.setState({volume:e})}},{key:"handleProgressChange",value:function(e){this.setState({buffered:e})}},{key:"handleRateChange",value:function(e){this.setState({playbackRate:e})}},{key:"handleMute",value:function(e){this.setState({muted:e})}}]),e}();t["default"]=i},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(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 r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),u=n(2),d=a(u),h=n(6),c=a(h),p=n(3),f=a(p),y=n(1),v=a(y),g={width:u.PropTypes.number,height:u.PropTypes.number,fluid:u.PropTypes.bool,aspectRatio:u.PropTypes.string},b={fluid:!1,width:400,height:300},k=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.controlsHideTimer=null,n.state={userActivity:!0,player:{duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!0,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,isFullscreen:!1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,error:null}},n.actions=new f["default"](n.setPlayerState.bind(n)),n.renderStyle=n.renderStyle.bind(n),n.handleResize=n.handleResize.bind(n),n}return r(t,e),s(t,[{key:"componentDidMount",value:function(){this.handleResize(),window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(e,t){this.state.player.isFullscreen!==t.player.isFullscreen&&this.handleResize()}},{key:"componentWillUnmount",value:function(){window.addEventListener("resize",this.handleResize),this.controlsHideTimer&&window.clearTimeout(this.controlsHideTimer)}},{key:"setPlayerState",value:function(e){this.setState({player:Object.assign({},this.state.player,e)})}},{key:"handleResize",value:function(){}},{key:"userActive",value:function(e){this.setState({userActivity:e})}},{key:"renderStyle",value:function(){var e=this.props.fluid,t=this.state.player,n={},a=void 0,i=void 0,o=void 0;o=void 0!==this.props.aspectRatio&&"auto"!==this.props.aspectRatio?this.props.aspectRatio:t.videoWidth?t.videoWidth+":"+t.videoHeight:"4:3";var r=o.split(":"),l=r[1]/r[0];return a=void 0!==this.props.width?this.props.width:void 0!==this.props.height?this.props.height/l:t.videoWidth||400,i=void 0!==this.props.height?this.props.height:a*l,e?n.paddingTop=100*l+"%":(n.width=a+"px",n.height=i+"px"),n}},{key:"render",value:function(){var e=this,t=this.props.fluid,n=this.state.player,a=n.paused,i=n.hasStarted,o=n.waiting,r=n.seeking,s=n.isFullscreen,u=l({},this.props,{player:this.state.player,actions:this.actions});return d["default"].createElement("div",{className:(0,c["default"])({"video-react-controls-enabled":!0,"video-react-has-started":i,"video-react-paused":a,"video-react-playing":!a,"video-react-waiting":o,"video-react-seeking":r,"video-react-fluid":t,"video-react-fullscreen":s,"video-react-user-inactive":!this.state.userActivity,"video-react-user-active":this.state.userActivity},"video-react"),style:this.renderStyle(),ref:function(t){e.actions.setPlayerElement(t)},onTouchStart:this.handleMouseDown,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove},d["default"].createElement(v["default"],l({ref:function(t){e.video=t,e.actions.setVideo(t)}},u)))}}]),t}(u.Component);t["default"]=k,k.propTypes=g,k.defaultProps=b},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Video=t.Player=void 0;var i=n(4),o=a(i),r=n(1),l=a(r);t.Player=o["default"],t.Video=l["default"]},function(e,t,n){var a,i;/*! | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("video-react",["react","react-dom"],t):"object"==typeof exports?exports["video-react"]=t(require("react"),require("react-dom")):e["video-react"]=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(24),e.exports=n(25)},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=document.documentElement,r=document.body,o=n.clientLeft||r.clientLeft||0,a=window.pageXOffset||r.scrollLeft,i=t.left+a-o,u=n.clientTop||r.clientTop||0,l=window.pageYOffset||r.scrollTop,s=t.top+l-u;return{left:Math.round(i),top:Math.round(s)}}function o(e,t){var n={},o=r(e),a=e.offsetWidth,i=e.offsetHeight,u=o.top,l=o.left,s=t.pageY,c=t.pageX;return t.changedTouches&&(c=t.changedTouches[0].pageX,s=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(u-s+i)/i)),n.x=Math.max(0,Math.min(1,(c-l)/a)),n}function a(e){var t=(0,i.findDOMNode)(e);t&&t.blur&&t.blur()}Object.defineProperty(t,"__esModule",{value:!0}),t.findElPosition=r,t.getPointerPosition=o,t.blurNode=a;var i=n(5)},function(e,t,n){var r,o;/*! | ||
Copyright (c) 2016 Jed Watson. | ||
@@ -6,3 +6,4 @@ Licensed under the MIT License (MIT), see | ||
*/ | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var i=typeof a;if("string"===i||"number"===i)e.push(a);else if(Array.isArray(a))e.push(n.apply(null,a));else if("object"===i)for(var r in a)o.call(a,r)&&a[r]&&e.push(r)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(a=[],i=function(){return n}.apply(t,a),!(void 0!==i&&(e.exports=i)))}()},function(e,t){(function(t){function n(e,t,n){function a(t){var n=y,a=v;return y=v=void 0,T=t,b=e.apply(a,n)}function o(e){return T=e,k=setTimeout(d,t),C?a(e):b}function r(e){var n=e-m,a=e-T,i=t-n;return j?P(i,g-a):i}function u(e){var n=e-m,a=e-T;return void 0===m||n>=t||n<0||j&&a>=g}function d(){var e=w();return u(e)?h(e):void(k=setTimeout(d,r(e)))}function h(e){return k=void 0,E&&y?a(e):(y=v=void 0,b)}function c(){void 0!==k&&clearTimeout(k),T=0,y=m=v=k=void 0}function p(){return void 0===k?b:h(w())}function f(){var e=w(),n=u(e);if(y=arguments,v=this,m=e,n){if(void 0===k)return o(m);if(j)return k=setTimeout(d,t),a(m)}return void 0===k&&(k=setTimeout(d,t)),b}var y,v,g,b,k,m,T=0,C=!1,j=!1,E=!0;if("function"!=typeof e)throw new TypeError(s);return t=l(t)||0,i(n)&&(C=!!n.leading,j="maxWait"in n,g=j?S(l(n.maxWait)||0,t):g,E="trailing"in n?!!n.trailing:E),f.cancel=c,f.flush=p,f}function a(e,t,a){var o=!0,r=!0;if("function"!=typeof e)throw new TypeError(s);return i(a)&&(o="leading"in a?!!a.leading:o,r="trailing"in a?!!a.trailing:r),n(e,t,{leading:o,maxWait:t,trailing:r})}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return!!e&&"object"==typeof e}function r(e){return"symbol"==typeof e||o(e)&&m.call(e)==d}function l(e){if("number"==typeof e)return e;if(r(e))return u;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(h,"");var n=p.test(e);return n||f.test(e)?y(e.slice(2),n?2:8):c.test(e)?u:+e}var s="Expected a function",u=NaN,d="[object Symbol]",h=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,f=/^0o[0-7]+$/i,y=parseInt,v="object"==typeof t&&t&&t.Object===Object&&t,g="object"==typeof self&&self&&self.Object===Object&&self,b=v||g||Function("return this")(),k=Object.prototype,m=k.toString,S=Math.max,P=Math.min,w=function(){return b.Date.now()};e.exports=a}).call(t,function(){return this}())}])}); | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Math.floor(e%60),r=Math.floor(e/60%60),o=Math.floor(e/3600),a=Math.floor(t/60%60),i=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(o=r=n="-"),o=o>0||i>0?o+":":"",r=((o||a>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,o+r+n}Object.defineProperty(t,"__esModule",{value:!0}),t.formatTime=n},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c={actions:l.PropTypes.object,player:l.PropTypes.object},d=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleClick=r.handleClick.bind(r),r}return i(t,e),u(t,[{key:"componentDidMount",value:function(){}},{key:"handleClick",value:function(){var e=this.props.actions;e.play()}},{key:"render",value:function(){var e=this.props.player;return e.hasStarted?null:s.default.createElement("button",{className:"video-react-big-play-button",type:"button","aria-live":"polite",onClick:this.handleClick},s.default.createElement("span",{className:"video-react-icon video-react-icon-play-arrow"}))}}]),t}(l.Component);t.default=d,d.propTypes=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c={player:l.PropTypes.object},d=function(e){function t(e,n){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this.props.player;return e.seeking||e.waiting?s.default.createElement("div",{className:"video-react-loading-spinner"}):null}}]),t}(l.Component);t.default=d,d.propTypes=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.poster,n=e.player;return!t||n.hasStarted?null:i.default.createElement("div",{className:"video-react-poster",tabIndex:"-1",style:{backgroundImage:'url("'+t+'")'}})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),i=r(a),u={poster:a.PropTypes.string,player:a.PropTypes.object};o.propTypes=u,t.default=o},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default: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 u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var 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}}(),s=n(1),c=o(s),d=n(5),f=n(3),p=o(f),h=n(2),y=r(h),v={className:s.PropTypes.string,onMouseDown:s.PropTypes.func,onMouseMove:s.PropTypes.func,onMouseUp:s.PropTypes.func,getPercent:s.PropTypes.func,vertical:s.PropTypes.bool,children:s.PropTypes.node,player:s.PropTypes.object,label:s.PropTypes.string,valuenow:s.PropTypes.string,valuetext:s.PropTypes.string},b=function(e){function t(e,n){a(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleMouseDown=r.handleMouseDown.bind(r),r.handleMouseMove=r.handleMouseMove.bind(r),r.handleMouseUp=r.handleMouseUp.bind(r),r.handleFocus=r.handleFocus.bind(r),r.handleBlur=r.handleBlur.bind(r),r.handleClick=r.handleClick.bind(r),r.handleKeyPress=r.handleKeyPress.bind(r),r.stepForward=r.stepForward.bind(r),r.stepBack=r.stepBack.bind(r),r.calculateDistance=r.calculateDistance.bind(r),r.getProgress=r.getProgress.bind(r),r.renderChildren=r.renderChildren.bind(r),r.state={active:!1},r}return u(t,e),l(t,[{key:"getProgress",value:function(){var e=this.props.getPercent;if(!e)return 0;var t=e();return("number"!=typeof t||t<0||t===1/0)&&(t=0),t}},{key:"handleMouseDown",value:function(e){var t=this.props.onMouseDown;e.preventDefault(),e.stopPropagation(),document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("mouseup",this.handleMouseUp,!0),document.addEventListener("touchmove",this.handleMouseMove,!0),document.addEventListener("touchend",this.handleMouseUp,!0),this.setState({active:!0,distance:0}),this.handleMouseMove(e),t&&t(e)}},{key:"handleMouseMove",value:function(e){var t=this.props.onMouseMove;t&&t(e)}},{key:"handleMouseUp",value:function(e){var t=this.props.onMouseUp;document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("mouseup",this.handleMouseUp,!0),document.removeEventListener("touchmove",this.handleMouseMove,!0),document.removeEventListener("touchend",this.handleMouseUp,!0),this.setState({active:!1}),t&&t(e)}},{key:"handleFocus",value:function(){document.addEventListener("keydown",this.handleKeyPress,!0)}},{key:"handleBlur",value:function(){document.removeEventListener("keydown",this.handleKeyPress,!0)}},{key:"handleClick",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"handleKeyPress",value:function(e){37===e.which||40===e.which?(e.preventDefault(),e.stopPropagation(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),e.stopPropagation(),this.stepForward())}},{key:"stepForward",value:function(){}},{key:"stepBack",value:function(){}},{key:"calculateDistance",value:function(e){var t=(0,d.findDOMNode)(this),n=y.getPointerPosition(t,e);return this.props.vertical?n.y:n.x}},{key:"renderChildren",value:function(){var e=this.getProgress(),t=(100*e).toFixed(2)+"%";return c.default.Children.map(this.props.children,function(n){return c.default.cloneElement(n,{progress:e,percentage:t})})}},{key:"render",value:function(){var e=this.props,t=e.vertical,n=e.label,r=e.valuenow,o=e.valuetext,a={"video-react-slider":!0,"video-react-slider-vertical":t,"video-react-slider-horizontal":!t,"video-react-sliding":this.state.active};return this.props.className&&(a[this.props.className]=!0),c.default.createElement("div",{className:(0,p.default)(a),onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,tabIndex:0,"aria-label":n||"","aria-valuenow":r||"","aria-valuetext":o||"","aria-valuemin":0,"aria-valuemax":100},this.renderChildren())}}]),t}(s.Component);t.default=b,b.propTypes=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c=n(26),d=r(c),f={actions:l.PropTypes.object.isRequired,player:l.PropTypes.object.isRequired,starttime:l.PropTypes.number,loop:l.PropTypes.bool,source:l.PropTypes.string},p=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.play=n.play.bind(n),n.pause=n.pause.bind(n),n.seek=n.seek.bind(n),n.forward=n.forward.bind(n),n.replay=n.replay.bind(n),n.toggleFullscreen=n.toggleFullscreen.bind(n),n.videoWidth=n.videoWidth.bind(n),n.videoHeight=n.videoHeight.bind(n),n.handleLoadStart=n.handleLoadStart.bind(n),n.handleCanPlay=n.handleCanPlay.bind(n),n.handleCanPlayThrough=n.handleCanPlayThrough.bind(n),n.handlePlay=n.handlePlay.bind(n),n.handlePlaying=n.handlePlaying.bind(n),n.handlePause=n.handlePause.bind(n),n.handleEnded=n.handleEnded.bind(n),n.handleWaiting=n.handleWaiting.bind(n),n.handleSeeking=n.handleSeeking.bind(n),n.handleSeeked=n.handleSeeked.bind(n),n.handleFullscreenChange=n.handleFullscreenChange.bind(n),n.handleError=n.handleError.bind(n),n.handleSuspend=n.handleSuspend.bind(n),n.handleAbort=n.handleAbort.bind(n),n.handleEmptied=n.handleEmptied.bind(n),n.handleStalled=n.handleStalled.bind(n),n.handleLoadedMetaData=n.handleLoadedMetaData.bind(n),n.handleLoadedData=n.handleLoadedData.bind(n),n.handleTimeUpdate=(0,d.default)(n.handleTimeUpdate.bind(n),250),n.handleRateChange=n.handleRateChange.bind(n),n.handleVolumeChange=n.handleVolumeChange.bind(n),n.handleDurationChange=n.handleDurationChange.bind(n),n.handleProgress=(0,d.default)(n.handleProgress.bind(n),1e3),n.handleKeypress=n.handleKeypress.bind(n),n.renderSources=n.renderSources.bind(n),n}return i(t,e),u(t,[{key:"play",value:function(){this.video.play()}},{key:"pause",value:function(){this.video.pause()}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"videoWidth",value:function(){return this.video.videoWidth}},{key:"videoHeight",value:function(){return this.video.videoHeight}},{key:"seek",value:function(e){try{this.video.currentTime=e}catch(e){}}},{key:"forward",value:function(e){this.seek(this.video.currentTime+e)}},{key:"replay",value:function(e){this.forward(-e)}},{key:"toggleFullscreen",value:function(){var e=this.props,t=e.player,n=e.actions;n.toggleFullscreen(t)}},{key:"handleLoadStart",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused&&t.hasStarted&&n.handleLoadStart(this.video.buffered)}},{key:"handleCanPlay",value:function(){this.props.actions.handleCanPlay({videoWidth:this.videoWidth(),videoHeight:this.videoHeight()})}},{key:"handleCanPlayThrough",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting&&n.handleCanPlayThrough()}},{key:"handlePlaying",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting&&n.handlePlaying()}},{key:"handlePlay",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused&&n.handlePlay()}},{key:"handlePause",value:function(){var e=this.props,t=e.player,n=e.actions;t.paused||n.handlePause()}},{key:"handleFirstPlay",value:function(){var e=this.props,t=e.player,n=e.starttime,r=e.actions;n&&this.seek(n),t.hasStarted||r.handleFirstPlay()}},{key:"handleDurationChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.duration!==this.video.duration&&n.handleDurationChange(this.video.duration)}},{key:"handleProgress",value:function(){var e=this.props.actions;e.handleProgressChange(this.video.buffered)}},{key:"handleEnded",value:function(){var e=this.props,t=e.loop,n=e.player,r=e.actions;t?(this.seek(0),this.play()):n.paused||this.pause(),n.ended||r.handleEnd()}},{key:"handleWaiting",value:function(){var e=this.props,t=e.player,n=e.actions;t.waiting||n.handleWaiting()}},{key:"handleSeeking",value:function(){var e=this.props,t=e.player,n=e.actions;t.seeking||n.handleSeeking()}},{key:"handleSeeked",value:function(){var e=this.props,t=e.player,n=e.actions;t.seeking&&n.handleSeeked()}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){}},{key:"handleAbort",value:function(){}},{key:"handleEmptied",value:function(){}},{key:"handleStalled",value:function(){}},{key:"handleLoadedMetaData",value:function(){}},{key:"handleLoadedData",value:function(){}},{key:"handleTimeUpdate",value:function(){var e=this.props,t=e.player,n=e.actions;t.currentTime!==this.video.currentTime&&n.handleTimeUpdate(this.video.currentTime)}},{key:"handleRateChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.playbackRate!==this.video.playbackRate&&n.handleRateChange(this.video.playbackRate)}},{key:"handleVolumeChange",value:function(){var e=this.props,t=e.player,n=e.actions;t.volume!==this.video.volume&&n.handleVolumeChange(this.video.volume)}},{key:"handleError",value:function(){}},{key:"handleKeypress",value:function(){}},{key:"renderSources",value:function(){var e=this.props.source;return s.default.createElement("source",{src:e})}},{key:"render",value:function(){var e=this;return s.default.createElement("video",{className:"video-react-video",ref:function(t){e.video=t},style:{width:"100%",height:"100%"},onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange},this.renderSources())}},{key:"playbackRate",set:function(e){this.video.playbackRate=e},get:function(){return this.video.playbackRate}},{key:"muted",set:function(e){this.video.muted=e}},{key:"volume",set:function(e){this.video.volume=e}}]),t}(l.Component);t.default=p,p.propTypes=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return i.default.createElement("div",{className:"video-react-control-bar"},i.default.createElement(c.default,e),i.default.createElement(h.default,e),i.default.createElement(f.default,e),i.default.createElement(l.default,e),i.default.createElement(v.default,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1),i=r(a),u=n(19),l=r(u),s=n(18),c=r(s),d=n(12),f=r(d),p=n(20),h=r(p),y=n(14),v=r(y)},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(13),a=r(o);t.default=new a.default("forward")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){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 u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var 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}}(),s=n(1),c=r(s),d=n(3),f=r(d),p=n(2),h={actions:s.PropTypes.object.isRequired,player:s.PropTypes.object.isRequired,seconds:c.default.PropTypes.oneOf([5,10,30])},y={seconds:10};t.default=function(e){var t=function(t){function n(e,t){a(this,n);var r=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.handleClick=r.handleClick.bind(r),r}return u(n,t),l(n,[{key:"handleClick",value:function(){var t=this.props,n=t.actions,r=t.seconds;"forward"===e?n.forward(r):n.replay(r),(0,p.blurNode)(this.button)}},{key:"render",value:function(){var t,n=this,r=this.props.seconds;return c.default.createElement("button",{ref:function(e){n.button=e},className:(0,f.default)((t={},o(t,"video-react-icon-"+e+"-"+r,!0),o(t,"video-react-"+e+"-control",!0),t),"video-react-control video-react-button"),onClick:this.handleClick},c.default.createElement("span",{className:"video-react-control-text"},e+" "+r+" seconds"))}}]),n}(s.Component);return t.propTypes=h,t.defaultProps=y,t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c=n(3),d=r(c),f=n(2),p={actions:l.PropTypes.object.isRequired,player:l.PropTypes.object.isRequired},h=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleClick=r.handleClick.bind(r),r.requestFullscreen=r.requestFullscreen.bind(r),r.handleFullScreenChange=r.handleFullScreenChange.bind(r),r}return i(t,e),u(t,[{key:"componentDidMount",value:function(){document.addEventListener("fullscreenchange",this.handleFullScreenChange),document.addEventListener("webkitfullscreenchange",this.handleFullScreenChange),document.addEventListener("mozfullscreenchange",this.handleFullScreenChange),document.addEventListener("MSFullscreenChange",this.handleFullScreenChange)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("fullscreenchange",this.handleFullScreenChange),document.removeEventListener("webkitfullscreenchange",this.handleFullScreenChange),document.removeEventListener("mozfullscreenchange",this.handleFullScreenChange),document.removeEventListener("MSFullscreenChange",this.handleFullScreenChange)}},{key:"handleFullScreenChange",value:function(){var e=this.props.actions;e.handleFullscreenChange(this.isFullscreen())}},{key:"isFullscreen",value:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}},{key:"isFullscreenEnabled",value:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}},{key:"requestFullscreen",value:function(){var e=this.props.actions.playerElement;e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}},{key:"exitFullscreen",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"handleClick",value:function(){var e=this.props,t=e.player,n=e.actions;this.isFullscreenEnabled()?this.isFullscreen()?this.exitFullscreen():this.requestFullscreen():n.handleFullscreenChange(!t.isFullscreen),(0,f.blurNode)(this.button)}},{key:"render",value:function(){var e=this,t=this.props.player;return s.default.createElement("button",{className:(0,d.default)({"video-react-icon-fullscreen-exit":t.isFullscreen,"video-react-icon-fullscreen":!t.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button"),ref:function(t){e.button=t},type:"button","aria-live":"polite",onClick:this.handleClick},s.default.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))}}]),t}(l.Component);t.default=h,h.propTypes=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){function t(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"}var n=e.buffered,r=e.duration;if(!n||!n.length)return null;var o=n.end(n.length-1),a={};o>r&&(o=r),a.width=t(o,r);for(var u=[],l=0;l<n.length;l++){var s=n.start(l),c=n.end(l),d=i.default.createElement("div",{style:{left:t(s,o),width:t(c-s,o)},key:"part-"+l});u.push(d)}return 0===u.length&&(u=null),i.default.createElement("div",{style:a,className:"video-react-load-progress"},i.default.createElement("span",{className:"video-react-control-text"},i.default.createElement("span",null,"Loaded"),": 0%"),u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1),i=r(a),u={duration:a.PropTypes.number.isRequired,buffered:a.PropTypes.object};o.propTypes=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.duration,n=e.mouseTime;if(!n.time)return null;var r=(0,u.formatTime)(n.time,t);return i.default.createElement("div",{className:"video-react-mouse-display",style:{left:n.position+"px"},"data-current-time":r})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),i=r(a),u=n(4);o.propTypes={duration:a.PropTypes.number.isRequired,mouseTime:a.PropTypes.object.isRequired},t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.currentTime,n=e.duration,r=e.percentage;return i.default.createElement("div",{"data-current-time":(0,u.formatTime)(t,n),className:"video-react-play-progress video-react-slider-bar",style:{width:r}},i.default.createElement("span",{className:"video-react-control-text"},i.default.createElement("span",null,"Progress"),": ",r))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1),i=r(a),u=n(4),l={currentTime:a.PropTypes.number.isRequired,duration:a.PropTypes.number.isRequired,percentage:a.PropTypes.string};o.propTypes=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c=n(3),d=r(c),f=n(2),p={actions:l.PropTypes.object.isRequired,player:l.PropTypes.object.isRequired},h=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.handleClick=r.handleClick.bind(r),r}return i(t,e),u(t,[{key:"handleClick",value:function(){var e=this.props,t=e.actions,n=e.player;n.paused?t.play():t.pause(),(0,f.blurNode)(this.button)}},{key:"render",value:function(){var e=this,t=this.props.player,n=t.paused?"Play":"Pause";return s.default.createElement("button",{ref:function(t){e.button=t},className:(0,d.default)({"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":t.paused,"video-react-playing":!t.paused}),onClick:this.handleClick},s.default.createElement("span",{className:"video-react-control-text"},n))}}]),t}(l.Component);t.default=h,h.propTypes=p},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default: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 u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var 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},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(1),d=o(c),f=n(5),p=n(2),h=r(p),y=n(21),v=o(y),b={player:c.PropTypes.object.isRequired},m=function(e){function t(e,n){a(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.state={mouseTime:{time:null,position:0}},r.handleMouseMoveThrottle=r.handleMouseMove.bind(r),r}return u(t,e),s(t,[{key:"handleMouseMove",value:function(e){if(e.pageX){var t=this.props.player.duration,n=(0,f.findDOMNode)(this.seekBar),r=h.getPointerPosition(n,e).x*t,o=e.pageX-h.findElPosition(n).left;this.setState({mouseTime:{time:r,position:o}})}}},{key:"render",value:function(){var e=this;return d.default.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:"video-react-progress-control video-react-control"},d.default.createElement(v.default,l({mouseTime:this.state.mouseTime,ref:function(t){e.seekBar=t}},this.props)))}}]),t}(c.Component);t.default=m,m.propTypes=b},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(13),a=r(o);t.default=new a.default("replay")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),s=r(l),c=n(9),d=r(c),f=n(17),p=r(f),h=n(15),y=r(h),v=n(16),b=r(v),m=n(4),g={player:l.PropTypes.object.isRequired,mouseTime:l.PropTypes.object.isRequired,actions:l.PropTypes.object.isRequired},k=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.getPercent=r.getPercent.bind(r),r.getNewTime=r.getNewTime.bind(r),r.handleMouseDown=r.handleMouseDown.bind(r),r.handleMouseMove=r.handleMouseMove.bind(r),r.handleMouseUp=r.handleMouseUp.bind(r),r}return i(t,e),u(t,[{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(){}},{key:"getPercent",value:function(){var e=this.props.player,t=e.currentTime,n=e.seekingTime,r=e.duration,o=n||t,a=o/r;return a>=1?1:a}},{key:"getNewTime",value:function(e){var t=this.props.player.duration,n=this.slider.calculateDistance(e),r=n*t;return r===t?r-.1:r}},{key:"handleMouseDown",value:function(){var e=this.props,t=e.actions,n=e.player;this.videoWasPlaying=!n.paused,t.pause()}},{key:"handleMouseUp",value:function(e){var t=this.props.actions,n=this.getNewTime(e);t.seek(n),this.videoWasPlaying&&t.play(),t.handleEndSeeking(n)}},{key:"handleMouseMove",value:function(e){var t=this.props.actions,n=this.getNewTime(e);t.handleSeekingTime(n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.player,r=n.currentTime,o=n.seekingTime,a=n.duration,i=n.buffered,u=t.mouseTime,l=o||r;return s.default.createElement(d.default,{ref:function(t){e.slider=t},label:"video progress bar",className:"video-react-progress-holder",valuenow:(100*this.getPercent()).toFixed(2),valuetext:(0,m.formatTime)(l,a),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent},s.default.createElement(y.default,{buffered:i,currentTime:l,duration:a}),s.default.createElement(b.default,{duration:a,mouseTime:u}),s.default.createElement(p.default,{currentTime:l,duration:a}))}}]),t}(l.Component);t.default=k,k.propTypes=g},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=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}}(),o=function(){function e(t){n(this,e),this.setState=t}return r(e,[{key:"setVideo",value:function(e){this.video=e}},{key:"setPlayerElement",value:function(e){this.playerElement=e}},{key:"play",value:function(){this.video.play()}},{key:"pause",value:function(){this.video.pause()}},{key:"seek",value:function(e){this.video.seek(e)}},{key:"forward",value:function(e){this.video.forward(e)}},{key:"replay",value:function(e){this.video.replay(e)}},{key:"handleFullscreenChange",value:function(e){this.setState({isFullscreen:e})}},{key:"handleLoadStart",value:function(e){this.setState({hasStarted:!1,ended:!1,buffered:e})}},{key:"handleCanPlay",value:function(e){var t=e.videoWidth,n=e.videoHeight;this.setState({waiting:!1,videoWidth:t,videoHeight:n})}},{key:"handleWaiting",value:function(){this.setState({waiting:!0})}},{key:"handleCanPlayThrough",value:function(){this.setState({waiting:!1})}},{key:"handlePlaying",value:function(){this.setState({waiting:!1})}},{key:"handlePlay",value:function(){this.setState({ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0})}},{key:"handlePause",value:function(){this.setState({paused:!0})}},{key:"handleEnd",value:function(){this.setState({ended:!0})}},{key:"handleSeeking",value:function(){this.setState({seeking:!0})}},{key:"handleSeeked",value:function(){this.setState({seeking:!1})}},{key:"handleSeekingTime",value:function(e){this.setState({seekingTime:e})}},{key:"handleEndSeeking",value:function(e){this.setState({seekingTime:0,currentTime:e})}},{key:"handleDurationChange",value:function(e){this.setState({duration:e})}},{key:"handleTimeUpdate",value:function(e){this.setState({currentTime:e})}},{key:"handleVolumeChange",value:function(e){this.setState({volume:e})}},{key:"handleProgressChange",value:function(e){this.setState({buffered:e})}},{key:"handleRateChange",value:function(e){this.setState({playbackRate:e})}},{key:"handleMute",value:function(e){this.setState({muted:e})}}]),e}();t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});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},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}}(),s=n(1),c=r(s),d=n(3),f=r(d),p=n(22),h=r(p),y=n(6),v=r(y),b=n(7),m=r(b),g=n(8),k=r(g),P=n(10),w=r(P),_=n(11),T=r(_),M={width:s.PropTypes.number,height:s.PropTypes.number,fluid:s.PropTypes.bool,aspectRatio:s.PropTypes.string},E={fluid:!1,width:400,height:300},O=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.controlsHideTimer=null,n.state={userActivity:!0,player:{duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!0,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,isFullscreen:!1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,error:null}},n.actions=new h.default(n.setPlayerState.bind(n)),n.renderStyle=n.renderStyle.bind(n),n.handleResize=n.handleResize.bind(n),n}return i(t,e),l(t,[{key:"componentDidMount",value:function(){this.handleResize(),window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(e,t){this.state.player.isFullscreen!==t.player.isFullscreen&&this.handleResize()}},{key:"componentWillUnmount",value:function(){window.addEventListener("resize",this.handleResize),this.controlsHideTimer&&window.clearTimeout(this.controlsHideTimer)}},{key:"setPlayerState",value:function(e){this.setState({player:Object.assign({},this.state.player,e)})}},{key:"handleResize",value:function(){}},{key:"userActive",value:function(e){this.setState({userActivity:e})}},{key:"renderStyle",value:function(){var e=this.props.fluid,t=this.state.player,n={},r=void 0,o=void 0,a=void 0;a=void 0!==this.props.aspectRatio&&"auto"!==this.props.aspectRatio?this.props.aspectRatio:t.videoWidth?t.videoWidth+":"+t.videoHeight:"4:3";var i=a.split(":"),u=i[1]/i[0];return r=void 0!==this.props.width?this.props.width:void 0!==this.props.height?this.props.height/u:t.videoWidth||400,o=void 0!==this.props.height?this.props.height:r*u,e?n.paddingTop=100*u+"%":(n.width=r+"px",n.height=o+"px"),n}},{key:"render",value:function(){var e=this,t=this.props.fluid,n=this.state.player,r=n.paused,o=n.hasStarted,a=n.waiting,i=n.seeking,l=n.isFullscreen,s=u({},this.props,{player:this.state.player,actions:this.actions});return c.default.createElement("div",{className:(0,f.default)({"video-react-controls-enabled":!0,"video-react-has-started":o,"video-react-paused":r,"video-react-playing":!r,"video-react-waiting":a,"video-react-seeking":i,"video-react-fluid":t,"video-react-fullscreen":l,"video-react-user-inactive":!this.state.userActivity,"video-react-user-active":this.state.userActivity},"video-react"),style:this.renderStyle(),ref:function(t){e.actions.setPlayerElement(t)},onTouchStart:this.handleMouseDown,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove},c.default.createElement(w.default,u({ref:function(t){e.video=t,e.actions.setVideo(t)}},s)),c.default.createElement(k.default,s),c.default.createElement(m.default,s),c.default.createElement(v.default,s),c.default.createElement(T.default,s))}}]),t}(s.Component);t.default=O,O.propTypes=M,O.defaultProps=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.MouseTimeDisplay=t.LoadProgressBar=t.PlayProgressBar=t.Slider=t.SeekBar=t.ProgressControl=t.FullscreenToggle=t.ReplayControl=t.ForwardControl=t.PlayToggle=t.ControlBar=t.PosterImage=t.LoadingSpinner=t.BigPlayButton=t.Video=t.Player=void 0;var o=n(23),a=r(o),i=n(10),u=r(i),l=n(6),s=r(l),c=n(7),d=r(c),f=n(8),p=r(f),h=n(9),y=r(h),v=n(11),b=r(v),m=n(18),g=r(m),k=n(12),P=r(k),w=n(20),_=r(w),T=n(14),M=r(T),E=n(19),O=r(E),j=n(21),C=r(j),S=n(17),F=r(S),R=n(15),x=r(R),D=n(16),L=r(D);t.Player=a.default,t.Video=u.default,t.BigPlayButton=s.default,t.LoadingSpinner=d.default,t.PosterImage=p.default,t.ControlBar=b.default,t.PlayToggle=g.default,t.ForwardControl=P.default,t.ReplayControl=_.default,t.FullscreenToggle=M.default,t.ProgressControl=O.default,t.SeekBar=C.default,t.Slider=y.default,t.PlayProgressBar=F.default,t.LoadProgressBar=x.default,t.MouseTimeDisplay=L.default},function(e,t){},function(e,t){(function(t){function n(e,t,n){function r(t){var n=y,r=v;return y=v=void 0,T=t,m=e.apply(r,n)}function a(e){return T=e,g=setTimeout(c,t),M?r(e):m}function i(e){var n=e-k,r=e-T,o=t-n;return E?w(o,b-r):o}function s(e){var n=e-k,r=e-T;return void 0===k||n>=t||n<0||E&&r>=b}function c(){var e=_();return s(e)?d(e):void(g=setTimeout(c,i(e)))}function d(e){return g=void 0,O&&y?r(e):(y=v=void 0,m)}function f(){void 0!==g&&clearTimeout(g),T=0,y=k=v=g=void 0}function p(){return void 0===g?m:d(_())}function h(){var e=_(),n=s(e);if(y=arguments,v=this,k=e,n){if(void 0===g)return a(k);if(E)return g=setTimeout(c,t),r(k)}return void 0===g&&(g=setTimeout(c,t)),m}var y,v,b,m,g,k,T=0,M=!1,E=!1,O=!0;if("function"!=typeof e)throw new TypeError(l);return t=u(t)||0,o(n)&&(M=!!n.leading,E="maxWait"in n,b=E?P(u(n.maxWait)||0,t):b,O="trailing"in n?!!n.trailing:O),h.cancel=f,h.flush=p,h}function r(e,t,r){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError(l);return o(r)&&(a="leading"in r?!!r.leading:a,i="trailing"in r?!!r.trailing:i),n(e,t,{leading:a,maxWait:t,trailing:i})}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==typeof e}function i(e){return"symbol"==typeof e||a(e)&&k.call(e)==c}function u(e){if("number"==typeof e)return e;if(i(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||h.test(e)?y(e.slice(2),n?2:8):f.test(e)?s:+e}var l="Expected a function",s=NaN,c="[object Symbol]",d=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,h=/^0o[0-7]+$/i,y=parseInt,v="object"==typeof t&&t&&t.Object===Object&&t,b="object"==typeof self&&self&&self.Object===Object&&self,m=v||b||Function("return this")(),g=Object.prototype,k=g.toString,P=Math.max,w=Math.min,_=function(){return m.Date.now()};e.exports=r}).call(t,function(){return this}())}])}); | ||
//# sourceMappingURL=video-react.min.js.map |
@@ -38,10 +38,27 @@ "use strict"; | ||
} | ||
// seek video by time | ||
}, { | ||
key: "toggleFullscreen", | ||
value: function toggleFullscreen(player) { | ||
this.setState({ | ||
isFullscreen: !player.isFullscreen | ||
}); | ||
key: "seek", | ||
value: function seek(time) { | ||
this.video.seek(time); | ||
} | ||
// jump forward x seconds | ||
}, { | ||
key: "forward", | ||
value: function forward(seconds) { | ||
this.video.forward(seconds); | ||
} | ||
// jump back x seconds | ||
}, { | ||
key: "replay", | ||
value: function replay(seconds) { | ||
this.video.replay(seconds); | ||
} | ||
}, { | ||
key: "handleFullscreenChange", | ||
@@ -65,4 +82,4 @@ value: function handleFullscreenChange(isFullscreen) { | ||
value: function handleCanPlay(_ref) { | ||
var videoWidth = _ref.videoWidth; | ||
var videoHeight = _ref.videoHeight; | ||
var videoWidth = _ref.videoWidth, | ||
videoHeight = _ref.videoHeight; | ||
@@ -69,0 +86,0 @@ this.setState({ |
@@ -23,2 +23,14 @@ 'use strict'; | ||
var _BigPlayButton = require('./BigPlayButton'); | ||
var _BigPlayButton2 = _interopRequireDefault(_BigPlayButton); | ||
var _LoadingSpinner = require('./LoadingSpinner'); | ||
var _LoadingSpinner2 = _interopRequireDefault(_LoadingSpinner); | ||
var _PosterImage = require('./PosterImage'); | ||
var _PosterImage2 = _interopRequireDefault(_PosterImage); | ||
var _Video = require('./Video'); | ||
@@ -28,2 +40,6 @@ | ||
var _ControlBar = require('./control-bar/ControlBar'); | ||
var _ControlBar2 = _interopRequireDefault(_ControlBar); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -194,8 +210,8 @@ | ||
var fluid = this.props.fluid; | ||
var _state$player = this.state.player; | ||
var paused = _state$player.paused; | ||
var hasStarted = _state$player.hasStarted; | ||
var waiting = _state$player.waiting; | ||
var seeking = _state$player.seeking; | ||
var isFullscreen = _state$player.isFullscreen; | ||
var _state$player = this.state.player, | ||
paused = _state$player.paused, | ||
hasStarted = _state$player.hasStarted, | ||
waiting = _state$player.waiting, | ||
seeking = _state$player.seeking, | ||
isFullscreen = _state$player.isFullscreen; | ||
@@ -235,3 +251,7 @@ var props = _extends({}, this.props, { | ||
} | ||
}, props)) | ||
}, props)), | ||
_react2.default.createElement(_PosterImage2.default, props), | ||
_react2.default.createElement(_LoadingSpinner2.default, props), | ||
_react2.default.createElement(_BigPlayButton2.default, props), | ||
_react2.default.createElement(_ControlBar2.default, props) | ||
); | ||
@@ -238,0 +258,0 @@ } |
@@ -159,5 +159,5 @@ 'use strict'; | ||
value: function toggleFullscreen() { | ||
var _props = this.props; | ||
var player = _props.player; | ||
var actions = _props.actions; | ||
var _props = this.props, | ||
player = _props.player, | ||
actions = _props.actions; | ||
@@ -173,5 +173,5 @@ actions.toggleFullscreen(player); | ||
value: function handleLoadStart() { | ||
var _props2 = this.props; | ||
var player = _props2.player; | ||
var actions = _props2.actions; | ||
var _props2 = this.props, | ||
player = _props2.player, | ||
actions = _props2.actions; | ||
@@ -201,5 +201,5 @@ if (player.paused && player.hasStarted) { | ||
value: function handleCanPlayThrough() { | ||
var _props3 = this.props; | ||
var player = _props3.player; | ||
var actions = _props3.actions; | ||
var _props3 = this.props, | ||
player = _props3.player, | ||
actions = _props3.actions; | ||
@@ -217,5 +217,5 @@ if (player.waiting) { | ||
value: function handlePlaying() { | ||
var _props4 = this.props; | ||
var player = _props4.player; | ||
var actions = _props4.actions; | ||
var _props4 = this.props, | ||
player = _props4.player, | ||
actions = _props4.actions; | ||
@@ -232,5 +232,5 @@ if (player.waiting) { | ||
value: function handlePlay() { | ||
var _props5 = this.props; | ||
var player = _props5.player; | ||
var actions = _props5.actions; | ||
var _props5 = this.props, | ||
player = _props5.player, | ||
actions = _props5.actions; | ||
@@ -247,5 +247,5 @@ if (player.paused) { | ||
value: function handlePause() { | ||
var _props6 = this.props; | ||
var player = _props6.player; | ||
var actions = _props6.actions; | ||
var _props6 = this.props, | ||
player = _props6.player, | ||
actions = _props6.actions; | ||
@@ -262,6 +262,6 @@ if (!player.paused) { | ||
value: function handleFirstPlay() { | ||
var _props7 = this.props; | ||
var player = _props7.player; | ||
var starttime = _props7.starttime; | ||
var actions = _props7.actions; | ||
var _props7 = this.props, | ||
player = _props7.player, | ||
starttime = _props7.starttime, | ||
actions = _props7.actions; | ||
@@ -286,5 +286,5 @@ // If the first starttime attribute is specified | ||
value: function handleDurationChange() { | ||
var _props8 = this.props; | ||
var player = _props8.player; | ||
var actions = _props8.actions; | ||
var _props8 = this.props, | ||
player = _props8.player, | ||
actions = _props8.actions; | ||
@@ -313,6 +313,6 @@ if (player.duration !== this.video.duration) { | ||
value: function handleEnded() { | ||
var _props9 = this.props; | ||
var loop = _props9.loop; | ||
var player = _props9.player; | ||
var actions = _props9.actions; | ||
var _props9 = this.props, | ||
loop = _props9.loop, | ||
player = _props9.player, | ||
actions = _props9.actions; | ||
@@ -335,5 +335,5 @@ if (loop) { | ||
value: function handleWaiting() { | ||
var _props10 = this.props; | ||
var player = _props10.player; | ||
var actions = _props10.actions; | ||
var _props10 = this.props, | ||
player = _props10.player, | ||
actions = _props10.actions; | ||
@@ -351,5 +351,5 @@ if (!player.waiting) { | ||
value: function handleSeeking() { | ||
var _props11 = this.props; | ||
var player = _props11.player; | ||
var actions = _props11.actions; | ||
var _props11 = this.props, | ||
player = _props11.player, | ||
actions = _props11.actions; | ||
@@ -367,5 +367,5 @@ if (!player.seeking) { | ||
value: function handleSeeked() { | ||
var _props12 = this.props; | ||
var player = _props12.player; | ||
var actions = _props12.actions; | ||
var _props12 = this.props, | ||
player = _props12.player, | ||
actions = _props12.actions; | ||
@@ -433,5 +433,5 @@ if (player.seeking) { | ||
value: function handleTimeUpdate() { | ||
var _props13 = this.props; | ||
var player = _props13.player; | ||
var actions = _props13.actions; | ||
var _props13 = this.props, | ||
player = _props13.player, | ||
actions = _props13.actions; | ||
@@ -450,5 +450,5 @@ if (player.currentTime !== this.video.currentTime) { | ||
value: function handleRateChange() { | ||
var _props14 = this.props; | ||
var player = _props14.player; | ||
var actions = _props14.actions; | ||
var _props14 = this.props, | ||
player = _props14.player, | ||
actions = _props14.actions; | ||
@@ -465,5 +465,5 @@ if (player.playbackRate !== this.video.playbackRate) { | ||
value: function handleVolumeChange() { | ||
var _props15 = this.props; | ||
var player = _props15.player; | ||
var actions = _props15.actions; | ||
var _props15 = this.props, | ||
player = _props15.player, | ||
actions = _props15.actions; | ||
@@ -505,3 +505,2 @@ if (player.volume !== this.video.volume) { | ||
}, | ||
controls: true, | ||
style: { | ||
@@ -508,0 +507,0 @@ width: '100%', |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.Video = exports.Player = undefined; | ||
exports.MouseTimeDisplay = exports.LoadProgressBar = exports.PlayProgressBar = exports.Slider = exports.SeekBar = exports.ProgressControl = exports.FullscreenToggle = exports.ReplayControl = exports.ForwardControl = exports.PlayToggle = exports.ControlBar = exports.PosterImage = exports.LoadingSpinner = exports.BigPlayButton = exports.Video = exports.Player = undefined; | ||
@@ -17,5 +17,75 @@ var _Player = require('./components/Player'); | ||
var _BigPlayButton = require('./components/BigPlayButton'); | ||
var _BigPlayButton2 = _interopRequireDefault(_BigPlayButton); | ||
var _LoadingSpinner = require('./components/LoadingSpinner'); | ||
var _LoadingSpinner2 = _interopRequireDefault(_LoadingSpinner); | ||
var _PosterImage = require('./components/PosterImage'); | ||
var _PosterImage2 = _interopRequireDefault(_PosterImage); | ||
var _Slider = require('./components/Slider'); | ||
var _Slider2 = _interopRequireDefault(_Slider); | ||
var _ControlBar = require('./components/control-bar/ControlBar'); | ||
var _ControlBar2 = _interopRequireDefault(_ControlBar); | ||
var _PlayToggle = require('./components/control-bar/PlayToggle'); | ||
var _PlayToggle2 = _interopRequireDefault(_PlayToggle); | ||
var _ForwardControl = require('./components/control-bar/ForwardControl'); | ||
var _ForwardControl2 = _interopRequireDefault(_ForwardControl); | ||
var _ReplayControl = require('./components/control-bar/ReplayControl'); | ||
var _ReplayControl2 = _interopRequireDefault(_ReplayControl); | ||
var _FullscreenToggle = require('./components/control-bar/FullscreenToggle'); | ||
var _FullscreenToggle2 = _interopRequireDefault(_FullscreenToggle); | ||
var _ProgressControl = require('./components/control-bar/ProgressControl'); | ||
var _ProgressControl2 = _interopRequireDefault(_ProgressControl); | ||
var _SeekBar = require('./components/control-bar/SeekBar'); | ||
var _SeekBar2 = _interopRequireDefault(_SeekBar); | ||
var _PlayProgressBar = require('./components/control-bar/PlayProgressBar'); | ||
var _PlayProgressBar2 = _interopRequireDefault(_PlayProgressBar); | ||
var _LoadProgressBar = require('./components/control-bar/LoadProgressBar'); | ||
var _LoadProgressBar2 = _interopRequireDefault(_LoadProgressBar); | ||
var _MouseTimeDisplay = require('./components/control-bar/MouseTimeDisplay'); | ||
var _MouseTimeDisplay2 = _interopRequireDefault(_MouseTimeDisplay); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.Player = _Player2.default; | ||
exports.Video = _Video2.default; | ||
exports.Video = _Video2.default; | ||
exports.BigPlayButton = _BigPlayButton2.default; | ||
exports.LoadingSpinner = _LoadingSpinner2.default; | ||
exports.PosterImage = _PosterImage2.default; | ||
exports.ControlBar = _ControlBar2.default; | ||
exports.PlayToggle = _PlayToggle2.default; | ||
exports.ForwardControl = _ForwardControl2.default; | ||
exports.ReplayControl = _ReplayControl2.default; | ||
exports.FullscreenToggle = _FullscreenToggle2.default; | ||
exports.ProgressControl = _ProgressControl2.default; | ||
exports.SeekBar = _SeekBar2.default; | ||
exports.Slider = _Slider2.default; | ||
exports.PlayProgressBar = _PlayProgressBar2.default; | ||
exports.LoadProgressBar = _LoadProgressBar2.default; | ||
exports.MouseTimeDisplay = _MouseTimeDisplay2.default; |
{ | ||
"name": "video-react", | ||
"version": "0.0.2", | ||
"version": "0.1.1", | ||
"description": "Video-React is a web video player built from the ground up for an HTML5 world using React library.", | ||
@@ -52,3 +52,4 @@ "main": "lib/index.js", | ||
"classnames": "^2.2.3", | ||
"lodash.throttle": "^4.1.1" | ||
"lodash.throttle": "^4.1.1", | ||
"sinon": "^1.17.6" | ||
}, | ||
@@ -100,2 +101,3 @@ "peerDependencies": { | ||
"reactstrap": "^3.6.0", | ||
"sinon": "^1.17.6", | ||
"static-site-generator-webpack-plugin": "^2.0.1", | ||
@@ -102,0 +104,0 @@ "style-loader": "^0.13.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
612076
31
5534
2
5
46
+ Addedsinon@^1.17.6
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedformatio@1.1.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arguments@1.1.1(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedlolex@1.3.2(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedsamsam@1.1.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsinon@1.17.7(transitive)
+ Addedutil@0.12.5(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)