mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
27 lines
703 B
JavaScript
27 lines
703 B
JavaScript
import { append, tooltip } from '../utils';
|
|
|
|
export default function fullscreenWeb(option) {
|
|
return art => ({
|
|
...option,
|
|
tooltip: art.i18n.get('Web fullscreen'),
|
|
mounted: $control => {
|
|
const {
|
|
events: { proxy },
|
|
icons,
|
|
i18n,
|
|
player,
|
|
} = art;
|
|
|
|
append($control, icons.fullscreenWeb);
|
|
|
|
proxy($control, 'click', () => {
|
|
player.fullscreenWebToggle = true;
|
|
});
|
|
|
|
art.on('fullscreenWeb', value => {
|
|
tooltip($control, i18n.get(value ? 'Exit web fullscreen' : 'Web fullscreen'));
|
|
});
|
|
},
|
|
});
|
|
}
|