mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
分离工具函数
This commit is contained in:
1 parent
7a84c262da
commit
8ef582f714
22 files changed
+724
-687
No files matched your search
@@ -116,7 +116,7 @@ function customPip(art, player) {
|
||||
if (value) {
|
||||
player.autoSize = false;
|
||||
cacheStyle = $player.style.cssText;
|
||||
$player.classList.add('artplayer-pip');
|
||||
addClass($player, 'artplayer-pip');
|
||||
const $body = document.body;
|
||||
setStyle($player, 'top', `${$body.clientHeight - player.height - 50}px`);
|
||||
setStyle($player, 'left', `${$body.clientWidth - player.width - 50}px`);
|
||||
@@ -127,7 +127,7 @@ function customPip(art, player) {
|
||||
art.emit('pipEnabled');
|
||||
} else if (player.pip) {
|
||||
$player.style.cssText = cacheStyle;
|
||||
$player.classList.remove('artplayer-pip');
|
||||
removeClass($player, 'artplayer-pip');
|
||||
setStyle($player, 'top', null);
|
||||
setStyle($player, 'left', null);
|
||||
player.fullscreen = false;
|
||||
|
||||
Reference in new issue
Block a user