MP3 resources won't play

MP3 resources won't play

  

Hey guys. I am new into app development and used OutSystems to create an App that's purpose is to select one item in a list and play a soundfile.


I have the list with 20 items and 20 playbuttons. I also have 20 different soundfiles in the resources.

I have them on "Deploy to target direction" and for every list item I use a javascript code that is supposed to play the files. i will copy-paste it here.

function Sound(source,volume,loop)
{
    this.source=source;
    this.volume=volume;
    this.loop=loop;
    var son;
    this.son=son;
    this.finish=false;
    this.stop=function()
    {
        document.body.removeChild(this.son);
    }
    this.start=function()
    {
        if(this.finish)return false;
        this.son=document.createElement("embed");
        this.son.setAttribute("src",this.source);
        this.son.setAttribute("hidden","true");
        this.son.setAttribute("volume",this.volume);
        this.son.setAttribute("autostart","true");
        this.son.setAttribute("loop",this.loop);
        document.body.appendChild(this.son);
    }
    this.remove=function()
    {
        document.body.removeChild(this.son);
        this.finish=true;
    }
    this.init=function(volume,loop)
    {
        this.finish=false;
        this.volume=volume;
        this.loop=loop;
    }
}
var foo=new Sound("url",100,true);
foo.start();
foo.stop();
foo.start();
foo.init(100,false);
foo.remove();

For URL I put the path of the sound files


I have no idea why but if i download the app in the play store (everything alright there) it doesnt work.


Thanks for every help

Hey Paul,

Any js errors? Can you try to get an .oml example with just this use case?

Have you seen this component?

Cheers