mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
修复切换画质bug
This commit is contained in:
1 parent
d4b9fc4d29
commit
88533c1023
8 files changed
+116
-138
No files matched your search
@@ -32,16 +32,6 @@ function nativePip(art, player) {
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'pipToggle', {
|
||||
value: () => {
|
||||
if (player.pipState) {
|
||||
player.pipExit();
|
||||
} else {
|
||||
player.pipEnabled();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
proxy($video, 'enterpictureinpicture', () => {
|
||||
art.emit('pipEnabled');
|
||||
});
|
||||
@@ -117,6 +107,14 @@ function customPip(art, player) {
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default function pipMix(art, player) {
|
||||
if (document.pictureInPictureEnabled) {
|
||||
nativePip(art, player);
|
||||
} else {
|
||||
customPip(art, player);
|
||||
}
|
||||
|
||||
Object.defineProperty(player, 'pipToggle', {
|
||||
value: () => {
|
||||
@@ -128,11 +126,3 @@ function customPip(art, player) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default function pipMix(art, player) {
|
||||
if (document.pictureInPictureEnabled) {
|
||||
nativePip(art, player);
|
||||
} else {
|
||||
customPip(art, player);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user