Using JavaScript for Audio Fades with #Tags #897
-
Hello! I know the basics about inky but I am not a genius when it comes to JavaScript. I used some different forums and stuff a while back to get a working play and pause sound system inside the inky html. I was wondering if there was anyway to make the audio fade out when a certain tag is called within the Ink story, like using .setVolume() or something of the likeness. This was the code I was using: else if( splitTag && splitTag.property == "FADE" ) { Every time the tag was called though, nothing happened. I read through some forums, and was wondering if I had to use something like jQuery or something else to help run the HTML. Again, I know very little about JavaScript so any help would be great. Perhaps I needed to use something else, I don't know. Please help! Below is the code I used for starting and stopping audio tracks: else if( splitTag && splitTag.property == "AUDIOLOOP" ) { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi,
Let me know if you need more help after doing these steps, or if you need help to display the console, or to hit the correct tag. I can try to help with the sound lib itself, but you will have to give me exact reference you are using. |
Beta Was this translation helpful? Give feedback.
Hello,
I greatly appreciate you taking time to answer my question. However, I did figure it out for myself a few days ago and never got around to commenting and marking this as answered. Again, I'm greatly thankful you stepped into help.
I believe the problem had to due with me misusing the tag code and the sound setting inside of it. As you were asking about my js library. When you use the export to web, inside the main.js file created inside the folder there is already the audio and audioloop code for the tags that I was using. So the sound system I had going was native to the code already, I just didn't have to change anything. This is all in the main.js.
So, the problem. I believed th…