mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
build all packages
This commit is contained in:
1 parent
97646bc729
commit
44ca79ef62
15 files changed
+69
-58
No files matched your search
@@ -2,7 +2,7 @@ export default function switchMix(art, player) {
|
||||
const { i18n, notice, option } = art;
|
||||
|
||||
Object.defineProperty(player, 'switchQuality', {
|
||||
value: (url, name = 'unknown') => {
|
||||
value: (url, name) => {
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
const { currentTime, playing } = player;
|
||||
@@ -16,7 +16,9 @@ export default function switchMix(art, player) {
|
||||
if (playing) {
|
||||
player.play = true;
|
||||
}
|
||||
notice.show(`${i18n.get('Switch video')}: ${name}`);
|
||||
if (name) {
|
||||
notice.show(`${i18n.get('Switch video')}: ${name}`);
|
||||
}
|
||||
art.emit('switch', url);
|
||||
});
|
||||
}
|
||||
@@ -25,7 +27,7 @@ export default function switchMix(art, player) {
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'switchUrl', {
|
||||
value: (url, name = 'unknown') => {
|
||||
value: (url, name) => {
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
const { playing } = player;
|
||||
@@ -39,7 +41,9 @@ export default function switchMix(art, player) {
|
||||
if (playing) {
|
||||
player.play = true;
|
||||
}
|
||||
notice.show(`${i18n.get('Switch video')}: ${name}`);
|
||||
if (name) {
|
||||
notice.show(`${i18n.get('Switch video')}: ${name}`);
|
||||
}
|
||||
art.emit('switch', url);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user