mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
V5 (#500)
* update dep * Update package.json * update contextmenu * update d.ts * update onVttLoad * build artplayer * update style * --art-theme * update style * update style * update user-select * add getIcon * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * add progress-hover * update mini * update style * update style * update style * update style * update style * update volume * update style * add art-backdrop * update style * update style * update style * update currentLevel * update artplayerPluginControl * update artplayerPluginDanmuku * Update package.json
This commit is contained in:
1 parent
af12bd9634
commit
7b53de941d
80 files changed
+1393
-1362
No files matched your search
@@ -6,13 +6,14 @@ export default function aspectRatio(option) {
|
||||
i18n,
|
||||
constructor: { ASPECT_RATIO },
|
||||
} = art;
|
||||
|
||||
const html = ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === 'default' ? i18n.get('Default') : item}</span>`,
|
||||
).join('');
|
||||
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get('Aspect Ratio')}:
|
||||
${ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === 'default' ? i18n.get('Default') : item}</span>`,
|
||||
).join('')}
|
||||
`,
|
||||
html: `${i18n.get('Aspect Ratio')}: ${html}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -22,7 +23,9 @@ export default function aspectRatio(option) {
|
||||
},
|
||||
mounted: ($panel) => {
|
||||
const $default = query('[data-value="default"]', $panel);
|
||||
if ($default) inverseClass($default, 'art-current');
|
||||
if ($default) {
|
||||
inverseClass($default, 'art-current');
|
||||
}
|
||||
art.on('aspectRatio', (value) => {
|
||||
const $current = queryAll('span', $panel).find((item) => item.dataset.value === value);
|
||||
if ($current) {
|
||||
|
||||
@@ -7,11 +7,11 @@ export default function flip(option) {
|
||||
constructor: { FLIP },
|
||||
} = art;
|
||||
|
||||
const html = FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join('');
|
||||
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get('Video Flip')}:
|
||||
${FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join('')}
|
||||
`,
|
||||
html: `${i18n.get('Video Flip')}: ${html}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -21,7 +21,9 @@ export default function flip(option) {
|
||||
},
|
||||
mounted: ($panel) => {
|
||||
const $default = query('[data-value="normal"]', $panel);
|
||||
if ($default) inverseClass($default, 'art-current');
|
||||
if ($default) {
|
||||
inverseClass($default, 'art-current');
|
||||
}
|
||||
art.on('flip', (value) => {
|
||||
const $current = queryAll('span', $panel).find((item) => item.dataset.value === value);
|
||||
if ($current) {
|
||||
|
||||
@@ -7,13 +7,13 @@ export default function playbackRate(option) {
|
||||
constructor: { PLAYBACK_RATE },
|
||||
} = art;
|
||||
|
||||
const html = PLAYBACK_RATE.map(
|
||||
(item) => `<span data-value="${item}">${item === 1 ? i18n.get('Normal') : item.toFixed(1)}</span>`,
|
||||
).join('');
|
||||
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get('Play Speed')}:
|
||||
${PLAYBACK_RATE.map(
|
||||
(item) => `<span data-value="${item}">${item === 1 ? i18n.get('Normal') : item}</span>`,
|
||||
).join('')}
|
||||
`,
|
||||
html: `${i18n.get('Play Speed')}: ${html}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
|
||||
Reference in new issue
Block a user