@ezuikit/player-theme 2.1.0-beta.1 → 2.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -1
- package/dist/constant.js +2 -2
- package/dist/index.js +161 -138
- package/dist/index.mjs +161 -138
- package/dist/index.umd.js +257 -498
- package/dist/style.css +4 -4
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +14 -33
- package/package.json +20 -4
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.1.0-beta.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @ezuikit/player-theme v2.1.0-beta.10
|
|
3
|
+
* Copyright (c) 2026-01-14 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -1909,7 +1909,10 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1909
1909
|
if (this._lastVolume !== _volume) {
|
|
1910
1910
|
this._volume = _volume;
|
|
1911
1911
|
this._lastVolume = this._volume;
|
|
1912
|
-
if (this._progress)
|
|
1912
|
+
if (this._progress) {
|
|
1913
|
+
// 静音时进度条为 0
|
|
1914
|
+
this._progress.value = this._muted ? 0 : _volume;
|
|
1915
|
+
}
|
|
1913
1916
|
this._options.onChange == null ? void 0 : this._options.onChange.call(this._options, _volume, this._muted);
|
|
1914
1917
|
this.emit(EVENTS.control.volumechange, _volume, this._muted);
|
|
1915
1918
|
}
|
|
@@ -3734,7 +3737,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3734
3737
|
_inherits$j(Content, EventEmitter);
|
|
3735
3738
|
function Content(options) {
|
|
3736
3739
|
var _this;
|
|
3737
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3740
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3738
3741
|
_this.options = options;
|
|
3739
3742
|
_this._scaleMode = options.scaleMode || 0;
|
|
3740
3743
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3750,11 +3753,12 @@ function _set_prototype_of$j(o, p) {
|
|
|
3750
3753
|
$popupContainer.appendChild(_this.$wrapper);
|
|
3751
3754
|
}
|
|
3752
3755
|
_this.on(EVENTS.videoInfo, function(originWidth, originHeight) {
|
|
3753
|
-
_this.
|
|
3754
|
-
});
|
|
3755
|
-
_this.on(EVENTS.resize, function() {
|
|
3756
|
-
_this._rerender();
|
|
3756
|
+
_this.rerender(originWidth, originHeight);
|
|
3757
3757
|
});
|
|
3758
|
+
// prettier-ignore
|
|
3759
|
+
_this._cleanUpResizeObserver = Utils.resizeObserver(_this.$wrapper, throttle(function() {
|
|
3760
|
+
_this.rerender();
|
|
3761
|
+
}, 20));
|
|
3758
3762
|
return _this;
|
|
3759
3763
|
}
|
|
3760
3764
|
var _proto = Content.prototype;
|
|
@@ -3763,7 +3767,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3763
3767
|
* @param {number} originWidth 画面宽度
|
|
3764
3768
|
* @param {number} originHeight 画面高度
|
|
3765
3769
|
* @returns {void}
|
|
3766
|
-
*/ _proto.
|
|
3770
|
+
*/ _proto.rerender = function rerender(originWidth, originHeight) {
|
|
3767
3771
|
if (originWidth === void 0) originWidth = 0;
|
|
3768
3772
|
if (originHeight === void 0) originHeight = 0;
|
|
3769
3773
|
var width = this.$wrapper.clientWidth;
|
|
@@ -3787,6 +3791,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3787
3791
|
if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
|
|
3788
3792
|
objectFill = 'cover';
|
|
3789
3793
|
}
|
|
3794
|
+
// 容器和视频的分辨率都需要有值才能计算
|
|
3790
3795
|
if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
|
|
3791
3796
|
var left = (width - this._originWidth) / 2;
|
|
3792
3797
|
var top = (height - this._originHeight) / 2;
|
|
@@ -3816,10 +3821,14 @@ function _set_prototype_of$j(o, p) {
|
|
|
3816
3821
|
_proto.setScaleMode = function setScaleMode(scaleMode) {
|
|
3817
3822
|
if (scaleMode === void 0) scaleMode = 0;
|
|
3818
3823
|
this._scaleMode = scaleMode;
|
|
3819
|
-
this.
|
|
3824
|
+
this.rerender();
|
|
3820
3825
|
};
|
|
3821
3826
|
_proto.destroy = function destroy() {
|
|
3822
3827
|
var _this_$wrapper;
|
|
3828
|
+
if (this._cleanUpResizeObserver) {
|
|
3829
|
+
this._cleanUpResizeObserver.unobserve == null ? void 0 : this._cleanUpResizeObserver.unobserve.call(this._cleanUpResizeObserver);
|
|
3830
|
+
this._cleanUpResizeObserver = null;
|
|
3831
|
+
}
|
|
3823
3832
|
if (this.$video) {
|
|
3824
3833
|
this.$video.remove();
|
|
3825
3834
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -3924,11 +3933,13 @@ function _set_prototype_of$i(o, p) {
|
|
|
3924
3933
|
/**
|
|
3925
3934
|
* 添加
|
|
3926
3935
|
* @param control
|
|
3927
|
-
*/ _proto.add = function add(key, part, control) {
|
|
3936
|
+
*/ _proto.add = function add(key, part, control, props) {
|
|
3928
3937
|
this.list.unshift({
|
|
3929
3938
|
part: part,
|
|
3930
3939
|
key: key,
|
|
3931
|
-
control: control
|
|
3940
|
+
control: control,
|
|
3941
|
+
width: props.width,
|
|
3942
|
+
height: props.height
|
|
3932
3943
|
});
|
|
3933
3944
|
};
|
|
3934
3945
|
/**
|
|
@@ -4387,12 +4398,6 @@ function debounce(func, wait) {
|
|
|
4387
4398
|
theme.emit(EVENTS.control.recDestroy);
|
|
4388
4399
|
});
|
|
4389
4400
|
}
|
|
4390
|
-
// content
|
|
4391
|
-
if (theme.contentControl) {
|
|
4392
|
-
theme.contentControl.on(EVENTS.control.contentRerender, function(info) {
|
|
4393
|
-
theme.emit(EVENTS.control.contentRerender, info);
|
|
4394
|
-
});
|
|
4395
|
-
}
|
|
4396
4401
|
}
|
|
4397
4402
|
var ignoreList = [
|
|
4398
4403
|
EVENTS.getOSDTime,
|
|
@@ -8714,7 +8719,7 @@ function _set_prototype_of$6(o, p) {
|
|
|
8714
8719
|
],
|
|
8715
8720
|
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
8716
8721
|
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
8717
|
-
current:
|
|
8722
|
+
current: DateTime.toDate(this._value),
|
|
8718
8723
|
placement: 'tr',
|
|
8719
8724
|
triggerClose: true,
|
|
8720
8725
|
disabledDate: function(date) {
|
|
@@ -10190,6 +10195,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10190
10195
|
},
|
|
10191
10196
|
scaleMode: _this.scaleMode
|
|
10192
10197
|
});
|
|
10198
|
+
_this.contentControl.on(EVENTS.control.contentRerender, function(info) {
|
|
10199
|
+
_this.emit(EVENTS.control.contentRerender, info);
|
|
10200
|
+
});
|
|
10193
10201
|
// zoom utils
|
|
10194
10202
|
__zoom(_this, _this.contentControl.$content, _extends({}, _this.options.zoomOptions || {}, {
|
|
10195
10203
|
onTap: function() {
|
|
@@ -10740,138 +10748,153 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10740
10748
|
* 尺寸变化结束时 进行判断,为了节省开销
|
|
10741
10749
|
* @WARN:这里会闪一下, 原因:需要控件渲染后才知是否需要放置到 More 中,
|
|
10742
10750
|
*/ _proto._footerMoreControlShow = function _footerMoreControlShow() {
|
|
10751
|
+
this._displayMore();
|
|
10752
|
+
};
|
|
10753
|
+
_proto._displayMore = function _displayMore() {
|
|
10743
10754
|
var _this = this;
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
_this.emit(EVENTS.control.footerMorePanelOpenChange, open);
|
|
10773
|
-
}
|
|
10774
|
-
});
|
|
10775
|
-
}
|
|
10776
|
-
//
|
|
10777
|
-
var list = (((_this__themeData = _this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
|
|
10778
|
-
var _this__footerMoreControl;
|
|
10779
|
-
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
10780
|
-
var _this_controls;
|
|
10781
|
-
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
10782
|
-
});
|
|
10783
|
-
return index === -1;
|
|
10784
|
-
});
|
|
10785
|
-
if (list.length <= 0) {
|
|
10786
|
-
return;
|
|
10787
|
-
}
|
|
10788
|
-
if (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
|
|
10789
|
-
// 为什么是两个, 因为More 也占用一个位置
|
|
10790
|
-
var popList = [
|
|
10791
|
-
list.pop(),
|
|
10792
|
-
list.pop()
|
|
10793
|
-
];
|
|
10794
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
10795
|
-
var item = _step.value;
|
|
10796
|
-
if (item) {
|
|
10797
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
10798
|
-
var key = "" + item.iconId + "Control";
|
|
10799
|
-
(_this_controls = _this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key, _this._footerMoreControl.$panel, 'prepend');
|
|
10800
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
10801
|
-
}
|
|
10755
|
+
if (this._footer) {
|
|
10756
|
+
var _this__footer_$left, _this__footer_$right;
|
|
10757
|
+
// 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
|
|
10758
|
+
var leftWidth = ((_this__footer_$left = this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
|
|
10759
|
+
var rightWidth = ((_this__footer_$right = this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
|
|
10760
|
+
// 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
|
|
10761
|
+
var collapseControl = this._width - leftWidth - rightWidth < 16; // 收拢控件到 More 中
|
|
10762
|
+
if (collapseControl) {
|
|
10763
|
+
var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
|
|
10764
|
+
if (!this._footerMoreControl && ((_this__footer = this._footer) == null ? void 0 : _this__footer.$right)) {
|
|
10765
|
+
this._footerMoreControl = new More({
|
|
10766
|
+
language: this.options.language,
|
|
10767
|
+
locales: this.i18n.translations,
|
|
10768
|
+
rootContainer: this.$container,
|
|
10769
|
+
getPopupContainer: function() {
|
|
10770
|
+
var _this__footer;
|
|
10771
|
+
return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
|
|
10772
|
+
},
|
|
10773
|
+
placement: 'tr',
|
|
10774
|
+
controls: this.controls,
|
|
10775
|
+
open: false,
|
|
10776
|
+
offset: [
|
|
10777
|
+
0,
|
|
10778
|
+
-8
|
|
10779
|
+
],
|
|
10780
|
+
wrapClassName: "" + PREFIX_CLASS + "-footer-more",
|
|
10781
|
+
onOpenChange: function(open) {
|
|
10782
|
+
_this.emit(EVENTS.control.footerMorePanelOpenChange, open);
|
|
10802
10783
|
}
|
|
10803
|
-
}
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10784
|
+
});
|
|
10785
|
+
}
|
|
10786
|
+
//
|
|
10787
|
+
var list = (((_this__themeData = this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
|
|
10788
|
+
var _this__footerMoreControl;
|
|
10789
|
+
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
10790
|
+
var _this_controls;
|
|
10791
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
10792
|
+
});
|
|
10793
|
+
return index === -1;
|
|
10794
|
+
});
|
|
10795
|
+
if (list.length <= 0) return;
|
|
10796
|
+
if (((_this__footerMoreControl = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
|
|
10797
|
+
// 为什么是两个, 因为More 也占用一个位置
|
|
10798
|
+
var popList = [
|
|
10799
|
+
list.pop(),
|
|
10800
|
+
list.pop()
|
|
10801
|
+
];
|
|
10802
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
10803
|
+
var item = _step.value;
|
|
10804
|
+
if (item) {
|
|
10805
|
+
var _this_controls_key_$container, _this_controls_key, _this_controls, _this_controls_key_$container1, _this_controls_key1, _this_controls1, _this_controls_key_resetPopupContainer, _this_controls_key2, _this_controls2, _this_controls3, _this__footerMoreControl2;
|
|
10806
|
+
var key = "" + item.iconId + "Control";
|
|
10807
|
+
var width = ((_this_controls = this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_$container = _this_controls_key.$container) == null ? void 0 : _this_controls_key_$container.clientWidth) || 0;
|
|
10808
|
+
var height = ((_this_controls1 = this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls1[key]) == null ? void 0 : (_this_controls_key_$container1 = _this_controls_key1.$container) == null ? void 0 : _this_controls_key_$container1.clientHeight) || 0;
|
|
10809
|
+
(_this_controls2 = this.controls) == null ? void 0 : (_this_controls_key2 = _this_controls2[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key2.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key2, this._footerMoreControl.$panel, 'prepend');
|
|
10810
|
+
(_this__footerMoreControl2 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls3 = this.controls) == null ? void 0 : _this_controls3[key], {
|
|
10811
|
+
width: width,
|
|
10812
|
+
height: height
|
|
10813
|
+
});
|
|
10812
10814
|
}
|
|
10813
10815
|
}
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10816
|
+
} else if (this._footerMoreControl) {
|
|
10817
|
+
var item1 = list.pop();
|
|
10818
|
+
if (item1) {
|
|
10819
|
+
var _this_controls_key_$container2, _this_controls_key3, _this_controls4, _this_controls_key_$container3, _this_controls_key4, _this_controls5, _this_controls_key_resetPopupContainer1, _this_controls_key5, _this_controls6, _this_controls7, _this__footerMoreControl3;
|
|
10820
|
+
var key1 = "" + item1.iconId + "Control";
|
|
10821
|
+
var width1 = ((_this_controls4 = this.controls) == null ? void 0 : (_this_controls_key3 = _this_controls4[key1]) == null ? void 0 : (_this_controls_key_$container2 = _this_controls_key3.$container) == null ? void 0 : _this_controls_key_$container2.clientWidth) || 0;
|
|
10822
|
+
var height1 = ((_this_controls5 = this.controls) == null ? void 0 : (_this_controls_key4 = _this_controls5[key1]) == null ? void 0 : (_this_controls_key_$container3 = _this_controls_key4.$container) == null ? void 0 : _this_controls_key_$container3.clientHeight) || 0;
|
|
10823
|
+
(_this_controls6 = this.controls) == null ? void 0 : (_this_controls_key5 = _this_controls6[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key5.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key5, this._footerMoreControl.$panel, 'prepend');
|
|
10824
|
+
(_this__footerMoreControl3 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls7 = this.controls) == null ? void 0 : _this_controls7[key1], {
|
|
10825
|
+
width: width1,
|
|
10826
|
+
height: height1
|
|
10827
|
+
});
|
|
10828
|
+
} else {
|
|
10829
|
+
return;
|
|
10821
10830
|
}
|
|
10822
|
-
}
|
|
10823
|
-
|
|
10831
|
+
}
|
|
10832
|
+
// prettier-ignore
|
|
10833
|
+
this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl1 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list1 = _this__footerMoreControl1.list) == null ? void 0 : _this__footerMoreControl_list1.map(function(item) {
|
|
10834
|
+
return item.key;
|
|
10835
|
+
}));
|
|
10836
|
+
if (this._footerMoreControl) {
|
|
10837
|
+
// 防止 More 不存在导致死循环
|
|
10838
|
+
this._displayMore();
|
|
10839
|
+
}
|
|
10840
|
+
} else {
|
|
10841
|
+
var _this__footerMoreControl_list2, _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6;
|
|
10842
|
+
var offset = 50;
|
|
10843
|
+
// if (this._footerMoreControl?.list?.length && this._footerMoreControl?.list?.length > 2) {
|
|
10844
|
+
// offset = 16;
|
|
10845
|
+
// }
|
|
10846
|
+
if ((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
|
|
10847
|
+
offset = offset + this._footerMoreControl.list[0].width || 0;
|
|
10848
|
+
}
|
|
10849
|
+
if (((_this__footerMoreControl6 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) && this._width - leftWidth - rightWidth > offset) {
|
|
10850
|
+
var _this__footerMoreControl7, _this__footerMoreControl_list4, _this__footerMoreControl8, _this__footerMoreControl_list5, _this__footerMoreControl9;
|
|
10824
10851
|
// 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
|
|
10825
10852
|
// 从 More 中一次移除一个控件到 header/footer 中
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
var
|
|
10830
|
-
if (item2) {
|
|
10831
|
-
var
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
var
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
var _item_control_resetPopupContainer2, _item_control2;
|
|
10842
|
-
(_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, _this._footer.$right, 'before', _this._footerMoreControl.$container);
|
|
10843
|
-
}
|
|
10853
|
+
//
|
|
10854
|
+
var item2 = (_this__footerMoreControl7 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl7.list.shift();
|
|
10855
|
+
if (item2) {
|
|
10856
|
+
var _this__footerMoreControl10;
|
|
10857
|
+
if (item2.part === 'left') {
|
|
10858
|
+
var _item_control_resetPopupContainer, _item_control;
|
|
10859
|
+
(_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, this._footer.$left, 'append');
|
|
10860
|
+
} else if (item2.part === 'right') {
|
|
10861
|
+
var _this__footerMoreControl_list6, _this__footerMoreControl11;
|
|
10862
|
+
if (((_this__footerMoreControl11 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list6 = _this__footerMoreControl11.list) == null ? void 0 : _this__footerMoreControl_list6.length) === 0) {
|
|
10863
|
+
var _item_control_resetPopupContainer1, _item_control1;
|
|
10864
|
+
(_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, this._footer.$right, 'append');
|
|
10865
|
+
} else {
|
|
10866
|
+
var _item_control_resetPopupContainer2, _item_control2;
|
|
10867
|
+
(_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, this._footer.$right, 'before', this._footerMoreControl.$container);
|
|
10844
10868
|
}
|
|
10845
|
-
(_this__footerMoreControl8 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl8.remove(item2.control);
|
|
10846
10869
|
}
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
(
|
|
10870
|
+
(_this__footerMoreControl10 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.remove(item2.control);
|
|
10871
|
+
}
|
|
10872
|
+
if (((_this__footerMoreControl8 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl8.list) == null ? void 0 : _this__footerMoreControl_list4.length) === 1) {
|
|
10873
|
+
var _this__footerMoreControl12, _this__footerMoreControl_destroy, _this__footerMoreControl13;
|
|
10874
|
+
// 最后一个, 移除 More
|
|
10875
|
+
var item11 = (_this__footerMoreControl12 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.list.shift();
|
|
10876
|
+
if (item11) {
|
|
10877
|
+
var _this__footerMoreControl14;
|
|
10878
|
+
if (item11.part === 'left') {
|
|
10879
|
+
var _item1_control_resetPopupContainer, _item1_control;
|
|
10880
|
+
(_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, this._footer.$left, 'append');
|
|
10881
|
+
} else if (item11.part === 'right') {
|
|
10882
|
+
var _item1_control_resetPopupContainer1, _item1_control1;
|
|
10883
|
+
(_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, this._footer.$right, 'append');
|
|
10861
10884
|
}
|
|
10862
|
-
(
|
|
10863
|
-
_this._footerMoreControl = null;
|
|
10885
|
+
(_this__footerMoreControl14 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl14.remove(item11.control);
|
|
10864
10886
|
}
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
return item.key;
|
|
10868
|
-
}));
|
|
10869
|
-
displayMore();
|
|
10887
|
+
(_this__footerMoreControl13 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl13.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl13);
|
|
10888
|
+
this._footerMoreControl = null;
|
|
10870
10889
|
}
|
|
10890
|
+
// prettier-ignore
|
|
10891
|
+
this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl9 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl9.list) == null ? void 0 : _this__footerMoreControl_list5.map(function(item) {
|
|
10892
|
+
return item.key;
|
|
10893
|
+
}));
|
|
10894
|
+
this._displayMore();
|
|
10871
10895
|
}
|
|
10872
10896
|
}
|
|
10873
|
-
}
|
|
10874
|
-
displayMore();
|
|
10897
|
+
}
|
|
10875
10898
|
};
|
|
10876
10899
|
/**
|
|
10877
10900
|
* 移除事件
|
|
@@ -11386,6 +11409,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11386
11409
|
zh: zh,
|
|
11387
11410
|
en: en
|
|
11388
11411
|
};
|
|
11389
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.0-beta.
|
|
11412
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.0-beta.10';
|
|
11390
11413
|
|
|
11391
11414
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|