Skip to content

Commit ec97387

Browse files
committed
build: 0.10.3
1 parent a1811df commit ec97387

File tree

9 files changed

+75
-78
lines changed

9 files changed

+75
-78
lines changed

bundle-size/common.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h1>RollUp Visualizer</h1>
137137
</div>
138138
</div>
139139
</div>
140-
<script>window.nodesData = {"name":"root","children":[{"name":"kernels","children":[{"name":"native.js","children":[],"size":2224,"originalSize":1489}]},{"name":"dispatcher","children":[{"name":"kernel.js","children":[],"size":5228,"originalSize":4443},{"name":"video-wrapper.js","children":[],"size":21963,"originalSize":14224},{"name":"plugin.js","children":[],"size":11500,"originalSize":9887},{"name":"dom.js","children":[],"size":16628,"originalSize":12359},{"name":"bus.js","children":[],"size":17943,"originalSize":13895},{"name":"binder.js","children":[],"size":21524,"originalSize":13863},{"name":"index.js","children":[],"size":31057,"originalSize":25308}]},{"name":"helper","children":[{"name":"const.js","children":[],"size":1568,"originalSize":1913},{"name":"checker.js","children":[],"size":821,"originalSize":838}]},{"name":"config","children":[{"name":"video.js","children":[],"size":12110,"originalSize":9141},{"name":"container.js","children":[],"size":111,"originalSize":99},{"name":"vessel.js","children":[],"size":1002,"originalSize":1106},{"name":"global.js","children":[],"size":2874,"originalSize":1500}]},{"name":"index.js","children":[],"size":9377,"originalSize":4185}]};</script>
140+
<script>window.nodesData = {"name":"root","children":[{"name":"kernels","children":[{"name":"native.js","children":[],"size":2224,"originalSize":1489}]},{"name":"dispatcher","children":[{"name":"kernel.js","children":[],"size":5141,"originalSize":4439},{"name":"video-wrapper.js","children":[],"size":21963,"originalSize":14224},{"name":"plugin.js","children":[],"size":11500,"originalSize":9887},{"name":"dom.js","children":[],"size":16628,"originalSize":12359},{"name":"bus.js","children":[],"size":17943,"originalSize":13895},{"name":"binder.js","children":[],"size":21524,"originalSize":13863},{"name":"index.js","children":[],"size":31152,"originalSize":25434}]},{"name":"helper","children":[{"name":"const.js","children":[],"size":1568,"originalSize":1913},{"name":"checker.js","children":[],"size":821,"originalSize":838}]},{"name":"config","children":[{"name":"video.js","children":[],"size":12110,"originalSize":9141},{"name":"container.js","children":[],"size":111,"originalSize":99},{"name":"vessel.js","children":[],"size":1002,"originalSize":1106},{"name":"global.js","children":[],"size":2874,"originalSize":1500}]},{"name":"index.js","children":[],"size":9377,"originalSize":4185}]};</script>
141141
<script charset="UTF-8">
142142
(function () {
143143
'use strict';

bundle-size/es.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h1>RollUp Visualizer</h1>
137137
</div>
138138
</div>
139139
</div>
140-
<script>window.nodesData = {"name":"root","children":[{"name":"kernels","children":[{"name":"native.js","children":[],"size":2185,"originalSize":1489}]},{"name":"dispatcher","children":[{"name":"kernel.js","children":[],"size":5098,"originalSize":4443},{"name":"video-wrapper.js","children":[],"size":21109,"originalSize":14224},{"name":"plugin.js","children":[],"size":10972,"originalSize":9887},{"name":"dom.js","children":[],"size":15966,"originalSize":12359},{"name":"bus.js","children":[],"size":17515,"originalSize":13895},{"name":"binder.js","children":[],"size":21127,"originalSize":13863},{"name":"index.js","children":[],"size":29774,"originalSize":25308}]},{"name":"helper","children":[{"name":"const.js","children":[],"size":1568,"originalSize":1913},{"name":"checker.js","children":[],"size":795,"originalSize":838}]},{"name":"config","children":[{"name":"video.js","children":[],"size":11442,"originalSize":9141},{"name":"container.js","children":[],"size":111,"originalSize":99},{"name":"vessel.js","children":[],"size":963,"originalSize":1106},{"name":"global.js","children":[],"size":2800,"originalSize":1500}]},{"name":"index.js","children":[],"size":9039,"originalSize":4185}]};</script>
140+
<script>window.nodesData = {"name":"root","children":[{"name":"kernels","children":[{"name":"native.js","children":[],"size":2185,"originalSize":1489}]},{"name":"dispatcher","children":[{"name":"kernel.js","children":[],"size":5011,"originalSize":4439},{"name":"video-wrapper.js","children":[],"size":21109,"originalSize":14224},{"name":"plugin.js","children":[],"size":10972,"originalSize":9887},{"name":"dom.js","children":[],"size":15966,"originalSize":12359},{"name":"bus.js","children":[],"size":17515,"originalSize":13895},{"name":"binder.js","children":[],"size":21127,"originalSize":13863},{"name":"index.js","children":[],"size":29869,"originalSize":25434}]},{"name":"helper","children":[{"name":"const.js","children":[],"size":1568,"originalSize":1913},{"name":"checker.js","children":[],"size":795,"originalSize":838}]},{"name":"config","children":[{"name":"video.js","children":[],"size":11442,"originalSize":9141},{"name":"container.js","children":[],"size":111,"originalSize":99},{"name":"vessel.js","children":[],"size":963,"originalSize":1106},{"name":"global.js","children":[],"size":2800,"originalSize":1500}]},{"name":"index.js","children":[],"size":9039,"originalSize":4185}]};</script>
141141
<script charset="UTF-8">
142142
(function () {
143143
'use strict';

bundle-size/min.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

bundle-size/umd.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/index.browser.js

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

22
/**
3-
* chimee v0.10.2
3+
* chimee v0.10.3
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -4833,9 +4833,24 @@
48334833
var boxSuffixMap = {
48344834
flv: '.flv',
48354835
hls: '.m3u8',
4836-
mp4: '.mp4'
4836+
native: '.mp4'
48374837
};
48384838

4839+
// return the config box
4840+
// or choose the right one according to the src
4841+
function getLegalBox(_ref) {
4842+
var src = _ref.src,
4843+
box = _ref.box;
4844+
4845+
if (isString(box) && box) return box;
4846+
src = src.toLowerCase();
4847+
for (var key in boxSuffixMap) {
4848+
var suffix = boxSuffixMap[key];
4849+
if (src.indexOf(suffix) > -1) return key;
4850+
}
4851+
return 'native';
4852+
}
4853+
48394854
var ChimeeKernel = function () {
48404855
/**
48414856
* kernelWrapper
@@ -4861,7 +4876,7 @@
48614876
key: 'initVideoKernel',
48624877
value: function initVideoKernel() {
48634878
var config = this.config;
4864-
var box = this.chooseBox(config);
4879+
var box = getLegalBox(config);
48654880
this.box = box;
48664881
var VideoKernel = this.chooseVideoKernel(this.box, config.preset);
48674882

@@ -4877,24 +4892,6 @@
48774892
this.videoKernel = new VideoKernel(this.videoElement, config, customConfig);
48784893
}
48794894

4880-
// return the config box
4881-
// or choose the right one according to the src
4882-
4883-
}, {
4884-
key: 'chooseBox',
4885-
value: function chooseBox(_ref) {
4886-
var src = _ref.src,
4887-
box = _ref.box;
4888-
4889-
if (isString(box) && box) return box;
4890-
src = src.toLowerCase();
4891-
for (var key in boxSuffixMap) {
4892-
var suffix = boxSuffixMap[key];
4893-
if (src.indexOf(suffix) > -1) return key;
4894-
}
4895-
return 'native';
4896-
}
4897-
48984895
// choose the right video kernel according to the box setting
48994896

49004897
}, {
@@ -7734,7 +7731,7 @@
77347731
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
77357732

77367733
_this.destroyed = false;
7737-
_this.VERSION = '0.10.2';
7734+
_this.VERSION = '0.10.3';
77387735
_this.__operable = true;
77397736
_this.__level = 0;
77407737

@@ -10426,14 +10423,16 @@
1042610423
_option2$isLive = _option2.isLive,
1042710424
isLive = _option2$isLive === undefined ? videoConfig.isLive : _option2$isLive,
1042810425
_option2$box = _option2.box,
10429-
box = _option2$box === undefined ? videoConfig.box : _option2$box,
10426+
box = _option2$box === undefined ? getLegalBox({ src: src, box: videoConfig.box }) : _option2$box,
1043010427
_option2$preset = _option2.preset,
1043110428
preset = _option2$preset === undefined ? videoConfig.preset : _option2$preset,
1043210429
_option2$kernels = _option2.kernels,
1043310430
kernels = _option2$kernels === undefined ? videoConfig.kernels : _option2$kernels,
1043410431
isFirst = _option2.isFirst;
1043510432

10433+
delete option.isFirst;
1043610434
if (box !== 'native' || box !== oldBox || !isEmpty(option)) {
10435+
option.isFirst = isFirst;
1043710436
var video = document.createElement('video');
1043810437
var config = { isLive: isLive, box: box, preset: preset, src: src, kernels: kernels };
1043910438
var kernel = this._createKernel(video, config);
@@ -11246,7 +11245,7 @@
1124611245
}), _descriptor2$1 = _applyDecoratedDescriptor$8(_class2$2.prototype, 'version', [frozen], {
1124711246
enumerable: true,
1124811247
initializer: function initializer() {
11249-
return '0.10.2';
11248+
return '0.10.3';
1125011249
}
1125111250
}), _descriptor3$1 = _applyDecoratedDescriptor$8(_class2$2.prototype, 'config', [frozen], {
1125211251
enumerable: true,

lib/index.js

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

22
/**
3-
* chimee v0.10.2
3+
* chimee v0.10.3
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -122,9 +122,24 @@ var LOG_TAG = 'chimee';
122122
var boxSuffixMap = {
123123
flv: '.flv',
124124
hls: '.m3u8',
125-
mp4: '.mp4'
125+
native: '.mp4'
126126
};
127127

128+
// return the config box
129+
// or choose the right one according to the src
130+
function getLegalBox(_ref) {
131+
var src = _ref.src,
132+
box = _ref.box;
133+
134+
if (chimeeHelper.isString(box) && box) return box;
135+
src = src.toLowerCase();
136+
for (var key in boxSuffixMap) {
137+
var suffix = boxSuffixMap[key];
138+
if (src.indexOf(suffix) > -1) return key;
139+
}
140+
return 'native';
141+
}
142+
128143
var ChimeeKernel = function () {
129144
/**
130145
* kernelWrapper
@@ -150,7 +165,7 @@ var ChimeeKernel = function () {
150165
key: 'initVideoKernel',
151166
value: function initVideoKernel() {
152167
var config = this.config;
153-
var box = this.chooseBox(config);
168+
var box = getLegalBox(config);
154169
this.box = box;
155170
var VideoKernel = this.chooseVideoKernel(this.box, config.preset);
156171

@@ -166,24 +181,6 @@ var ChimeeKernel = function () {
166181
this.videoKernel = new VideoKernel(this.videoElement, config, customConfig);
167182
}
168183

169-
// return the config box
170-
// or choose the right one according to the src
171-
172-
}, {
173-
key: 'chooseBox',
174-
value: function chooseBox(_ref) {
175-
var src = _ref.src,
176-
box = _ref.box;
177-
178-
if (chimeeHelper.isString(box) && box) return box;
179-
src = src.toLowerCase();
180-
for (var key in boxSuffixMap) {
181-
var suffix = boxSuffixMap[key];
182-
if (src.indexOf(suffix) > -1) return key;
183-
}
184-
return 'native';
185-
}
186-
187184
// choose the right video kernel according to the box setting
188185

189186
}, {
@@ -1296,7 +1293,7 @@ var Plugin = (_dec$2 = toxicDecorators.autobindClass(), _dec$2(_class$2 = functi
12961293
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
12971294

12981295
_this.destroyed = false;
1299-
_this.VERSION = '0.10.2';
1296+
_this.VERSION = '0.10.3';
13001297
_this.__operable = true;
13011298
_this.__level = 0;
13021299

@@ -3492,14 +3489,16 @@ var Dispatcher = (_dec$6 = toxicDecorators.before(convertNameIntoId), _dec2$5 =
34923489
_option2$isLive = _option2.isLive,
34933490
isLive = _option2$isLive === undefined ? videoConfig.isLive : _option2$isLive,
34943491
_option2$box = _option2.box,
3495-
box = _option2$box === undefined ? videoConfig.box : _option2$box,
3492+
box = _option2$box === undefined ? getLegalBox({ src: src, box: videoConfig.box }) : _option2$box,
34963493
_option2$preset = _option2.preset,
34973494
preset = _option2$preset === undefined ? videoConfig.preset : _option2$preset,
34983495
_option2$kernels = _option2.kernels,
34993496
kernels = _option2$kernels === undefined ? videoConfig.kernels : _option2$kernels,
35003497
isFirst = _option2.isFirst;
35013498

3499+
delete option.isFirst;
35023500
if (box !== 'native' || box !== oldBox || !chimeeHelper.isEmpty(option)) {
3501+
option.isFirst = isFirst;
35033502
var video = document.createElement('video');
35043503
var config = { isLive: isLive, box: box, preset: preset, src: src, kernels: kernels };
35053504
var kernel = this._createKernel(video, config);
@@ -4103,7 +4102,7 @@ var Chimee = (_dec$7 = toxicDecorators.autobindClass(), _dec$7(_class$8 = (_clas
41034102
}), _descriptor2$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'version', [toxicDecorators.frozen], {
41044103
enumerable: true,
41054104
initializer: function initializer() {
4106-
return '0.10.2';
4105+
return '0.10.3';
41074106
}
41084107
}), _descriptor3$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'config', [toxicDecorators.frozen], {
41094108
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: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* chimee v0.10.2
3+
* chimee v0.10.3
44
* (c) 2017-2018 toxic-johann
55
* Released under MIT
66
*/
@@ -118,9 +118,24 @@ var LOG_TAG = 'chimee';
118118
var boxSuffixMap = {
119119
flv: '.flv',
120120
hls: '.m3u8',
121-
mp4: '.mp4'
121+
native: '.mp4'
122122
};
123123

124+
// return the config box
125+
// or choose the right one according to the src
126+
function getLegalBox(_ref) {
127+
var src = _ref.src,
128+
box = _ref.box;
129+
130+
if (isString(box) && box) return box;
131+
src = src.toLowerCase();
132+
for (var key in boxSuffixMap) {
133+
var suffix = boxSuffixMap[key];
134+
if (src.indexOf(suffix) > -1) return key;
135+
}
136+
return 'native';
137+
}
138+
124139
var ChimeeKernel = function () {
125140
/**
126141
* kernelWrapper
@@ -146,7 +161,7 @@ var ChimeeKernel = function () {
146161
key: 'initVideoKernel',
147162
value: function initVideoKernel() {
148163
var config = this.config;
149-
var box = this.chooseBox(config);
164+
var box = getLegalBox(config);
150165
this.box = box;
151166
var VideoKernel = this.chooseVideoKernel(this.box, config.preset);
152167

@@ -162,24 +177,6 @@ var ChimeeKernel = function () {
162177
this.videoKernel = new VideoKernel(this.videoElement, config, customConfig);
163178
}
164179

165-
// return the config box
166-
// or choose the right one according to the src
167-
168-
}, {
169-
key: 'chooseBox',
170-
value: function chooseBox(_ref) {
171-
var src = _ref.src,
172-
box = _ref.box;
173-
174-
if (isString(box) && box) return box;
175-
src = src.toLowerCase();
176-
for (var key in boxSuffixMap) {
177-
var suffix = boxSuffixMap[key];
178-
if (src.indexOf(suffix) > -1) return key;
179-
}
180-
return 'native';
181-
}
182-
183180
// choose the right video kernel according to the box setting
184181

185182
}, {
@@ -1292,7 +1289,7 @@ var Plugin = (_dec$2 = autobindClass(), _dec$2(_class$2 = function (_VideoWrappe
12921289
var _this = _possibleConstructorReturn(this, (Plugin.__proto__ || _Object$getPrototypeOf(Plugin)).call(this));
12931290

12941291
_this.destroyed = false;
1295-
_this.VERSION = '0.10.2';
1292+
_this.VERSION = '0.10.3';
12961293
_this.__operable = true;
12971294
_this.__level = 0;
12981295

@@ -3488,14 +3485,16 @@ var Dispatcher = (_dec$6 = before(convertNameIntoId), _dec2$5 = before(checkPlug
34883485
_option2$isLive = _option2.isLive,
34893486
isLive = _option2$isLive === undefined ? videoConfig.isLive : _option2$isLive,
34903487
_option2$box = _option2.box,
3491-
box = _option2$box === undefined ? videoConfig.box : _option2$box,
3488+
box = _option2$box === undefined ? getLegalBox({ src: src, box: videoConfig.box }) : _option2$box,
34923489
_option2$preset = _option2.preset,
34933490
preset = _option2$preset === undefined ? videoConfig.preset : _option2$preset,
34943491
_option2$kernels = _option2.kernels,
34953492
kernels = _option2$kernels === undefined ? videoConfig.kernels : _option2$kernels,
34963493
isFirst = _option2.isFirst;
34973494

3495+
delete option.isFirst;
34983496
if (box !== 'native' || box !== oldBox || !isEmpty(option)) {
3497+
option.isFirst = isFirst;
34993498
var video = document.createElement('video');
35003499
var config = { isLive: isLive, box: box, preset: preset, src: src, kernels: kernels };
35013500
var kernel = this._createKernel(video, config);
@@ -4099,7 +4098,7 @@ var Chimee = (_dec$7 = autobindClass(), _dec$7(_class$8 = (_class2$1 = (_temp =
40994098
}), _descriptor2$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'version', [frozen], {
41004099
enumerable: true,
41014100
initializer: function initializer() {
4102-
return '0.10.2';
4101+
return '0.10.3';
41034102
}
41044103
}), _descriptor3$1 = _applyDecoratedDescriptor$7(_class2$1.prototype, 'config', [frozen], {
41054104
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.2",
3+
"version": "0.10.3",
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)