Garry's Mod

Garry's Mod

[E2] WebAudio
72 条留言
niko 1 月 24 日 上午 11:09 
For some reason, a webAudio object can be created from "https://myinstants.com/media/sounds/taco-bell-bong-sfx.mp3" (whitelisted) but not from "https://trekcore.com/audio/aliensounds/alien_door01.mp3" (also whitelisted). Any idea why? I'm not seeing any errors in console.
kyiscray 2023 年 7 月 5 日 下午 7:18 
when i try to make the audio 4d, it errors. even when i tried reinstalling webaudio it wont load sound in 4d :( i was really hoping to make a timed audio channel in a loaded html website hosting a minecraft server yesterday
Vurv  [作者] 2023 年 7 月 5 日 下午 6:25 
Should be fixed now
[DSTM] Naki 2023 年 7 月 5 日 上午 6:00 
so what ever you changed broke it
[DSTM] Naki 2023 年 7 月 5 日 上午 6:00 
alright confirmation, wa is no longer recognized as an extension, it's not on the list anymore, which is why the functions are gone
[DSTM] Naki 2023 年 7 月 4 日 下午 11:09 
When i wrote that, all of the functions were gone, not sure about now
Vurv  [作者] 2023 年 7 月 4 日 下午 9:21 
Wut
[DSTM] Naki 2023 年 7 月 4 日 上午 3:35 
all functions are gone again
Vurv  [作者] 2023 年 6 月 17 日 下午 11:18 
Make sure the dropbox link is valid, I know it's annoying to get the proper url
Remmy 2023 年 6 月 17 日 上午 1:08 
No other links work, aside from discord (If whitelisted).
Remmy 2023 年 6 月 12 日 下午 11:48 
Whenever I try playing a dropbox sound, it with returns this in console BASS_ERROR_FILEOPEN
Vurv  [作者] 2023 年 4 月 19 日 下午 9:43 
What are you even talking about?
Sanders 2023 年 4 月 17 日 下午 8:11 
sooo i cant use this for making a radio? then why is this here?
Vurv  [作者] 2023 年 3 月 11 日 上午 12:17 
I unwhitelisted discord because of security reasons (discord blocks steam http headers so there's no way for my security check to work on it.). Tell rubat to add a way to remove that header so we can request discord links.
Nova Astral 2023 年 3 月 9 日 上午 11:19 
what kind of tests did you do for checking discord, because adding it back to the whitelist (removing the comment) works perfectly fine
Match Grade 2023 年 2 月 23 日 下午 10:25 
what is the syntax for the whitelist file?
the file doesn't exist on either my server or client machine
Vurv  [作者] 2023 年 2 月 8 日 下午 7:14 
Check your console to see if the stream errored. It automatically marks it as invalid if it encounters an error while playing the audio on your client, also an issue on the github would be appreciated (with reproducible code)
G men 2023 年 2 月 8 日 上午 10:34 
and when they're also in if conditions
G men 2023 年 2 月 8 日 上午 10:32 
for some reason, the streams don't work for me when they aren't looped
Vurv  [作者] 2023 年 1 月 27 日 下午 4:36 
You need to elaborate how it "stopped working". Please make a github issue, or join the discord and explain.

The addon hasn't been updated in 5 months, so.
Dremker_Vờyҝ07 2023 年 1 月 26 日 上午 8:31 
After the latest updates, it stopped working, can you fix it? Writes time out to the console.
Vurv  [作者] 2022 年 11 月 24 日 下午 1:56 
I'm not entirely sure, prob something to do with if it's mono audio, I know for sure one source that doesn't work with webaudio right now is mattjeanes' ytdl api, which outputs mp3s that don't support 3D mode.
Rezerkity 2022 年 11 月 24 日 上午 3:35 
Can you give me information on which audio file types function in 3D?
Vurv  [作者] 2022 年 11 月 23 日 下午 11:47 
That error is because webaudio needs to format the streams in 3D mode in order to use things like setPos, direction, etc, and the given audio format you sent can't be played in 3D mode, unfortunately.

It'd need quite the refactor to allow for creating either 3D or 2D mode webaudios. I didn't want to design it like this in the first place because I knew if I did, people would ask why 3D-only functions weren't working for their 2D-mode streams..
neru 2022 年 11 月 23 日 下午 7:47 
I keep getting the BASS_ERROR_NO3D error, any idea as to why that could be?
Vurv  [作者] 2022 年 11 月 20 日 下午 6:23 
Tried it in game, made a webaudio object with an invalid url which would give BASS_ERROR_FILEFORM, and it recycles the webaudio id so I get more streams to use. Are you on the latest version of webaudio?
Rezerkity 2022 年 11 月 20 日 下午 4:49 
Purge doesn't do anything for me online, but I imagine it works in singleplayer. My issue is that once a link errors, such as the constant BASS_ERROR_FILEFORM issues, unless I rejoin the server or the server has a full cleanup, the webaudio remains and takes up a slot, and there's no way to remove it via commands or E2. I'm also unsure of how to deal with the BASS_ERROR_FILEFORM issue, it's always either that, or the whitelist complaining (which is unusual as we use the default whitelist, and I format my links the same as the tutorials on github suggest).
Vurv  [作者] 2022 年 11 月 20 日 下午 3:48 
They should be automatically clearing themselves if they error, that's odd. If you have control of the server box, you can use `wa_purge`. Note this is only on server since on your client `wa_purge` would only stop them on your client.
Rezerkity 2022 年 11 月 20 日 上午 9:03 
Is there a way to reset a player's webaudios, such as a command to destroy them all? When I'm using webaudio, and trying to make it work, I get a lot of errors through, well, trial and error. Every time I've hit my limit, I have to rejoin the server to try again due to webaudios being created that never expire.
ɅµЋƵƵ 2022 年 11 月 20 日 上午 2:27 
If the error is internal then does it have anything to do with dropbox? what urls do you know should always work?
Vurv  [作者] 2022 年 11 月 20 日 上午 1:21 
Not sure, that's an internal error from the BASS library (which is what gmod uses for https://wiki.facepunch.com/gmod/sound.PlayURL) . Make sure your files are valid, pretty sure at least one of those should be valid, although I know some file formats are iffy, especially with 3d mode, which WebAudio needs (see https://github.com/Facepunch/garrysmod-issues/issues/2296) .
ɅµЋƵƵ 2022 年 11 月 20 日 上午 1:14 
Regarding BASS_ERROR_FILEFORM, what kind of goddamn audio is a valid file form because I have tried OGG, MP3, WAV, all on 44100 Hz, this experience has been nothing but frustrating as I literally cannot tell what in the absolute hell this error means because it's clearly not tied to the file format, and if it is, what sort of ancient unheard of file format does this take???
Xenthys 2022 年 10 月 20 日 上午 11:38 
@Vurv all up to you, it was more a hint "just so you know" than anything else!

Regarding the security issues, it was both already a concern (hence the access control variables, you don't need to fork it to implement a user whitelist) and initially meant for my own use on a server where people with access were already trusted and privileged. Regarding a domain whitelist, then it was indeed out of scope and untrusted users shouldn't have access either way.

My code has never been ideal indeed, I just published it because why not, provided as-is people can do whatever they want with it, plus I could just add it to my collections and be done with it. I acted more because it had no point to exist anymore, due to way better alternatives now, than because server owners are unable to properly understand and restrict the tools they want to use.

Either way, kudos to you and good luck with the GMod community as a whole.
cap 2022 年 9 月 12 日 上午 11:46 
thanks bro :steamthumbsup:
Vurv  [作者] 2022 年 9 月 11 日 下午 8:26 
@Legato you can find an example in here: https://github.com/Vurv78/WebAudio/blob/6f538a63f671a0d7439bc537789865aa46c70f4c/lua/autorun/webaudio.lua#L514

I was thinking of porting the default whitelist to this format as well so it's less confusing, but time will tell if I actually do that.
Vurv  [作者] 2022 年 9 月 11 日 下午 8:24 
@cap Thought it was already whitelisted, added it now. Next time might want to make a github issue (if you can) so I don't forget
Vurv  [作者] 2022 年 9 月 11 日 下午 8:21 
@Xenthys I appreciate you taking action against the addon and accepting its issues, sorry for the late response but I'm leaving at least most of the streamcore references in the addon for a while, since some servers are adamant on instead forking the addon to patch in a whitelist (there are still much more issues with the addon than just not having a whitelist)

I also want to apologize if my tone in the readme and on your comments seemed pretty aggressive, but the inaction on such security holes (and general gmod addon creators not wanting to accept their code is not ideal) definitely caused some frustration
Smores 2022 年 9 月 3 日 下午 2:31 
Heyo. Could I get an example on the webaudio_whitelist.txt? I tried simply typing in my own webserver in the .txt doc since I store all my MP3s there and It keeps saying it's not whitelisted but the server does have a custom whitelist.
cap 2022 年 8 月 9 日 上午 11:29 
would you ever consider adding google drive to the whitelist? i'm not sure if it'll integrate properly, but i've filled too many dropbox accounts with audio lmfao
Xenthys 2022 年 5 月 31 日 下午 4:46 
Hello, thank you for making a better E2 extension to stream music and sounds.

In my humble opinion, you can now remove comparisons to the StreamCore from your addon page since it is no longer available: it's been hidden from the Steam Workshop + fully disabled with an update for clients / servers that still happen to be subscribed.

Should you still be frustrated with that former addon, feel free to add me in order to ask any question and obtain all the answers you deserve. Have a nice day!
[DSTM] Naki 2022 年 5 月 29 日 下午 3:24 
just to let you know the extension has no functions currently
Vurv  [作者] 2022 年 5 月 22 日 上午 10:48 
It should clear automatically, plus wa_purge exists granted that wouldn't affect the serverside count of streams
[DSTM] Naki 2022 年 5 月 22 日 上午 2:53 
could you possibly add a feature called "wa_clear_client" which would stop your streams, this would mean one doesn't have to reconnect in case their audio stream is full
Vurv  [作者] 2022 年 5 月 14 日 下午 9:09 
Unfortunately not right now as that'd break setTime (and other functions iirc). I've filed an issue: https://github.com/Vurv78/WebAudio/issues/51
jason-m 2022 年 5 月 14 日 下午 6:23 
Is there a way to play Block Streamed Audio? Was using StreamCore to Listen to Radio often (like in Cars) and this is not possible now.

[WA]: URL [ https://mp3.ffh.de/radioffh/hqlivestream.mp3 ] was incompatible for WebAudio; It is block-streamed!
A Holly Broccoli 2022 年 5 月 13 日 下午 3:22 
此留言正在等待我们的自动内容检查系统分析。在我们证实其内容无害之前(例如试图窃取信息的钓鱼站点链接),留言将暂时隐藏。
Vurv  [作者] 2022 年 5 月 12 日 下午 9:56 
@Mrkykun Could you potentially dm some of the links to me on discord to check? It shouldn't behave differently based on file extension or anything.
Vurv  [作者] 2022 年 5 月 12 日 下午 9:55 
@HollyBlocky I believe I've fixed the issue in https://github.com/Vurv78/WebAudio/commit/af9718b2484de6cc501b032e410bae8f3889a289 .

It was because I added a change to make webaudio streams parent to the chip by default on xwa:play() if xwa:setPos() was never called but also should've checked if they xwa:setParent() previously.. either way it's a nice qol feature now and thank you (make an issue tho next time so I don't forget, although someone did it this time: https://github.com/Vurv78/WebAudio/issues/49)
Mrkykun 2022 年 5 月 11 日 上午 12:15 
@Vurv i got a shitton of links on disc, all .ogg, and now even though discord is in the whitelist, it still throws an error that it isn't
is it because of the format? Does it have to be mp3?