添加部分可配置图标

This commit is contained in:
Harvey Zack committed 2018-11-24 10:23:04 +08:00
1 parent bdef8b311d
commit be7b646c31
12 files changed
+72 -20

No files matched your search

+4
View File
@@ -87,6 +87,10 @@ class Artplayer extends Emitter {
controls: false,
preload: 'auto',
},
icons: {
loading: '',
playBig: '',
},
lang: navigator.language.toLowerCase(),
};
}
+2 -1
View File
@@ -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() {
+2 -1
View File
@@ -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() {
+6
View File
@@ -42,6 +42,12 @@ function nativePip(art, player) {
player.play();
}
});
art.on('destroy', () => {
if (player.pipState) {
player.pipExit();
}
});
}
function customPip(art, player) {
+1
View File
@@ -111,5 +111,6 @@ export default {
},
},
moreVideoAttr: 'object',
icons: 'object',
lang: 'string',
};