格式化

This commit is contained in:
Harvey Zack committed 2018-11-21 19:45:44 +08:00
1 parent 0454f785be
commit 203ad0d3a0
75 files changed
+3120 -2904

No files matched your search

+22 -19
View File
@@ -1,24 +1,27 @@
export default function playMix(art, player) {
const { refs: { $video }, i18n, notice, option: { mutex } } = art;
const {
refs: { $video },
i18n,
notice,
option: { mutex },
} = art;
Object.defineProperty(player, 'play', {
value: () => {
const promise = $video.play();
if (promise !== undefined) {
promise.then().catch(err => {
notice.show(err, true, 3000);
console.warn(err);
});
}
Object.defineProperty(player, 'play', {
value: () => {
const promise = $video.play();
if (promise !== undefined) {
promise.then().catch(err => {
notice.show(err, true, 3000);
console.warn(err);
});
}
if (mutex) {
art.constructor.instances
.filter(item => item !== art)
.forEach(item => item.player.pause());
}
if (mutex) {
art.constructor.instances.filter(item => item !== art).forEach(item => item.player.pause());
}
notice.show(i18n.get('Play'));
art.emit('play');
}
});
notice.show(i18n.get('Play'));
art.emit('play');
},
});
}