mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
添加部分可配置图标
This commit is contained in:
1 parent
bdef8b311d
commit
be7b646c31
12 files changed
+72
-20
No files matched your search
@@ -87,6 +87,10 @@ class Artplayer extends Emitter {
|
||||
controls: false,
|
||||
preload: 'auto',
|
||||
},
|
||||
icons: {
|
||||
loading: '',
|
||||
playBig: '',
|
||||
},
|
||||
lang: navigator.language.toLowerCase(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ export default class Loading {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const {
|
||||
option,
|
||||
refs: { $loading },
|
||||
} = art;
|
||||
append($loading, icons.loading);
|
||||
append($loading, option.icons.loading || icons.loading);
|
||||
}
|
||||
|
||||
hide() {
|
||||
|
||||
@@ -5,9 +5,10 @@ export default class Mask {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const {
|
||||
option,
|
||||
refs: { $mask },
|
||||
} = art;
|
||||
append($mask, icons.playBig);
|
||||
append($mask, option.icons.playBig || icons.playBig);
|
||||
}
|
||||
|
||||
show() {
|
||||
|
||||
@@ -42,6 +42,12 @@ function nativePip(art, player) {
|
||||
player.play();
|
||||
}
|
||||
});
|
||||
|
||||
art.on('destroy', () => {
|
||||
if (player.pipState) {
|
||||
player.pipExit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function customPip(art, player) {
|
||||
|
||||
@@ -111,5 +111,6 @@ export default {
|
||||
},
|
||||
},
|
||||
moreVideoAttr: 'object',
|
||||
icons: 'object',
|
||||
lang: 'string',
|
||||
};
|
||||
Reference in new issue
Block a user