How can I implement the Playsound() function in InTouch Webclient to play audio files?
How can I implement the Playsound() function in InTouch Webclient to play audio files?
Hi, i believe this should cover it
https://docs.aveva.com/bundle/intouch-hmi/page/313527.html
It's done on the application. Will it work on a web client ? I don't know the answer, have you tried the above ?
Hi,
Thanks Rainer, It is a valid suggestion, even for InTouch Web.
You need to make sure your script execution is within an Industrial Graphics Symbol for it to be available in the webclient.
It even works if the client is from a remote computer, (one would think the local reference could be a challenge).
edit! It will still play the sound on the machine hosting the application, not the client
Keep in mind that if you are using InTouch OMI Web it will not work du to other limitations.
Perhaps this will change in the future, but as Rainers suggestion is working, I hope you are happy with the proposed solution.
Yes, our test is that the sound played is only on the server side, but how can it be made on the web client side? the web client and server are not one computer node
I do not believe it will work for InTouch Web, since scripts are executed on the server. We foresee shifting script execution to the client in the future, and as we do so we need to ensure that resources such as that wav file may be attached to the client-side payload.
I do not believe it will work for InTouch Web, since scripts are executed on the server. We foresee shifting script execution to the client in the future, and as we do so we need to ensure that resources such as that wav file may be attached to the client-side payload.
Richard, thank you for your response. I hope that the web client's functionality can be more comprehensive in the future.
It will be and you can expect big improvements to the web client over the next several releases.
BTW, I can confirm that PlaySound() is currently not supported by the web client. See Known limitations
My test environment is SP 2023 R2 SP1 P01 and VMWare.
I added a button with playsound() scripts in the application in VM, and it can work in web client from my host laptop.
Hi zhen shang and rickard.norin Playsound function is working on the web client but only web server side which maybe the reason why AVEVA says not supported.
Yes, I think Rainer has it right. I wouldn't expect it to work when accessing the web server remotely.
I think this audio file is only played on the server side. In your environment, the device that the sound device is only your host. Therefore, you may mistakenly think that the sound is emitted by the web client.
You are correct!
Playsound() will play a sound from on a InTouch Web application, but it will play it on the server (!)
My bad for not noticing this, that's the downside of testing in a local lab environment.
It will play even if the server does not have any application running. A fun effect, but not so practical.
I have updated my original post, and as noted, the result is that its not possible to do this using the PlaySound() fuction if the intention is to use a web client to access the application.
And as Rickard noted, the mechanism conflicts with the web based server-client way of developing.
Perhaps a workaround is to create a webwidget that supports this, but still, no native solution available at the moment.