mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 12:41:20 -08:00
22 lines
490 B
JavaScript
22 lines
490 B
JavaScript
import { append, tooltip } from '../utils';
|
|
import icons from '../icons';
|
|
|
|
export default class Pip {
|
|
constructor(option) {
|
|
this.option = option;
|
|
}
|
|
|
|
apply(art, $control) {
|
|
const {
|
|
events: { proxy },
|
|
i18n,
|
|
player,
|
|
} = art;
|
|
this.$pip = append($control, icons.pip);
|
|
tooltip(this.$pip, i18n.get('Mini player'));
|
|
proxy($control, 'click', () => {
|
|
player.pipEnabled();
|
|
});
|
|
}
|
|
}
|