mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 18:11:20 -08:00
20 lines
519 B
JavaScript
20 lines
519 B
JavaScript
import { append, tooltip } from '../utils';
|
|
|
|
export default function pip(controlOption) {
|
|
return art => ({
|
|
...controlOption,
|
|
mounted: $control => {
|
|
const {
|
|
events: { proxy },
|
|
i18n,
|
|
player,
|
|
} = art;
|
|
const $pip = append($control, art.icons.pip);
|
|
tooltip($pip, i18n.get('Mini player'));
|
|
proxy($control, 'click', () => {
|
|
player.pipEnabled();
|
|
});
|
|
},
|
|
});
|
|
}
|