Skip to content

Commit

Permalink
[build] 0.2.2
Browse files Browse the repository at this point in the history
What:
Why:
How:
  • Loading branch information
toxic-johann committed Jul 31, 2017
1 parent 2f48bcc commit cf8a224
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion bundle-size/common.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle-size/es.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle-size/min.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle-size/umd.html

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions lib/index.browser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* chimee v0.2.1
* chimee v0.2.2
* (c) 2017 toxic-johann
* Released under MIT
*/
Expand Down Expand Up @@ -6481,7 +6481,7 @@ function accessorVideoAttribute(attribute) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value ? '' : undefined : value;
var val = isBoolean$$1 ? value ? '' : undefined : value === null ? undefined : value;
this.dom.setAttr('video', _set, val);
return value;
}
Expand All @@ -6496,7 +6496,7 @@ function accessorCustomAttribute(attribute, isBoolean$$1) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value || undefined : value;
var val = isBoolean$$1 ? value || undefined : value === null ? undefined : value;
this.dom.setAttr('video', attribute, val);
return value;
}
Expand Down Expand Up @@ -7261,7 +7261,7 @@ var Plugin = (_dec$2 = autobindClass(), _dec$2(_class$2 = function (_VideoWrappe
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));

_this.destroyed = false;
_this.VERSION = '0.2.1';
_this.VERSION = '0.2.2';
_this.__operable = true;
_this.__level = 0;

Expand Down Expand Up @@ -8308,10 +8308,10 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
var currentTime = _this2.kernel.currentTime;
if (bias <= 0 && currentTime >= idealTime || bias > 0 && (Math.abs(idealTime - currentTime) <= bias && newVideoReady || currentTime - idealTime > bias)) {
removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
removeEvent(video, 'error', videoError, true);
if (!newVideoReady) {
removeEvent(video, 'canplay', videoCanplay);
removeEvent(video, 'loadedmetadata', videoLoadedmetadata);
removeEvent(video, 'error', videoError);
removeEvent(video, 'canplay', videoCanplay, true);
removeEvent(video, 'loadedmetadata', videoLoadedmetadata, true);
kernel.destroy();
return resolve();
}
Expand All @@ -8326,6 +8326,8 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
newVideoReady = true;
// you can set it immediately run by yourself
if (option.immediate) {
removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
removeEvent(video, 'error', videoError, true);
return reject({
error: false,
video: video,
Expand Down Expand Up @@ -8411,7 +8413,6 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
config = _ref.config;

var oldKernel = this.kernel;
oldKernel.destroy();
var originVideoConfig = deepClone(this.videoConfig);
this.dom.removeVideo();
this.dom.installVideo(video);
Expand Down Expand Up @@ -8446,6 +8447,7 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
// })
// }, {self: true});
this.kernel = kernel;
oldKernel.destroy();
}
/**
* destroy function called when dispatcher destroyed
Expand Down Expand Up @@ -8808,7 +8810,7 @@ var Chimee = (_dec = autobindClass(), _dec(_class = (_class2 = (_temp = _class3
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'version', [frozen], {
enumerable: true,
initializer: function initializer() {
return '0.2.1';
return '0.2.2';
}
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'config', [frozen], {
enumerable: true,
Expand Down
20 changes: 11 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* chimee v0.2.1
* chimee v0.2.2
* (c) 2017 toxic-johann
* Released under MIT
*/
Expand Down Expand Up @@ -587,7 +587,7 @@ function accessorVideoAttribute(attribute) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value ? '' : undefined : value;
var val = isBoolean$$1 ? value ? '' : undefined : value === null ? undefined : value;
this.dom.setAttr('video', _set, val);
return value;
}
Expand All @@ -602,7 +602,7 @@ function accessorCustomAttribute(attribute, isBoolean$$1) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value || undefined : value;
var val = isBoolean$$1 ? value || undefined : value === null ? undefined : value;
this.dom.setAttr('video', attribute, val);
return value;
}
Expand Down Expand Up @@ -1367,7 +1367,7 @@ var Plugin = (_dec$2 = toxicDecorators.autobindClass(), _dec$2(_class$2 = functi
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));

_this.destroyed = false;
_this.VERSION = '0.2.1';
_this.VERSION = '0.2.2';
_this.__operable = true;
_this.__level = 0;

Expand Down Expand Up @@ -2414,10 +2414,10 @@ var Dispatcher = (_dec$1 = toxicDecorators.before(convertNameIntoId), _dec2 = to
var currentTime = _this2.kernel.currentTime;
if (bias <= 0 && currentTime >= idealTime || bias > 0 && (Math.abs(idealTime - currentTime) <= bias && newVideoReady || currentTime - idealTime > bias)) {
chimeeHelper.removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
chimeeHelper.removeEvent(video, 'error', videoError, true);
if (!newVideoReady) {
chimeeHelper.removeEvent(video, 'canplay', videoCanplay);
chimeeHelper.removeEvent(video, 'loadedmetadata', videoLoadedmetadata);
chimeeHelper.removeEvent(video, 'error', videoError);
chimeeHelper.removeEvent(video, 'canplay', videoCanplay, true);
chimeeHelper.removeEvent(video, 'loadedmetadata', videoLoadedmetadata, true);
kernel.destroy();
return resolve();
}
Expand All @@ -2432,6 +2432,8 @@ var Dispatcher = (_dec$1 = toxicDecorators.before(convertNameIntoId), _dec2 = to
newVideoReady = true;
// you can set it immediately run by yourself
if (option.immediate) {
chimeeHelper.removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
chimeeHelper.removeEvent(video, 'error', videoError, true);
return reject({
error: false,
video: video,
Expand Down Expand Up @@ -2517,7 +2519,6 @@ var Dispatcher = (_dec$1 = toxicDecorators.before(convertNameIntoId), _dec2 = to
config = _ref.config;

var oldKernel = this.kernel;
oldKernel.destroy();
var originVideoConfig = chimeeHelper.deepClone(this.videoConfig);
this.dom.removeVideo();
this.dom.installVideo(video);
Expand Down Expand Up @@ -2552,6 +2553,7 @@ var Dispatcher = (_dec$1 = toxicDecorators.before(convertNameIntoId), _dec2 = to
// })
// }, {self: true});
this.kernel = kernel;
oldKernel.destroy();
}
/**
* destroy function called when dispatcher destroyed
Expand Down Expand Up @@ -2914,7 +2916,7 @@ var Chimee = (_dec = toxicDecorators.autobindClass(), _dec(_class = (_class2 = (
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'version', [toxicDecorators.frozen], {
enumerable: true,
initializer: function initializer() {
return '0.2.1';
return '0.2.2';
}
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'config', [toxicDecorators.frozen], {
enumerable: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/index.min.js

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions lib/index.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* chimee v0.2.1
* chimee v0.2.2
* (c) 2017 toxic-johann
* Released under MIT
*/
Expand Down Expand Up @@ -583,7 +583,7 @@ function accessorVideoAttribute(attribute) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value ? '' : undefined : value;
var val = isBoolean$$1 ? value ? '' : undefined : value === null ? undefined : value;
this.dom.setAttr('video', _set, val);
return value;
}
Expand All @@ -598,7 +598,7 @@ function accessorCustomAttribute(attribute, isBoolean$$1) {
},
set: function set(value) {
if (!this.dispatcher.videoConfigReady) return value;
var val = isBoolean$$1 ? value || undefined : value;
var val = isBoolean$$1 ? value || undefined : value === null ? undefined : value;
this.dom.setAttr('video', attribute, val);
return value;
}
Expand Down Expand Up @@ -1363,7 +1363,7 @@ var Plugin = (_dec$2 = autobindClass(), _dec$2(_class$2 = function (_VideoWrappe
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));

_this.destroyed = false;
_this.VERSION = '0.2.1';
_this.VERSION = '0.2.2';
_this.__operable = true;
_this.__level = 0;

Expand Down Expand Up @@ -2410,10 +2410,10 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
var currentTime = _this2.kernel.currentTime;
if (bias <= 0 && currentTime >= idealTime || bias > 0 && (Math.abs(idealTime - currentTime) <= bias && newVideoReady || currentTime - idealTime > bias)) {
removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
removeEvent(video, 'error', videoError, true);
if (!newVideoReady) {
removeEvent(video, 'canplay', videoCanplay);
removeEvent(video, 'loadedmetadata', videoLoadedmetadata);
removeEvent(video, 'error', videoError);
removeEvent(video, 'canplay', videoCanplay, true);
removeEvent(video, 'loadedmetadata', videoLoadedmetadata, true);
kernel.destroy();
return resolve();
}
Expand All @@ -2428,6 +2428,8 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
newVideoReady = true;
// you can set it immediately run by yourself
if (option.immediate) {
removeEvent(_this2.dom.videoElement, 'timeupdate', oldVideoTimeupdate);
removeEvent(video, 'error', videoError, true);
return reject({
error: false,
video: video,
Expand Down Expand Up @@ -2513,7 +2515,6 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
config = _ref.config;

var oldKernel = this.kernel;
oldKernel.destroy();
var originVideoConfig = deepClone(this.videoConfig);
this.dom.removeVideo();
this.dom.installVideo(video);
Expand Down Expand Up @@ -2548,6 +2549,7 @@ var Dispatcher = (_dec$1 = before(convertNameIntoId), _dec2 = before(checkPlugin
// })
// }, {self: true});
this.kernel = kernel;
oldKernel.destroy();
}
/**
* destroy function called when dispatcher destroyed
Expand Down Expand Up @@ -2910,7 +2912,7 @@ var Chimee = (_dec = autobindClass(), _dec(_class = (_class2 = (_temp = _class3
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'version', [frozen], {
enumerable: true,
initializer: function initializer() {
return '0.2.1';
return '0.2.2';
}
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'config', [frozen], {
enumerable: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chimee",
"version": "0.2.1",
"version": "0.2.2",
"description": "a video-player aims to bing wonderful experience on browser",
"main": "lib/index.js",
"module": "lib/index.mjs",
Expand Down

0 comments on commit cf8a224

Please sign in to comment.