This Sound component is best for short sound files, such as sound effects, while the Player component is more efficient for longer sounds, such as songs.
You might get an error if you attempt to play a sound immediately after setting the source.
Where did the file come from and how did it get to the directory ASD?
If you have it, it is assets, I think it is not necessary to specify the full path, just put the name of the mp3 file
what happens if you use the player component?
in case it does not work, show us an updated screenshot of your relevant blocks including Do it result of the path to the sound to play
Taifun
@sadid_al_Mannan can you please provide a minimal project to reproduce the issue? I’m not able to replicate it, so I believe I may be missing something.
According to your blocks it does not work for the full path… so my guess is, it works with the absolute path, i.e without the leading file://
Welcome back @bodymindpower !
To give a quick update on this issue: I’ve traced down the issue, and it’s not really related with the Sound component, but the MediaUtil helper. We’ve modified it and there is one kind of MediaSource which are not handled (that’s why the Sound component raises the error).
I didn’t really test all source types, but my guess is that by tricking the MediaUtil to think the source is a different one, it forces it to fall into a handled one.
As mentioned in this comment, this bug will be fixed in Kodular sources. Despite that PR introduces a few new blocks to App Inventor sources from Kodular, the bug is not present in those changes.
This extension is exactly the Sound component (it will even appear in the Media category), but with the mentioned bugfix. The bugfix will be included in the next release, but in the meantime, you may want to use the extension as a temporary solution.