简化player接口

This commit is contained in:
Harvey Zack committed 2019-06-06 10:37:57 +08:00
1 parent 1b69b28ba1
commit 52b6693da2
41 files changed
+624 -690

No files matched your search

+7 -5
View File
@@ -1,10 +1,12 @@
export default function toggleMix(art, player) {
Object.defineProperty(player, 'toggle', {
value: () => {
if (player.playing) {
player.pause();
} else {
player.play();
set(value) {
if (value) {
if (player.playing) {
player.pause = true;
} else {
player.play = true;
}
}
},
});