@@ -185,16 +185,14 @@ return /******/ (function(modules) { // webpackBootstrap
185
185
componentWillMount : function componentWillMount ( ) {
186
186
var _this = this ;
187
187
188
- // Also bind 'this' as we call _updateStateFromVideo outside
189
- // of Reacts synthetic events as well.
190
- this . _updateStateFromVideo = ( 0 , _lodashThrottle2 [ 'default' ] ) ( this . updateStateFromVideo , 100 ) . bind ( this ) ;
188
+ this . _updateStateFromVideo = ( 0 , _lodashThrottle2 [ 'default' ] ) ( this . updateStateFromVideo , 100 ) ;
191
189
// Set up all React media events and call method
192
190
// on props if provided.
193
191
this . mediaEventProps = EVENTS . reduce ( function ( p , c ) {
194
- p [ c ] = function ( ) {
192
+ p [ c ] = function ( e ) {
195
193
if ( c in _this . props && typeof _this . props [ c ] === 'function' ) {
196
194
// A prop exists for this mediaEvent, call it.
197
- _this . props [ c ] ( ) ;
195
+ _this . props [ c ] ( e ) ;
198
196
}
199
197
_this . _updateStateFromVideo ( ) ;
200
198
} ;
@@ -219,6 +217,10 @@ return /******/ (function(modules) { // webpackBootstrap
219
217
componentWillUnmount : function componentWillUnmount ( ) {
220
218
// Remove event listener from video.
221
219
this . videoEl . children [ this . videoEl . children . length - 1 ] . removeEventListener ( 'error' , this . _updateStateFromVideo ) ;
220
+ // Cancel the throttled function from being called once
221
+ // the video has been unmounted.
222
+ // https://github.com/mderrick/react-html5video/issues/35
223
+ this . _updateStateFromVideo . cancel ( ) ;
222
224
} ,
223
225
224
226
/**
@@ -663,7 +665,7 @@ return /******/ (function(modules) { // webpackBootstrap
663
665
/* 29 */
664
666
/***/ function ( module , exports ) {
665
667
666
- var core = module . exports = { version : '2.2.2 ' } ;
668
+ var core = module . exports = { version : '2.4.0 ' } ;
667
669
if ( typeof __e == 'number' ) __e = core ; // eslint-disable-line no-undef
668
670
669
671
/***/ } ,
@@ -756,8 +758,8 @@ return /******/ (function(modules) { // webpackBootstrap
756
758
/* 36 */
757
759
/***/ function ( module , exports , __webpack_require__ ) {
758
760
759
- module . exports = ! __webpack_require__ ( 37 ) && ! __webpack_require__ ( 38 ) ( function ( ) {
760
- return Object . defineProperty ( __webpack_require__ ( 39 ) ( 'div' ) , 'a' , { get : function ( ) { return 7 ; } } ) . a != 7 ;
761
+ module . exports = ! __webpack_require__ ( 37 ) && ! __webpack_require__ ( 38 ) ( function ( ) {
762
+ return Object . defineProperty ( __webpack_require__ ( 39 ) ( 'div' ) , 'a' , { get : function ( ) { return 7 ; } } ) . a != 7 ;
761
763
} ) ;
762
764
763
765
/***/ } ,
@@ -865,34 +867,34 @@ return /******/ (function(modules) { // webpackBootstrap
865
867
/* 43 */
866
868
/***/ function ( module , exports , __webpack_require__ ) {
867
869
868
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
869
- var $keys = __webpack_require__ ( 44 )
870
- , enumBugKeys = __webpack_require__ ( 57 ) ;
871
-
872
- module . exports = Object . keys || function keys ( O ) {
873
- return $keys ( O , enumBugKeys ) ;
870
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
871
+ var $keys = __webpack_require__ ( 44 )
872
+ , enumBugKeys = __webpack_require__ ( 57 ) ;
873
+
874
+ module . exports = Object . keys || function keys ( O ) {
875
+ return $keys ( O , enumBugKeys ) ;
874
876
} ;
875
877
876
878
/***/ } ,
877
879
/* 44 */
878
880
/***/ function ( module , exports , __webpack_require__ ) {
879
881
880
- var has = __webpack_require__ ( 45 )
881
- , toIObject = __webpack_require__ ( 46 )
882
- , arrayIndexOf = __webpack_require__ ( 50 ) ( false )
883
- , IE_PROTO = __webpack_require__ ( 54 ) ( 'IE_PROTO' ) ;
884
-
885
- module . exports = function ( object , names ) {
886
- var O = toIObject ( object )
887
- , i = 0
888
- , result = [ ]
889
- , key ;
890
- for ( key in O ) if ( key != IE_PROTO ) has ( O , key ) && result . push ( key ) ;
891
- // Don't enum bug & hidden keys
892
- while ( names . length > i ) if ( has ( O , key = names [ i ++ ] ) ) {
893
- ~ arrayIndexOf ( result , key ) || result . push ( key ) ;
894
- }
895
- return result ;
882
+ var has = __webpack_require__ ( 45 )
883
+ , toIObject = __webpack_require__ ( 46 )
884
+ , arrayIndexOf = __webpack_require__ ( 50 ) ( false )
885
+ , IE_PROTO = __webpack_require__ ( 54 ) ( 'IE_PROTO' ) ;
886
+
887
+ module . exports = function ( object , names ) {
888
+ var O = toIObject ( object )
889
+ , i = 0
890
+ , result = [ ]
891
+ , key ;
892
+ for ( key in O ) if ( key != IE_PROTO ) has ( O , key ) && result . push ( key ) ;
893
+ // Don't enum bug & hidden keys
894
+ while ( names . length > i ) if ( has ( O , key = names [ i ++ ] ) ) {
895
+ ~ arrayIndexOf ( result , key ) || result . push ( key ) ;
896
+ }
897
+ return result ;
896
898
} ;
897
899
898
900
/***/ } ,
@@ -1009,10 +1011,10 @@ return /******/ (function(modules) { // webpackBootstrap
1009
1011
/* 54 */
1010
1012
/***/ function ( module , exports , __webpack_require__ ) {
1011
1013
1012
- var shared = __webpack_require__ ( 55 ) ( 'keys' )
1013
- , uid = __webpack_require__ ( 56 ) ;
1014
- module . exports = function ( key ) {
1015
- return shared [ key ] || ( shared [ key ] = uid ( key ) ) ;
1014
+ var shared = __webpack_require__ ( 55 ) ( 'keys' )
1015
+ , uid = __webpack_require__ ( 56 ) ;
1016
+ module . exports = function ( key ) {
1017
+ return shared [ key ] || ( shared [ key ] = uid ( key ) ) ;
1016
1018
} ;
1017
1019
1018
1020
/***/ } ,
@@ -1040,9 +1042,9 @@ return /******/ (function(modules) { // webpackBootstrap
1040
1042
/* 57 */
1041
1043
/***/ function ( module , exports ) {
1042
1044
1043
- // IE 8- don't enum bug keys
1044
- module . exports = (
1045
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
1045
+ // IE 8- don't enum bug keys
1046
+ module . exports = (
1047
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
1046
1048
) . split ( ',' ) ;
1047
1049
1048
1050
/***/ } ,
@@ -1617,8 +1619,8 @@ return /******/ (function(modules) { // webpackBootstrap
1617
1619
/* 75 */
1618
1620
/***/ function ( module , exports , __webpack_require__ ) {
1619
1621
1620
- var $export = __webpack_require__ ( 27 ) ;
1621
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
1622
+ var $export = __webpack_require__ ( 27 ) ;
1623
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
1622
1624
$export ( $export . S + $export . F * ! __webpack_require__ ( 37 ) , 'Object' , { defineProperty : __webpack_require__ ( 33 ) . f } ) ;
1623
1625
1624
1626
/***/ } ,
0 commit comments