mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
规范化play方法
This commit is contained in:
1 parent
11e871ddc8
commit
c5c4cf73eb
29 files changed
+81
-623
No files matched your search
@@ -2,13 +2,11 @@ import { def } from '../utils';
|
||||
|
||||
export default function toggleMix(art, player) {
|
||||
def(player, 'toggle', {
|
||||
set(value) {
|
||||
if (value) {
|
||||
if (player.playing) {
|
||||
player.pause = true;
|
||||
} else {
|
||||
player.play = true;
|
||||
}
|
||||
value() {
|
||||
if (player.playing) {
|
||||
player.pause();
|
||||
} else {
|
||||
player.play();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user