mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 10:01:20 -08:00
25 lines
509 B
JavaScript
25 lines
509 B
JavaScript
import { def } from '../utils';
|
|
|
|
export default function pauseMin(art, player) {
|
|
const {
|
|
template: { $video },
|
|
i18n,
|
|
notice,
|
|
} = art;
|
|
|
|
def(player, 'pause', {
|
|
get() {
|
|
return $video.paused;
|
|
},
|
|
set(value) {
|
|
if (value) {
|
|
$video.pause();
|
|
notice.show = i18n.get('Pause');
|
|
art.emit('pause');
|
|
} else {
|
|
player.play = true;
|
|
}
|
|
},
|
|
});
|
|
}
|