mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
添加Demo自适应
This commit is contained in:
1 parent
e9d7c0cfdc
commit
f75e01be3b
8 files changed
+65
-13
No files matched your search
@@ -95,3 +95,21 @@ var art = new Artplayer({
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
art.on('resize', $player => {
|
||||
art.controls.quality.show();
|
||||
art.controls.setting.show();
|
||||
art.controls.subtitle.show();
|
||||
art.controls.pip.show();
|
||||
|
||||
var playerWidth = $player.clientWidth;
|
||||
if (playerWidth < 480) {
|
||||
art.controls.quality.hide();
|
||||
art.controls.setting.hide();
|
||||
}
|
||||
|
||||
if (playerWidth < 360) {
|
||||
art.controls.subtitle.hide();
|
||||
art.controls.pip.hide();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user