mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
update setting
This commit is contained in:
1 parent
5bd2de4179
commit
018b556d6b
6 files changed
+102
-82
No files matched your search
@@ -4291,6 +4291,18 @@
|
||||
horizontal: 'Horizontal',
|
||||
vertical: 'Vertical'
|
||||
};
|
||||
|
||||
function update($panel, item, value) {
|
||||
item.$desc.innerText = i18n.get(keys[value]);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return item.dataset.value === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: 200,
|
||||
html: i18n.get('Video Flip'),
|
||||
@@ -4307,16 +4319,9 @@
|
||||
art.flip = item.value;
|
||||
},
|
||||
mounted: function mounted($panel, item) {
|
||||
item.$desc.innerText = i18n.get(keys[art.flip]);
|
||||
art.on('flip', function (value) {
|
||||
item.$desc.innerText = i18n.get(keys[art.flip]);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return item.dataset.value === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
update($panel, item, art.flip);
|
||||
art.on('flip', function () {
|
||||
update($panel, item, art.flip);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -4330,6 +4335,17 @@
|
||||
return value === 'default' ? i18n.get('Default') : value;
|
||||
}
|
||||
|
||||
function update($panel, item, value) {
|
||||
item.$desc.innerText = getI18n(value);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return item.dataset.value === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: 200,
|
||||
html: i18n.get('Aspect Ratio'),
|
||||
@@ -4346,16 +4362,9 @@
|
||||
art.aspectRatio = item.value;
|
||||
},
|
||||
mounted: function mounted($panel, item) {
|
||||
item.$desc.innerText = getI18n(art.aspectRatio);
|
||||
art.on('aspectRatio', function (value) {
|
||||
item.$desc.innerText = getI18n(art.aspectRatio);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return item.dataset.value === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
update($panel, item, art.aspectRatio);
|
||||
art.on('aspectRatio', function () {
|
||||
update($panel, item, art.aspectRatio);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -4369,6 +4378,17 @@
|
||||
return value === 1.0 ? i18n.get('Normal') : value;
|
||||
}
|
||||
|
||||
function update($panel, item, value) {
|
||||
item.$desc.innerText = getI18n(value);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return Number(item.dataset.value) === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: 200,
|
||||
html: i18n.get('Play Speed'),
|
||||
@@ -4385,16 +4405,9 @@
|
||||
art.playbackRate = item.value;
|
||||
},
|
||||
mounted: function mounted($panel, item) {
|
||||
item.$desc.innerText = getI18n(art.playbackRate);
|
||||
art.on('playbackRate', function (value) {
|
||||
item.$desc.innerText = getI18n(art.playbackRate);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return Number(item.dataset.value) === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
update($panel, item, art.playbackRate);
|
||||
art.on('playbackRate', function () {
|
||||
update($panel, item, art.playbackRate);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -4408,6 +4421,17 @@
|
||||
return value === 0 ? i18n.get('Normal') : value;
|
||||
}
|
||||
|
||||
function update($panel, item, value) {
|
||||
item.$desc.innerText = getI18n(value);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return Number(item.dataset.value) === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: 200,
|
||||
html: i18n.get('Subtitle Offset'),
|
||||
@@ -4424,16 +4448,9 @@
|
||||
art.subtitleOffset = item.value;
|
||||
},
|
||||
mounted: function mounted($panel, item) {
|
||||
item.$desc.innerText = getI18n(art.subtitleOffset);
|
||||
art.on('subtitleOffset', function (value) {
|
||||
item.$desc.innerText = getI18n(art.subtitleOffset);
|
||||
var $current = queryAll('.art-setting-item', $panel).find(function (item) {
|
||||
return Number(item.dataset.value) === value;
|
||||
});
|
||||
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
update($panel, item, art.subtitleOffset);
|
||||
art.on('subtitleOffset', function () {
|
||||
update($panel, item, art.subtitleOffset);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user