Hi Adnan
I have prepared this complete Jmix 1.5.x audio demo project for you:
classicaudio.zip (99.7 KB)
I copied it from my project, so it has some additional code in it for my real application’s user resource management. In my real application each user has a Membership instance that manages and stores their available resource limits dependent upon their subscription. For example, I continuously calculate how much file space they use, dependent upon the MP3 file(s) that they upload. This information is stored in a Membership entity, which I did not include in this demo. To properly do this, it is necessary for me to re-calculate this information if the user uploads and then discards this newly uploaded file and then uploads a second choice, before they actually save the entity. This use case makes the code more complex. Furthermore, I have an entity listener that checks if the actual stored file needs to be deleted when the entity is deleted and the amount of remaining file space is re-calculated within the listener. If the user is deleted, then I must also ensure that his/her uploaded file(s) are deleted and the listener also performs this function when the delete is cascaded to the Instrument entity. Therefore, you should consider this in your application. You may find all of this extra resource management code useful (or maybe not).
I hope that this helps. Good luck.
Best regards
Chris