I have recently joined App Inventor and I tried following the tutorial "Hello Purr" and followed it exactly but I can't get audio to play. It's not muted and I previewed the sound and it works. I'm on Chrome. I'm trying to get it so that if I press a button it plays music. It has nothing to do with the length either, because I tried a 1 second audio file and it still didn't work. I set the parent for the audio file and everything. This is all the code I used:
Download the MIT App Inventor Companion from Google Play Store onto your phone. From within App Inventor, you can then run your App directly on the phone via the Companion.
Do you mean within the IDE, in the Designer? It is because that is for your GUI (Graphical User Interface) design alone. To make that work live would be a behemoth. However, with the App running in the Companion, you can make changes in the Designer and up date the App with a simple "Refresh" command from the menu. This is by far the best way because you need to know how well your App works on an Android device.
Just select the player component from the media drawer and drag it into your project. Apply your source and other blocks using the blocks available with the player.