mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
添加muted功能
This commit is contained in:
1 parent
fa18560b2e
commit
3cd470a83c
10 files changed
+112
-70
No files matched your search
+19
-15
@@ -5,7 +5,8 @@ var art = new Artplayer({
|
||||
title: '【新海诚动画】『秒速5センチメートル』',
|
||||
poster: url + '/image/one-more-time-one-more-chance-poster.jpg',
|
||||
volume: 0.5,
|
||||
autoplay: true,
|
||||
muted: false,
|
||||
autoplay: false,
|
||||
pip: true,
|
||||
autoSize: true,
|
||||
screenshot: true,
|
||||
@@ -96,20 +97,23 @@ 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();
|
||||
}
|
||||
art.on('firstCanplay', () => {
|
||||
art.on('resize', $player => {
|
||||
art.controls.quality.show();
|
||||
art.controls.setting.show();
|
||||
art.controls.subtitle.show();
|
||||
art.controls.pip.show();
|
||||
|
||||
if (playerWidth < 360) {
|
||||
art.controls.subtitle.hide();
|
||||
art.controls.pip.hide();
|
||||
}
|
||||
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