Audiohooks not working!


#2

Thanks for posting this on the forum!

Could you check whether there’s any logs when you play the audiohooks? Something there might tell us whether there’s something going wrong.


#3

Hey Collussus.

I’m looking in the logs for the bot and I don’t see any that have been generated for the audiohook. I can tell you that when I attempt to play one and I am looking at the browser interface for the bot that it shows the audio icon in the top left of the hook interface like it’s playing, but nothing is obviously coming out of the speakers.


#4

Check that, I may be a crazy person. The day first month second setup of the events are throwing my silly American ass waaaaay off. I do see 2 logs under core-errors. Would those be the ones that you need?


#5

If there’s nothing directly showing up in the logs when you’re using it, it will be of no help. No worries though, we’ll look into this!


#6

Hi there, if I may join in: I’m experiencing the very same problem, except I wasn’t trying to connect my bot to Discord. Just like OldManSethus, audiohooks worked fine up until yesteday. All other commands still work, but if I try to make the bot play sounds, nothing comes out.

A possibly interesting thing: if you look at the Audio tab in the bot control panel, you may notice that as you try to play an audiohook, the speaker icon appears as it normally does when the bot is playing an audio, except no sound comes out AND the icon stays there undefinitely.

PhantomBot Version: 2.4.0.2
OS Version: Win 10
Java Version: 8 Update 161
Browser and Version (for Panel Support): Chrome 66.0.3359.139
Stock PhantomBot: Yes/No (Yes if you have not modified the scripts or Java Core)
No. I’ve only inserted some custom commands.


#7

Can you check the Chrome Developer Console log when you try to fire an audiohook? That may give a clue.

I tested this in my bot by clicking a button from the Panel and using my Stream Deck interface and it worked. I didn’t try from chat though. However, I am using PhantomBot 2.4.0.3 under Linux in a VPS (I see 2.4.0.2 given once), loading the Control Panel in Windows 10/Chrome 66.0.3359.139 (Official Build) (64-bit). Since I am not able to reproduce at this time, it makes it difficult to find any information to work from. We use third-party library to play audio. I am beginning to wonder if it would be better if we just swapped over to HTML5 audio instead directly which is what the alerts use for simplicity


#8

I tried playing a sound, then opened the Chrome Dev Console and found this:

ion.sound.min.js:5
The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page.


(anonymous) @ ion.sound.min.js:5
panel:1 Refused to display ‘Twitch’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.

O____O


#9

As this is a 3rd party library, we will have to see if there are patches. However, it is interesting that I am not having any issues with the audio-hooks in Chrome 66.0.3359.139.

Regarding the Twitch item, you are running an old version of PhantomBot, Twitch deprecated that version of chat. That is discussed in other posts. You would need to upgrade or just not have Twitch chat in the Control Panel.


#10

Hey IllusionaryOne. Thanks for chiming in. Just getting back now as I’ve had a busy 24 hours. So. i did as instructed and did see the same problem as Orkprof above. If there is anything I can do to help with intel please let me know. I would be more than happy to do what i can.

Thanks again for your time!

Edit: this link was also existed in the alert if it would help you unravel this particular mystery. Autoplay Policy Changes  |  Web  |  Google Developers


#11

So… uhhh. That’s weird. I just refreshed the bot interface tab of my Chrome and now they are working? I’ll be sure to post back and let you know if the problem persists and if this continues to be a workaround for it not working initially. So strange.


#12

Sorry for the constant reposts! The fix seemingly only works when i have the developers console open. I tried just opening the bot and using a hook. No dice. Tried refreshing. No dice. Opened up the console, kept it open, refreshed, and now they play. What in the name of crap?!

Edit: It would seem that you can close the console after this “fix” and everything is still working normally.


#13

Odd, when I tested mine, I just opened the Panel and tried an audiohook. Really baffling. Since I cannot reproduce it, it makes it difficult to know what to do on my side.


#14

Hey IllusionaryOne,

I’m also suddenly experiencing this issue of audiohooks suddenly not playing their sounds. As they’re only not working in Chrome (66.0.3359.139) as far as I can tell, all signs are pointing to some sort of browser issue, but I’m afraid I don’t have a way to pinpoint it either.

This is the error the console displays: The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page. https://goo.gl/7K7WLu

Thanks for your work on this.

-Victor


Audio hooks stopped working
#15

Hey guys! As we look into a fix for this, the current nightly build allows you to send audio hooks through our alerts page, which can be setup as a browser source with OBS. I would recommend updating to the latest nightly and following this guide on how to set this up.

https://community.phantombot.tv/t/obs-browser-source-for-gif-alerts-and-sound-fx/4043/2


#16

I switched to Firefox and now it’s working. So the problem must be Chrome, at least on my side.


#17

It is Chrome, due to a feature that they have implemented. It can be disabled:

Go to chrome://flags/#autoplay-policy in Chrome. Change Autoplay policy to No user gesture is required. You are then required to restart Chrome. There will be a small “requires restart” or some such button in the lower-right hand side.

Note that you can also choose to send audio hooks through the alerts page as Scania mentions earlier:

Hey guys! As we look into a fix for this, the current nightly build allows you to send audio hooks through our alerts page, which can be setup as a browser source with OBS. I would recommend updating to the latest nightly and following this guide on how to set this up.
OBS Browser Source for Gif Alerts and Sound FX

If you do not wish to update to the Nightly and are using Chrome, try the method that I mention for now.


#18

Thanks for the hard work IllusionaryOne!


#19

I believe this feature was rolled back. Not sure though.


#20

Makes sense, although only temporary - I hope they leave in place a work around. I get having an option to disable/enable auto-audio-playing but just turning it completely off? This breaks several sites that have to build up enough “cred” in the browser currently to work.


closed #21

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.