/scripts/ahub.form.attachments.js
0

Audio file SAPUI5

May 18, 2017 at 12:19 AM

195

avatar image

Hello!

I am trying to play a *.wav sound in my SAPUI5 app. I have used

<audio id="my_audio" src="audio/mysong.wav"></audio> 

It works in webide but when I deploy my app to ABAP repository the song does not play.

Any help?

Regards.

Dinarte Neto

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Keith Nunn
May 19, 2017 at 04:53 PM
0

Hi, Dinarte.

I would suggest verifying the audio file exists at the location the app is looking for it once it's deployed. If you check the browser's developer tools you can see the network requests being made for the app. See if the request for the .wav file is calling the path you expect and that it's succeeding.

Also, in any case of difference in behaviour between WebIDE and ABAP system, it's good to verify that the UI5 version is the same. If you're building the app using 1.44 but your ABAP system is running 1.38 then there will be differences that may impact functionality.

If that doesn't help, please check the browsers console log and see if you're getting any errors when running the app.

Thanks,

Keith Nunn
SAP Product Support

Share
10 |10000 characters needed characters left characters exceeded
Kuppireddi Sireesh May 19, 2017 at 04:59 PM
0

Where is mysong.wav stored. If it in audio folder of the project. The can you reference it by the complete url starting from SAPUI5 service URL. /usr/sap/

<audio id="my_audio" src="/sap/bc/ui5_ui5/sap/<SAPUI5_ServiceName>/audio/mysong.wav"></audio>

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content