mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
bump version to 5.2.4
This commit is contained in:
1 parent
3715a36cde
commit
da94223721
3 files changed
+47
-47
No files matched your search
@@ -254,7 +254,7 @@ class Artplayer extends (0, _emitterDefault.default) {
|
||||
return instances;
|
||||
}
|
||||
static get version() {
|
||||
return '"5.2.3"';
|
||||
return '"5.2.4"';
|
||||
}
|
||||
static get env() {
|
||||
return '"development"';
|
||||
@@ -427,7 +427,7 @@ if (_utils.isBrowser) {
|
||||
}
|
||||
|
||||
},{"bundle-text:./style/index.less":"bFGMG","option-validator":"9hUEm","./utils/emitter":"2qvfs","./utils":"gGxPm","./scheme":"8YPbR","./config":"1dlGA","./template":"5JwMQ","./i18n":"3Jf1s","./player":"iA4EC","./control":"cNVpy","./contextmenu":"dx7Zz","./info":"gvEup","./subtitle":"hxr0l","./events":"dQzlM","./hotkey":"drylQ","./layer":"7Oas9","./loading":"glZdQ","./notice":"jZEIz","./mask":"iGxU6","./icons":"avFu3","./setting":"7ATN8","./storage":"grHII","./plugins":"6P64r","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"bFGMG":[function(require,module,exports,__globalThis) {
|
||||
module.exports = ".art-video-player {\n --art-theme: red;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: #00000080;\n --art-transition-duration: .2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: #ffffff40;\n --art-hover-color: #ffffff40;\n --art-loaded-color: #ffffff40;\n --art-state-size: 80px;\n --art-state-opacity: .8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: #ffffff80;\n --art-control-height: 46px;\n --art-control-opacity: .75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: #000000d9;\n --art-tip-background: #000000b3;\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: #ffffff40;\n --art-scrollbar-background-hover: #ffffff80;\n --art-mini-progress-height: 2px;\n}\n\n.art-bg-cover {\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n}\n\n.art-backdrop-filter {\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000bf !important;\n}\n\n.art-truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.art-video-player {\n zoom: 1;\n text-align: left;\n user-select: none;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n -webkit-tap-highlight-color: #0000;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n direction: ltr;\n outline: 0;\n margin: 0 auto;\n padding: 0;\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n\n.art-video-player img {\n vertical-align: top;\n max-width: 100%;\n}\n\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n\n.art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1;\n display: flex;\n}\n\n.art-video-player.art-backdrop .art-contextmenus, .art-video-player.art-backdrop .art-info, .art-video-player.art-backdrop .art-settings, .art-video-player.art-backdrop .art-layer-auto-playback, .art-video-player.art-backdrop .art-selector-list, .art-video-player.art-backdrop .art-volume-inner {\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000bf !important;\n}\n\n.art-video {\n z-index: 10;\n cursor: pointer;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.art-poster {\n z-index: 11;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n text-align: center;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n gap: var(--art-subtitle-gap);\n width: 100%;\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n flex-direction: column;\n padding: 0 5%;\n display: none;\n position: absolute;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-Line truncated
|
||||
module.exports = ".art-video-player {\n --art-theme: red;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: #00000080;\n --art-transition-duration: .2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: #ffffff40;\n --art-hover-color: #ffffff40;\n --art-loaded-color: #ffffff40;\n --art-state-size: 80px;\n --art-state-opacity: .8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: #ffffff80;\n --art-control-height: 46px;\n --art-control-opacity: .75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: #000000d9;\n --art-tip-background: #000000b3;\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: #ffffff40;\n --art-scrollbar-background-hover: #ffffff80;\n --art-mini-progress-height: 2px;\n}\n\n.art-bg-cover {\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, #0006, #0000);\n background-position: bottom;\n background-repeat: repeat-x;\n}\n\n.art-backdrop-filter {\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000bf !important;\n}\n\n.art-truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.art-video-player {\n zoom: 1;\n text-align: left;\n user-select: none;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n -webkit-tap-highlight-color: #0000;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n direction: ltr;\n outline: 0;\n margin: 0 auto;\n padding: 0;\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.3;\n position: relative;\n}\n\n.art-video-player *, .art-video-player :before, .art-video-player :after {\n box-sizing: border-box;\n}\n\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n\n.art-video-player img {\n vertical-align: top;\n max-width: 100%;\n}\n\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n\n.art-icon {\n justify-content: center;\n align-items: center;\n line-height: 1;\n display: flex;\n}\n\n.art-video-player.art-backdrop .art-contextmenus, .art-video-player.art-backdrop .art-info, .art-video-player.art-backdrop .art-settings, .art-video-player.art-backdrop .art-layer-auto-playback, .art-video-player.art-backdrop .art-selector-list, .art-video-player.art-backdrop .art-volume-inner {\n backdrop-filter: saturate(180%) blur(20px);\n background-color: #000000bf !important;\n}\n\n.art-video {\n z-index: 10;\n cursor: pointer;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.art-poster {\n z-index: 11;\n pointer-events: none;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n}\n\n.art-video-player .art-subtitle {\n z-index: 20;\n text-align: center;\n pointer-events: none;\n justify-content: center;\n align-items: center;\n gap: var(--art-subtitle-gap);\n width: 100%;\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px, var(--art-subtitle-border) -1px -1px 1px, var(--art-subtitle-border) 1px -1px 1px, var(--art-subtitle-border) -1px 1px 1px;\n flex-direction: column;\n padding: 0 5%;\n display: none;\n position: absolute;\n}\n\n.art-video-player.art-subtitle-show .art-subtitle {\n display: flex;\n}\n\n.art-video-player.art-control-show .art-subtitle {\n bottom: calc(var(--art-control-Line truncated
|
||||
|
||||
},{}],"9hUEm":[function(require,module,exports,__globalThis) {
|
||||
!function(r, t) {
|
||||
@@ -675,7 +675,7 @@ parcelHelpers.export(exports, "remove", ()=>remove);
|
||||
parcelHelpers.export(exports, "setStyle", ()=>setStyle);
|
||||
parcelHelpers.export(exports, "setStyles", ()=>setStyles);
|
||||
parcelHelpers.export(exports, "getStyle", ()=>getStyle);
|
||||
parcelHelpers.export(exports, "sublings", ()=>sublings);
|
||||
parcelHelpers.export(exports, "siblings", ()=>siblings);
|
||||
parcelHelpers.export(exports, "inverseClass", ()=>inverseClass);
|
||||
parcelHelpers.export(exports, "tooltip", ()=>tooltip);
|
||||
parcelHelpers.export(exports, "isInViewport", ()=>isInViewport);
|
||||
@@ -723,11 +723,11 @@ function getStyle(element, key, numberType = true) {
|
||||
const value = window.getComputedStyle(element, null).getPropertyValue(key);
|
||||
return numberType ? parseFloat(value) : value;
|
||||
}
|
||||
function sublings(target) {
|
||||
function siblings(target) {
|
||||
return Array.from(target.parentElement.children).filter((item)=>item !== target);
|
||||
}
|
||||
function inverseClass(target, className) {
|
||||
sublings(target).forEach((item)=>removeClass(item, className));
|
||||
siblings(target).forEach((item)=>removeClass(item, className));
|
||||
addClass(target, className);
|
||||
}
|
||||
function tooltip(target, msg, pos = 'top') {
|
||||
@@ -1168,7 +1168,7 @@ exports.default = {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
exports.default = {
|
||||
propertys: [
|
||||
properties: [
|
||||
'audioTracks',
|
||||
'autoplay',
|
||||
'buffered',
|
||||
@@ -2202,9 +2202,9 @@ function pipMix(art) {
|
||||
},{"../utils":"gGxPm","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"lmx0A":[function(require,module,exports,__globalThis) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "default", ()=>seekMix);
|
||||
parcelHelpers.export(exports, "default", ()=>loadedMix);
|
||||
var _utils = require("../utils");
|
||||
function seekMix(art) {
|
||||
function loadedMix(art) {
|
||||
const { $video } = art.template;
|
||||
(0, _utils.def)(art, 'loaded', {
|
||||
get: ()=>art.loadedTime / $video.duration
|
||||
@@ -2245,9 +2245,9 @@ function playingMix(art) {
|
||||
},{"../utils":"gGxPm","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"cbo97":[function(require,module,exports,__globalThis) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "default", ()=>resizeMix);
|
||||
parcelHelpers.export(exports, "default", ()=>autoSizeMix);
|
||||
var _utils = require("../utils");
|
||||
function resizeMix(art) {
|
||||
function autoSizeMix(art) {
|
||||
const { $container, $player, $video } = art.template;
|
||||
(0, _utils.def)(art, 'autoSize', {
|
||||
value () {
|
||||
@@ -2339,7 +2339,7 @@ parcelHelpers.export(exports, "default", ()=>miniMix);
|
||||
var _utils = require("../utils");
|
||||
function miniMix(art) {
|
||||
const { icons, proxy, storage, template: { $player, $video } } = art;
|
||||
let isDroging = false;
|
||||
let isDragging = false;
|
||||
let lastPageX = 0;
|
||||
let lastPageY = 0;
|
||||
function hideMini() {
|
||||
@@ -2384,22 +2384,22 @@ function miniMix(art) {
|
||||
art.on('video:pause', ()=>initState($play, $pause));
|
||||
art.on('video:timeupdate', ()=>initState($play, $pause));
|
||||
proxy($mini, 'mousedown', (event)=>{
|
||||
isDroging = event.button === 0;
|
||||
isDragging = event.button === 0;
|
||||
lastPageX = event.pageX;
|
||||
lastPageY = event.pageY;
|
||||
});
|
||||
art.on('document:mousemove', (event)=>{
|
||||
if (isDroging) {
|
||||
(0, _utils.addClass)($mini, 'art-mini-droging');
|
||||
if (isDragging) {
|
||||
(0, _utils.addClass)($mini, 'art-mini-dragging');
|
||||
const x = event.pageX - lastPageX;
|
||||
const y = event.pageY - lastPageY;
|
||||
(0, _utils.setStyle)($mini, 'transform', `translate(${x}px, ${y}px)`);
|
||||
}
|
||||
});
|
||||
art.on('document:mouseup', ()=>{
|
||||
if (isDroging) {
|
||||
isDroging = false;
|
||||
(0, _utils.removeClass)($mini, 'art-mini-droging');
|
||||
if (isDragging) {
|
||||
isDragging = false;
|
||||
(0, _utils.removeClass)($mini, 'art-mini-dragging');
|
||||
const rect = (0, _utils.getRect)($mini);
|
||||
storage.set('left', rect.left);
|
||||
storage.set('top', rect.top);
|
||||
@@ -2687,8 +2687,8 @@ function thumbnailsMix(art) {
|
||||
const $thumbnails = art.controls?.thumbnails;
|
||||
const { url, scale } = option.thumbnails;
|
||||
if (!$thumbnails || !url) return;
|
||||
const isMobileDroging = type === 'played' && event && (0, _utils.isMobile);
|
||||
if (type === 'hover' || isMobileDroging) {
|
||||
const isMobileDragging = type === 'played' && event && (0, _utils.isMobile);
|
||||
if (type === 'hover' || isMobileDragging) {
|
||||
if (!loading) {
|
||||
loading = true;
|
||||
image = await (0, _utils.loadImg)(url, scale);
|
||||
@@ -2699,7 +2699,7 @@ function thumbnailsMix(art) {
|
||||
(0, _utils.setStyle)($thumbnails, 'display', 'flex');
|
||||
if (width > 0 && width < $progress.clientWidth) showThumbnails(width);
|
||||
else if (!(0, _utils.isMobile)) (0, _utils.setStyle)($thumbnails, 'display', 'none');
|
||||
if (isMobileDroging) {
|
||||
if (isMobileDragging) {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(()=>{
|
||||
(0, _utils.setStyle)($thumbnails, 'display', 'none');
|
||||
@@ -2723,9 +2723,9 @@ function thumbnailsMix(art) {
|
||||
},{"../utils":"gGxPm","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"2TEf9":[function(require,module,exports,__globalThis) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "default", ()=>attrInit);
|
||||
parcelHelpers.export(exports, "default", ()=>optionInit);
|
||||
var _utils = require("../utils");
|
||||
function attrInit(art) {
|
||||
function optionInit(art) {
|
||||
const { option, storage, template: { $video, $poster } } = art;
|
||||
for(const key in option.moreVideoAttr)art.attr(key, option.moreVideoAttr[key]);
|
||||
if (option.muted) art.muted = option.muted;
|
||||
@@ -3313,7 +3313,7 @@ function progress(options) {
|
||||
`,
|
||||
mounted: ($control)=>{
|
||||
let tipTimer = null;
|
||||
let isDroging = false;
|
||||
let isDragging = false;
|
||||
const $hover = (0, _utils.query)('.art-progress-hover', $control);
|
||||
const $loaded = (0, _utils.query)('.art-progress-loaded', $control);
|
||||
const $played = (0, _utils.query)('.art-progress-played', $control);
|
||||
@@ -3349,14 +3349,14 @@ function progress(options) {
|
||||
}
|
||||
}
|
||||
function setBar(type, percentage, event) {
|
||||
const isMobileDroging = type === 'played' && event && (0, _utils.isMobile);
|
||||
const isMobileDragging = type === 'played' && event && (0, _utils.isMobile);
|
||||
if (type === 'loaded') (0, _utils.setStyle)($loaded, 'width', `${percentage * 100}%`);
|
||||
if (type === 'hover') (0, _utils.setStyle)($hover, 'width', `${percentage * 100}%`);
|
||||
if (type === 'played') {
|
||||
(0, _utils.setStyle)($played, 'width', `${percentage * 100}%`);
|
||||
(0, _utils.setStyle)($indicator, 'left', `${percentage * 100}%`);
|
||||
}
|
||||
if (isMobileDroging) {
|
||||
if (isMobileDragging) {
|
||||
(0, _utils.setStyle)($tip, 'display', 'flex');
|
||||
const width = $control.clientWidth * percentage;
|
||||
const time = (0, _utils.secondToTime)(percentage * art.duration);
|
||||
@@ -3404,17 +3404,17 @@ function progress(options) {
|
||||
art.emit('setBar', 'hover', 0, event);
|
||||
});
|
||||
proxy($control, 'mousedown', (event)=>{
|
||||
isDroging = event.button === 0;
|
||||
isDragging = event.button === 0;
|
||||
});
|
||||
art.on('document:mousemove', (event)=>{
|
||||
if (isDroging) {
|
||||
if (isDragging) {
|
||||
const { second, percentage } = getPosFromEvent(art, event);
|
||||
art.emit('setBar', 'played', percentage, event);
|
||||
art.seek = second;
|
||||
}
|
||||
});
|
||||
art.on('document:mouseup', ()=>{
|
||||
if (isDroging) isDroging = false;
|
||||
if (isDragging) isDragging = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3502,19 +3502,19 @@ function volume(option) {
|
||||
});
|
||||
if (0, _utils.isMobile) (0, _utils.setStyle)($panel, 'display', 'none');
|
||||
else {
|
||||
let isDroging = false;
|
||||
let isDragging = false;
|
||||
proxy($slider, 'mousedown', (event)=>{
|
||||
isDroging = event.button === 0;
|
||||
isDragging = event.button === 0;
|
||||
art.volume = getVolumeFromEvent(event);
|
||||
});
|
||||
art.on('document:mousemove', (event)=>{
|
||||
if (isDroging) {
|
||||
if (isDragging) {
|
||||
art.muted = false;
|
||||
art.volume = getVolumeFromEvent(event);
|
||||
}
|
||||
});
|
||||
art.on('document:mouseup', ()=>{
|
||||
if (isDroging) isDroging = false;
|
||||
if (isDragging) isDragging = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3566,9 +3566,9 @@ function screenshot(option) {
|
||||
},{"../utils":"gGxPm","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"lTlrf":[function(require,module,exports,__globalThis) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "default", ()=>pip);
|
||||
parcelHelpers.export(exports, "default", ()=>airplay);
|
||||
var _utils = require("../utils");
|
||||
function pip(option) {
|
||||
function airplay(option) {
|
||||
return (art)=>({
|
||||
...option,
|
||||
tooltip: art.i18n.get('AirPlay'),
|
||||
@@ -4143,14 +4143,14 @@ function gestureInit(art, events) {
|
||||
if ((0, _utils.isMobile) && !art.option.isLive) {
|
||||
const { $video, $progress } = art.template;
|
||||
let touchTarget = null;
|
||||
let isDroging = false;
|
||||
let isDragging = false;
|
||||
let startX = 0;
|
||||
let startY = 0;
|
||||
let startTime = 0;
|
||||
const onTouchStart = (event)=>{
|
||||
if (event.touches.length === 1 && !art.isLock) {
|
||||
if (touchTarget === $progress) (0, _progress.setCurrentTime)(art, event);
|
||||
isDroging = true;
|
||||
isDragging = true;
|
||||
const { pageX, pageY } = event.touches[0];
|
||||
startX = pageX;
|
||||
startY = pageY;
|
||||
@@ -4158,7 +4158,7 @@ function gestureInit(art, events) {
|
||||
}
|
||||
};
|
||||
const onTouchMove = (event)=>{
|
||||
if (event.touches.length === 1 && isDroging && art.duration) {
|
||||
if (event.touches.length === 1 && isDragging && art.duration) {
|
||||
const { pageX, pageY } = event.touches[0];
|
||||
const direction = GetSlideDirection(startX, startY, pageX, pageY);
|
||||
const isHorizontal = [
|
||||
@@ -4183,11 +4183,11 @@ function gestureInit(art, events) {
|
||||
}
|
||||
};
|
||||
const onTouchEnd = ()=>{
|
||||
if (isDroging) {
|
||||
if (isDragging) {
|
||||
startX = 0;
|
||||
startY = 0;
|
||||
startTime = 0;
|
||||
isDroging = false;
|
||||
isDragging = false;
|
||||
touchTarget = null;
|
||||
}
|
||||
};
|
||||
@@ -4726,7 +4726,7 @@ class Setting extends (0, _componentDefault.default) {
|
||||
this.inactivate(item);
|
||||
Object.assign(item, target);
|
||||
this.format();
|
||||
this.creatItem(item, true);
|
||||
this.createItem(item, true);
|
||||
this.render();
|
||||
return item;
|
||||
} else return this.add(target);
|
||||
@@ -4734,11 +4734,11 @@ class Setting extends (0, _componentDefault.default) {
|
||||
add(item, option = this.option) {
|
||||
option.push(item);
|
||||
this.format();
|
||||
this.creatItem(item);
|
||||
this.createItem(item);
|
||||
this.render();
|
||||
return item;
|
||||
}
|
||||
creatHeader(item) {
|
||||
createHeader(item) {
|
||||
if (!this.cache.has(item.$option)) return;
|
||||
const $panel = this.cache.get(item.$option);
|
||||
const { proxy, icons: { arrowLeft }, constructor: { SETTING_ITEM_HEIGHT } } = this.art;
|
||||
@@ -4756,7 +4756,7 @@ class Setting extends (0, _componentDefault.default) {
|
||||
item.$parent.$events.push(event);
|
||||
(0, _utils.append)($panel, $item);
|
||||
}
|
||||
creatItem(item, isUpdate = false) {
|
||||
createItem(item, isUpdate = false) {
|
||||
if (!this.cache.has(item.$option)) return;
|
||||
const $panel = this.cache.get(item.$option);
|
||||
const oldItem = item.$item;
|
||||
@@ -4982,8 +4982,8 @@ class Setting extends (0, _componentDefault.default) {
|
||||
(0, _utils.addClass)($panel, 'art-setting-panel');
|
||||
(0, _utils.append)(this.$parent, $panel);
|
||||
(0, _utils.inverseClass)($panel, 'art-current');
|
||||
if (option[0]?.$parent) this.creatHeader(option[0]);
|
||||
for(let index = 0; index < option.length; index++)this.creatItem(option[index]);
|
||||
if (option[0]?.$parent) this.createHeader(option[0]);
|
||||
for(let index = 0; index < option.length; index++)this.createItem(option[index]);
|
||||
}
|
||||
this.resize();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user