修复切换画质bug

This commit is contained in:
Harvey Zack committed 2018-11-22 13:16:00 +08:00
1 parent d4b9fc4d29
commit 88533c1023
8 files changed
+116 -138

No files matched your search

+8 -18
View File
@@ -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);
}
}