Forum Discussion

JooPaulo-862a41's avatar
JooPaulo-862a41
Community Member
2 years ago

New background audio feature

Hello everyone, in the attached file I created an audio volume using Javascript. Everything works fine when the audio is inserted directly into the slide, but when I add the Slider and triggers on the master slide the volume stops working using the new background audio feature. Can anyone help me with this please? Thanks!
Here's the Javascript I'm using.

var player = GetPlayer();
 var _volume = player.GetVar("HotspotSliderValue")/10;
 console.log("vol: "+_volume);
                     

var allAudios = document.getElementsByTagName("audio");
if (allAudios[0].volume >= 0) {
 for (var a = 0; a < allAudios.length; a++) {
 allAudios[a].volume = 0.5;
 }
 }

No RepliesBe the first to reply