Skip to content

Commit

Permalink
Merge pull request #2897 from entrylabs/issue/7957
Browse files Browse the repository at this point in the history
[WIP] issue/7957
  • Loading branch information
leunge authored Jan 7, 2025
2 parents c0ee574 + 2764f60 commit a5e27b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/playground/block_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2709,11 +2709,14 @@ function getBlocks() {
const sounds = sprite.parent.sounds;
const isExist = Entry.isExist(soundId, 'id', sounds);
if (isExist) {
const duration = Math.floor(
(sound.duration * 1000) / Entry.playbackRateValue
);
const instance = Entry.Utils.playSound(soundId);
Entry.Utils.addSoundInstances(instance);
setTimeout(() => {
script.playState = 0;
}, sound.duration * 1000);
}, duration);
}
return script;
} else if (script.playState === 1) {
Expand Down

0 comments on commit a5e27b0

Please sign in to comment.