修改包管理

This commit is contained in:
Harvey Zack committed 2018-11-07 17:12:42 +08:00
1 parent c5c673ae79
commit 0aa018db6d
99 files changed
+70 -70

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
export default function playMix(art, player) {
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);
});
}
if (mutex) {
art.constructor.instances
.filter(item => item !== art)
.forEach(item => item.player.pause());
}
notice.show(i18n.get('Play'));
art.emit('play', $video);
}
});
}