Skip to content

Commit 04c97b5

Browse files
committed
wait 2 seconds when play cards without audio
1 parent c535d1a commit 04c97b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/YdCard.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ var playAnimation = function(context) {
115115
}
116116
}
117117
}
118+
if (context.classware.mute || context.card.audios.length === 0) {
119+
audioPromise = audioPromise.then(() => {
120+
return Utils.waitForSeconds(2)
121+
})
122+
}
118123
119124
// Swing if set to or wait
120125
let animationPromise = Utils.emptyPromise()

0 commit comments

Comments
 (0)