cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Personas, store a sound as resource.

emmanuelm1
Explorer
0 Kudos
567

Hello,

I want to play a specific sound on user error.

I found a way to store it on Jukehost (https://gist.github.com/Moutard3/b925b090ab1d6d20a5d20f054bae7bca#opendrive), it's working but sometimes it takes some time to play it.

Is there a way to store it as resource in the SAP server and play it?

I tried but couldn't achieve it.

Thanks,

Emmanuel.

Accepted Solutions (1)

Accepted Solutions (1)

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert

Of course.

Upload your sound file (for example in MP3 format) as a resource in Personas Administration, then refer to it via its GUID like this:

function playSound() { 
  var audio = new Audio( '/sap/bc/personas3/resource/A33EE416E8EE1EDFA9F88240268376BE'); 
  audio.play(); 
} 
playSound();
 
Brian_Wills
Contributor
I've been trying to figure this out for a long time, but it was not high priority. Works like a charm. Thanks Tamas!!
emmanuelm1
Explorer
0 Kudos
Thanks Tamas, works perfectly.

Answers (0)