From 144334aeb21bbe5a8b8201fc1b5559105a41926c Mon Sep 17 00:00:00 2001 From: Matt Derrick Date: Sun, 31 Jul 2016 12:59:52 +0100 Subject: [PATCH] Deploy version 1.2.12 --- bower.json | 2 +- dist/ReactHtml5Video.js | 80 +++++++++++++++++++++-------------------- package.json | 2 +- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/bower.json b/bower.json index 6aa02eb..bd32c82 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-html5video", - "version": "1.2.11", + "version": "1.2.12", "homepage": "https://github.com/mderrick/react-html5video", "authors": [ "me@mattderrick.co.uk" diff --git a/dist/ReactHtml5Video.js b/dist/ReactHtml5Video.js index 3ccb19f..b34cdf5 100644 --- a/dist/ReactHtml5Video.js +++ b/dist/ReactHtml5Video.js @@ -185,16 +185,14 @@ return /******/ (function(modules) { // webpackBootstrap componentWillMount: function componentWillMount() { var _this = this; - // Also bind 'this' as we call _updateStateFromVideo outside - // of Reacts synthetic events as well. - this._updateStateFromVideo = (0, _lodashThrottle2['default'])(this.updateStateFromVideo, 100).bind(this); + this._updateStateFromVideo = (0, _lodashThrottle2['default'])(this.updateStateFromVideo, 100); // Set up all React media events and call method // on props if provided. this.mediaEventProps = EVENTS.reduce(function (p, c) { - p[c] = function () { + p[c] = function (e) { if (c in _this.props && typeof _this.props[c] === 'function') { // A prop exists for this mediaEvent, call it. - _this.props[c](); + _this.props[c](e); } _this._updateStateFromVideo(); }; @@ -219,6 +217,10 @@ return /******/ (function(modules) { // webpackBootstrap componentWillUnmount: function componentWillUnmount() { // Remove event listener from video. this.videoEl.children[this.videoEl.children.length - 1].removeEventListener('error', this._updateStateFromVideo); + // Cancel the throttled function from being called once + // the video has been unmounted. + // https://github.com/mderrick/react-html5video/issues/35 + this._updateStateFromVideo.cancel(); }, /** @@ -663,7 +665,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 29 */ /***/ function(module, exports) { - var core = module.exports = {version: '2.2.2'}; + var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, @@ -756,8 +758,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 36 */ /***/ function(module, exports, __webpack_require__) { - module.exports = !__webpack_require__(37) && !__webpack_require__(38)(function(){ - return Object.defineProperty(__webpack_require__(39)('div'), 'a', {get: function(){ return 7; }}).a != 7; + module.exports = !__webpack_require__(37) && !__webpack_require__(38)(function(){ + return Object.defineProperty(__webpack_require__(39)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, @@ -865,34 +867,34 @@ return /******/ (function(modules) { // webpackBootstrap /* 43 */ /***/ function(module, exports, __webpack_require__) { - // 19.1.2.14 / 15.2.3.14 Object.keys(O) - var $keys = __webpack_require__(44) - , enumBugKeys = __webpack_require__(57); - - module.exports = Object.keys || function keys(O){ - return $keys(O, enumBugKeys); + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(44) + , enumBugKeys = __webpack_require__(57); + + module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { - var has = __webpack_require__(45) - , toIObject = __webpack_require__(46) - , arrayIndexOf = __webpack_require__(50)(false) - , IE_PROTO = __webpack_require__(54)('IE_PROTO'); - - module.exports = function(object, names){ - var O = toIObject(object) - , i = 0 - , result = [] - , key; - for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while(names.length > i)if(has(O, key = names[i++])){ - ~arrayIndexOf(result, key) || result.push(key); - } - return result; + var has = __webpack_require__(45) + , toIObject = __webpack_require__(46) + , arrayIndexOf = __webpack_require__(50)(false) + , IE_PROTO = __webpack_require__(54)('IE_PROTO'); + + module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; }; /***/ }, @@ -1009,10 +1011,10 @@ return /******/ (function(modules) { // webpackBootstrap /* 54 */ /***/ function(module, exports, __webpack_require__) { - var shared = __webpack_require__(55)('keys') - , uid = __webpack_require__(56); - module.exports = function(key){ - return shared[key] || (shared[key] = uid(key)); + var shared = __webpack_require__(55)('keys') + , uid = __webpack_require__(56); + module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); }; /***/ }, @@ -1040,9 +1042,9 @@ return /******/ (function(modules) { // webpackBootstrap /* 57 */ /***/ function(module, exports) { - // IE 8- don't enum bug keys - module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, @@ -1617,8 +1619,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 75 */ /***/ function(module, exports, __webpack_require__) { - var $export = __webpack_require__(27); - // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + var $export = __webpack_require__(27); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(37), 'Object', {defineProperty: __webpack_require__(33).f}); /***/ }, diff --git a/package.json b/package.json index 9d63a93..5cbb50a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-html5video", - "version": "1.2.11", + "version": "1.2.12", "description": "", "main": "./dist/ReactHtml5Video.js", "scripts": {