Forum Discussion
GSAP timeline to speedup / slowdown any animations on it
Thank you very much Math,
I have a conflict with the background audio help, since also within my functionalities I added to be able to speed up the voiceover audio (https://community.articulate.com/discussions/articulate-storyline/can-you-speed-up-the-player-in-articulate-360?page=3), however, when I do this, it also speeds up my background audio.
Can you help me to find the solution in the java so that it does not take the background audio speed.
My code:
speed up audio
var allAudios = document.getElementsByTagName("audio");
for (var i = 0; i < allAudios.length; i++) {
allAudios[i].playbackRate = 1.25;
}
slow down audio
var allAudios = document.getElementsByTagName("audio");
for (var i = 0; i < allAudios.length; i++) {
allAudios[i].playbackRate = 0.5;
}
Audio background
//load the scripts dynamically into the head of the document
function add_line() {
var line = document.createElement("audio");
var head=document.getElementsByTagName('body')[0];
line.type = "audio/mp3";
line.src="";
line.id="bgSong" ;
line.autoplay = true;
line.loop = true;
head.appendChild(line);
}
//but we only want to add these once!
if(document.getElementById('bgSong')==null){
add_line();
var audio = document.getElementById('bgSong');
audio.volume = 0.5;
}
play audio background
var audio = document.getElementById('bgSong');
audio.src="story_content/external_files/MusicaDiversidad.mp3";
audio.load();
audio.play();
I hope you can help me
Thanks
Please add a sample then i check it out.
- AlheliRiosIxta4 years agoCommunity Member
Hi Math,
Hope you find the solution in the java so that it does not take the background audio speed, also I would like the speed respect in the other slides, because I keep continuing the slides I need to set up the velocity in each one.
I wish I had knowledge of java, but this time it's beyond my knowledge.
Thanks for the support!
Related Content
- 8 months ago
- 10 months ago