mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 00:56:16 -08:00
22 lines
588 B
JavaScript
22 lines
588 B
JavaScript
import { append, tooltip } from '../utils';
|
|
import icons from '../icons';
|
|
|
|
export default function screenshot(controlOption) {
|
|
return art => ({
|
|
...controlOption,
|
|
mounted: $control => {
|
|
const {
|
|
events: { proxy },
|
|
i18n,
|
|
player,
|
|
} = art;
|
|
|
|
const $screenshot = append($control, icons.screenshot);
|
|
tooltip($screenshot, i18n.get('Screenshot'));
|
|
proxy($screenshot, 'click', () => {
|
|
player.screenshot();
|
|
});
|
|
},
|
|
});
|
|
}
|