Skip to content

Commit 8ec4062

Browse files
committed
build: 0.10.1
1 parent cb88a0d commit 8ec4062

File tree

9 files changed

+17158
-84
lines changed

9 files changed

+17158
-84
lines changed

bundle-size/common.html

Lines changed: 4262 additions & 4 deletions
Large diffs are not rendered by default.

bundle-size/es.html

Lines changed: 4262 additions & 4 deletions
Large diffs are not rendered by default.

bundle-size/min.html

Lines changed: 4262 additions & 4 deletions
Large diffs are not rendered by default.

bundle-size/umd.html

Lines changed: 4262 additions & 4 deletions
Large diffs are not rendered by default.

lib/index.browser.js

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* chimee v0.10.0
3+
* chimee v0.10.1
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -7734,7 +7734,7 @@
77347734
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
77357735

77367736
_this.destroyed = false;
7737-
_this.VERSION = '0.10.0';
7737+
_this.VERSION = '0.10.1';
77387738
_this.__operable = true;
77397739
_this.__level = 0;
77407740

@@ -7881,10 +7881,6 @@
78817881
value: function __inited() {
78827882
var _this2 = this;
78837883

7884-
if (this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id]) {
7885-
this.__dispatcher.binder.applyPendingEvents('video-dom');
7886-
this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id] = false;
7887-
}
78887884
var result = void 0;
78897885
try {
78907886
result = isFunction(this.inited) && this.inited();
@@ -9559,7 +9555,6 @@
95599555
this.bindedEventNames = {};
95609556
this.bindedEventInfo = {};
95619557
this.pendingEventsInfo = {};
9562-
this.needToCheckPendingVideoDomEventPlugins = {};
95639558
var _iteratorNormalCompletion = true;
95649559
var _didIteratorError = false;
95659560
var _iteratorError = undefined;
@@ -10137,6 +10132,20 @@
1013710132
*/
1013810133
this.kernel = this._createKernel(this.dom.videoElement, this.videoConfig);
1013910134
this.binder.applyPendingEvents('kernel');
10135+
if (config.noDefaultContextMenu) {
10136+
var noDefaultContextMenu = config.noDefaultContextMenu;
10137+
10138+
var target = noDefaultContextMenu === 'container' || noDefaultContextMenu === 'wrapper' ? noDefaultContextMenu : 'video-dom';
10139+
this.binder.on({
10140+
target: target,
10141+
id: '_vm',
10142+
name: 'contextmenu',
10143+
fn: function fn(evt) {
10144+
return evt.preventDefault();
10145+
},
10146+
stage: 'main'
10147+
});
10148+
}
1014010149
// trigger auto load event
1014110150
var asyncInitedTasks = [];
1014210151
this.order.forEach(function (key) {
@@ -10149,22 +10158,10 @@
1014910158
// tell them we have inited the whold player
1015010159
this.ready = this.readySync ? _Promise.resolve() : _Promise.all(asyncInitedTasks).then(function () {
1015110160
_this.readySync = true;
10152-
_this.binder.trigger({
10153-
target: 'plugin',
10154-
name: 'ready',
10155-
id: 'dispatcher'
10156-
});
10157-
_this._autoloadVideoSrcAtFirst();
10161+
_this.onReady();
1015810162
});
10159-
if (this.readySync) this._autoloadVideoSrcAtFirst();
10163+
if (this.readySync) this.onReady();
1016010164
}
10161-
10162-
/**
10163-
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
10164-
* @param {Object|string} option you can just set a plugin name or plugin config
10165-
* @return {Promise}
10166-
*/
10167-
1016810165
// to save the kernel event handler, so that we can remove it when we destroy the kernel
1016910166

1017010167
/**
@@ -10181,6 +10178,23 @@
1018110178

1018210179

1018310180
_createClass(Dispatcher, [{
10181+
key: 'onReady',
10182+
value: function onReady() {
10183+
this.binder.trigger({
10184+
target: 'plugin',
10185+
name: 'ready',
10186+
id: 'dispatcher'
10187+
});
10188+
this._autoloadVideoSrcAtFirst();
10189+
}
10190+
10191+
/**
10192+
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
10193+
* @param {Object|string} option you can just set a plugin name or plugin config
10194+
* @return {Promise}
10195+
*/
10196+
10197+
}, {
1018410198
key: 'use',
1018510199
value: function use(option) {
1018610200
if (isString(option)) option = { name: option, alias: undefined };
@@ -11225,7 +11239,7 @@
1122511239
}), _descriptor2$1 = _applyDecoratedDescriptor$8(_class2$2.prototype, 'version', [frozen], {
1122611240
enumerable: true,
1122711241
initializer: function initializer() {
11228-
return '0.10.0';
11242+
return '0.10.1';
1122911243
}
1123011244
}), _descriptor3$1 = _applyDecoratedDescriptor$8(_class2$2.prototype, 'config', [frozen], {
1123111245
enumerable: true,

lib/index.js

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* chimee v0.10.0
3+
* chimee v0.10.1
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -1296,7 +1296,7 @@ var Plugin = (_dec$2 = toxicDecorators.autobindClass(), _dec$2(_class$2 = functi
12961296
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
12971297

12981298
_this.destroyed = false;
1299-
_this.VERSION = '0.10.0';
1299+
_this.VERSION = '0.10.1';
13001300
_this.__operable = true;
13011301
_this.__level = 0;
13021302

@@ -1443,10 +1443,6 @@ var Plugin = (_dec$2 = toxicDecorators.autobindClass(), _dec$2(_class$2 = functi
14431443
value: function __inited() {
14441444
var _this2 = this;
14451445

1446-
if (this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id]) {
1447-
this.__dispatcher.binder.applyPendingEvents('video-dom');
1448-
this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id] = false;
1449-
}
14501446
var result = void 0;
14511447
try {
14521448
result = chimeeHelper.isFunction(this.inited) && this.inited();
@@ -2625,7 +2621,6 @@ var Binder = (_dec$5 = toxicDecorators.before(prettifyEventParameter), _dec2$4 =
26252621
this.bindedEventNames = {};
26262622
this.bindedEventInfo = {};
26272623
this.pendingEventsInfo = {};
2628-
this.needToCheckPendingVideoDomEventPlugins = {};
26292624
var _iteratorNormalCompletion = true;
26302625
var _didIteratorError = false;
26312626
var _iteratorError = undefined;
@@ -3203,6 +3198,20 @@ var Dispatcher = (_dec$6 = toxicDecorators.before(convertNameIntoId), _dec2$5 =
32033198
*/
32043199
this.kernel = this._createKernel(this.dom.videoElement, this.videoConfig);
32053200
this.binder.applyPendingEvents('kernel');
3201+
if (config.noDefaultContextMenu) {
3202+
var noDefaultContextMenu = config.noDefaultContextMenu;
3203+
3204+
var target = noDefaultContextMenu === 'container' || noDefaultContextMenu === 'wrapper' ? noDefaultContextMenu : 'video-dom';
3205+
this.binder.on({
3206+
target: target,
3207+
id: '_vm',
3208+
name: 'contextmenu',
3209+
fn: function fn(evt) {
3210+
return evt.preventDefault();
3211+
},
3212+
stage: 'main'
3213+
});
3214+
}
32063215
// trigger auto load event
32073216
var asyncInitedTasks = [];
32083217
this.order.forEach(function (key) {
@@ -3215,22 +3224,10 @@ var Dispatcher = (_dec$6 = toxicDecorators.before(convertNameIntoId), _dec2$5 =
32153224
// tell them we have inited the whold player
32163225
this.ready = this.readySync ? _Promise.resolve() : _Promise.all(asyncInitedTasks).then(function () {
32173226
_this.readySync = true;
3218-
_this.binder.trigger({
3219-
target: 'plugin',
3220-
name: 'ready',
3221-
id: 'dispatcher'
3222-
});
3223-
_this._autoloadVideoSrcAtFirst();
3227+
_this.onReady();
32243228
});
3225-
if (this.readySync) this._autoloadVideoSrcAtFirst();
3229+
if (this.readySync) this.onReady();
32263230
}
3227-
3228-
/**
3229-
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
3230-
* @param {Object|string} option you can just set a plugin name or plugin config
3231-
* @return {Promise}
3232-
*/
3233-
32343231
// to save the kernel event handler, so that we can remove it when we destroy the kernel
32353232

32363233
/**
@@ -3247,6 +3244,23 @@ var Dispatcher = (_dec$6 = toxicDecorators.before(convertNameIntoId), _dec2$5 =
32473244

32483245

32493246
_createClass(Dispatcher, [{
3247+
key: 'onReady',
3248+
value: function onReady() {
3249+
this.binder.trigger({
3250+
target: 'plugin',
3251+
name: 'ready',
3252+
id: 'dispatcher'
3253+
});
3254+
this._autoloadVideoSrcAtFirst();
3255+
}
3256+
3257+
/**
3258+
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
3259+
* @param {Object|string} option you can just set a plugin name or plugin config
3260+
* @return {Promise}
3261+
*/
3262+
3263+
}, {
32503264
key: 'use',
32513265
value: function use(option) {
32523266
if (chimeeHelper.isString(option)) option = { name: option, alias: undefined };
@@ -4082,7 +4096,7 @@ var Chimee = (_dec$7 = toxicDecorators.autobindClass(), _dec$7(_class$8 = (_clas
40824096
}), _descriptor2$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'version', [toxicDecorators.frozen], {
40834097
enumerable: true,
40844098
initializer: function initializer() {
4085-
return '0.10.0';
4099+
return '0.10.1';
40864100
}
40874101
}), _descriptor3$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'config', [toxicDecorators.frozen], {
40884102
enumerable: true,

lib/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.mjs

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* chimee v0.10.0
3+
* chimee v0.10.1
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -1292,7 +1292,7 @@ var Plugin = (_dec$2 = autobindClass(), _dec$2(_class$2 = function (_VideoWrappe
12921292
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
12931293

12941294
_this.destroyed = false;
1295-
_this.VERSION = '0.10.0';
1295+
_this.VERSION = '0.10.1';
12961296
_this.__operable = true;
12971297
_this.__level = 0;
12981298

@@ -1439,10 +1439,6 @@ var Plugin = (_dec$2 = autobindClass(), _dec$2(_class$2 = function (_VideoWrappe
14391439
value: function __inited() {
14401440
var _this2 = this;
14411441

1442-
if (this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id]) {
1443-
this.__dispatcher.binder.applyPendingEvents('video-dom');
1444-
this.__dispatcher.binder.needToCheckPendingVideoDomEventPlugins[this.__id] = false;
1445-
}
14461442
var result = void 0;
14471443
try {
14481444
result = isFunction(this.inited) && this.inited();
@@ -2621,7 +2617,6 @@ var Binder = (_dec$5 = before(prettifyEventParameter), _dec2$4 = before(prettify
26212617
this.bindedEventNames = {};
26222618
this.bindedEventInfo = {};
26232619
this.pendingEventsInfo = {};
2624-
this.needToCheckPendingVideoDomEventPlugins = {};
26252620
var _iteratorNormalCompletion = true;
26262621
var _didIteratorError = false;
26272622
var _iteratorError = undefined;
@@ -3199,6 +3194,20 @@ var Dispatcher = (_dec$6 = before(convertNameIntoId), _dec2$5 = before(checkPlug
31993194
*/
32003195
this.kernel = this._createKernel(this.dom.videoElement, this.videoConfig);
32013196
this.binder.applyPendingEvents('kernel');
3197+
if (config.noDefaultContextMenu) {
3198+
var noDefaultContextMenu = config.noDefaultContextMenu;
3199+
3200+
var target = noDefaultContextMenu === 'container' || noDefaultContextMenu === 'wrapper' ? noDefaultContextMenu : 'video-dom';
3201+
this.binder.on({
3202+
target: target,
3203+
id: '_vm',
3204+
name: 'contextmenu',
3205+
fn: function fn(evt) {
3206+
return evt.preventDefault();
3207+
},
3208+
stage: 'main'
3209+
});
3210+
}
32023211
// trigger auto load event
32033212
var asyncInitedTasks = [];
32043213
this.order.forEach(function (key) {
@@ -3211,22 +3220,10 @@ var Dispatcher = (_dec$6 = before(convertNameIntoId), _dec2$5 = before(checkPlug
32113220
// tell them we have inited the whold player
32123221
this.ready = this.readySync ? _Promise.resolve() : _Promise.all(asyncInitedTasks).then(function () {
32133222
_this.readySync = true;
3214-
_this.binder.trigger({
3215-
target: 'plugin',
3216-
name: 'ready',
3217-
id: 'dispatcher'
3218-
});
3219-
_this._autoloadVideoSrcAtFirst();
3223+
_this.onReady();
32203224
});
3221-
if (this.readySync) this._autoloadVideoSrcAtFirst();
3225+
if (this.readySync) this.onReady();
32223226
}
3223-
3224-
/**
3225-
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
3226-
* @param {Object|string} option you can just set a plugin name or plugin config
3227-
* @return {Promise}
3228-
*/
3229-
32303227
// to save the kernel event handler, so that we can remove it when we destroy the kernel
32313228

32323229
/**
@@ -3243,6 +3240,23 @@ var Dispatcher = (_dec$6 = before(convertNameIntoId), _dec2$5 = before(checkPlug
32433240

32443241

32453242
_createClass(Dispatcher, [{
3243+
key: 'onReady',
3244+
value: function onReady() {
3245+
this.binder.trigger({
3246+
target: 'plugin',
3247+
name: 'ready',
3248+
id: 'dispatcher'
3249+
});
3250+
this._autoloadVideoSrcAtFirst();
3251+
}
3252+
3253+
/**
3254+
* use a plugin, which means we will new a plugin instance and include int this Chimee instance
3255+
* @param {Object|string} option you can just set a plugin name or plugin config
3256+
* @return {Promise}
3257+
*/
3258+
3259+
}, {
32463260
key: 'use',
32473261
value: function use(option) {
32483262
if (isString(option)) option = { name: option, alias: undefined };
@@ -4078,7 +4092,7 @@ var Chimee = (_dec$7 = autobindClass(), _dec$7(_class$8 = (_class2$1 = (_temp =
40784092
}), _descriptor2$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'version', [frozen], {
40794093
enumerable: true,
40804094
initializer: function initializer() {
4081-
return '0.10.0';
4095+
return '0.10.1';
40824096
}
40834097
}), _descriptor3$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'config', [frozen], {
40844098
enumerable: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chimee",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "a video-player aims to bring wonderful experience on browser",
55
"main": "lib/index.js",
66
"module": "lib/index.mjs",

0 commit comments

Comments
 (0)