Play audio/sound not possible in Chrome/Firefox

Description

I'm trying to play a sound on the webui using the following code:
Audio audio = new Audio(ThemeManager.getThemeResource("audio/bing.mp3"));
component.appendChild(audio);
audio.play();

But the result i get is the error message from the images i attached (first is chrome, second is firefox). The sound is then not played but chrome downloads the mp3 file automatically.

I searched for an hour and the only solution i found, which works at least for chrome, is to make some changes to the zk.xml. I attached a patch and now the error message is gone.
However, the sound i only played in chrome. Firefox doesn't throw an error anymore but i also cannot hear the sound.

If you have a better solution, please tell me. Otherwise, we can maybe test the patch and apply it to the trunk.

Environment

iDempiere Release 2.0 + Chrome

Activity

Show:
Carlos Ruiz
December 23, 2014, 9:08 PM

, could you please check in the zk7 branch if the behavior is the same, or is it fixed there?

Murilo Habermann Torquato
July 18, 2017, 6:41 PM
Edited

Hi Carlos and Jan,

I tested a sound play with release 4.1 (newest changeset) branch and everything worked fine (tested on chrome and firefox), so i think that this issue can be closed.

Carlos Ruiz
July 18, 2017, 6:50 PM

Thanks

Assignee

Murilo Habermann Torquato

Reporter

Jan Thielemann

Labels

Tested By

None

Components

Fix versions

Affects versions

Priority

Major
Configure