New Feature: Audio Component

Need help configuring the source to be a file on the local hardrive of the computer where the gateway resides. I have tried using “https://localhost/c:/Sound/Alarm10.wav” and doesn’t work.
I have tested with a URL from a website and works good.

Hi @rbalderrama,

Looks like the path provided is not where the audio file actually is. If you need to use local file paths I’d suggest trying file:///<image path> (you can open an audio file with a browser and inspect the URL for reference); otherwise, you can upload the file onto WebDev and reference it that way.

Hi I am transforming my iFrames to this component because it looks more suited but I have the same problem with the source.

I used File:/// but it is not doing anything.

The exact link works when entered in a browser directly.

Am I missing something? Thanks :slight_smile:

Hi @jeffrey.boey,

Do you see anything in the browser’s console. I haven’t had a chance to test this personally, but my hunch is this is probably some security measure to prevent users from arbitrarily loading files, or the file path isn’t resolving correctly. If possible, I recommend using the WebDev module to store your audio files. If for whatever reason, that is not possible, I can ask the team to see if there are other options. Thanks.

If you store the audio as blob data in a database, my Blob Server module should be able to deliver it.

Hi Ayu, Thanks for the tip, I checked the console and you were right, the server is preventing me from loading a file from it’s directory directly, image below:

My company does not have the WebDev module, I’ll try to talk to them to and see if we can get it but it’ll take sometime for the gears to turn, in the meantime, are there other solutions? I am trying to avoid using iframe as java seems to lock down files after being played and I can’t delete them unless I restart the gateway…

I’ll look into storing audio as blob, but Ideally a file is still much more easier to manage, especially if it needs to be used by other applications. Thanks

Hi @jeffrey.boey,

I’m not aware of any other solutions other than the ones listed above. Let me get in touch with the team to see if there are other avenues available or if this is a feature we can potentially implement. Thanks!

Hi folks, just to update, we tried the WebDev Module on trial mode and it’s a good workaround with the folder mount function, solved all our problem

It does however adds alot to the budget to get the WebDev licences, especially since we are only using it to access local gateway files (and we do have a lot of gateways), so I hope there is a way around the security issue.

I’ll also look into @pturmel 's solution in using Blob from the database :slight_smile:

Thanks for the help :v:

Can you try copying your files to:
C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main\YourFolder

and using the url:
http://<Ignition IP or hostname>:8088/main/YourFolder/YourAudio.wav

This is how we store cached versions of map tiles locally without webdev, but i believe this might be wiped when upgrading? Not sure… However we recently did a patch update from 8.1.9? to 8.1.15 and these files weren’t deleted.

@Paul.Scott had some words around this here:

I agree though that the web dev module is expensive when you have a very basic use for it

I have a solution for that, i made a seperate post so people will find it easier when having the same problem