-
-
Notifications
You must be signed in to change notification settings - Fork 499
Add client setting to toggle internet sound streams #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add client setting to toggle internet sound streams #834
Conversation
Helps to determine whether a sound is actually created.
- When disabled, it disables creation of internet sound streams, and destroys existing streams, keeps sound elements, and triggers "onClientSoundStopped" with "disabled" reason - When enabled, it enables creation of internet sound streams, and creates missing streams and triggers "onClientSoundStarted" with "enabled" reason - Adds new reason to "onClientSoundStarted": "enabled", which is returned if setting is changed to true - Adds new reason to "onClientSoundStopped": "disabled", which is returned if setting is changed to false
…net-sound-stream-setting
|
I think some things in here have been overthinked, although the results of that mean integration has been done properly for once, and offering good ways for scripters to notice a client disabled streams. Client feedback:
Scripting feedback:
I also think the lack of other views means your draft's technical concept is fine. I propose that this gets merged if no other opinions get posted in the next couple of days. There's a certain priority to it as well (read: part of my first point 1) Great job @patrikjuvonen |
Enabled by default sounds good. Reducing bandwidth consumption has its own unique set of challenges, and I think we should stick to improving user privacy in this pull request. After all, nothing stops the server from sending a large amount of data through other means. For simplicity's sake, I think we should call this "allow_external_sounds".
This could eliminated by only apply the setting on reconnect.
MTA currently destroys a Instead of overlapping with that "potential future feature" in this PR, maybe the client setting should just be exposed via a generic function like
What if we just swapped audio with a 30s (or other appropriately sized) blank audio file with Also having
Personally I am currently indifferent to having a (sound) whitelist. This can always be explored later.
I think this should be permitted as it's not an "external" file, and therefore not a privacy risk. |
I don't agree, remote streams are the main reason MTA's bandwidth usage often exceeds the base game's usage (game, sync, resource download) at a continuous pace, as a lot of streams can play infinitely, even without being noticed (lowered MTA volume), or on a lot of servers practically at the hands of other nearby players. This is speaking from the reality of common gamemodes found on servers these days. It's not said that the new option guarantees that nothing else takes up bandwidth (like what the server sends), but it's a tool for the user to decrease the majority of the surface it happens through. I think that bandwidth and security (privacy) should both matter.
because I disagree with your opinion that only privacy matters in this PR, I think that remote streams (not local sound files) should also be covered, as I clarified in my previous comment otherwise users that toggled it to spare bandwidth can still be drained despite their efforts to stop that from happening through remote streams.
Good point
My thoughts on these 3 quotes: |
I agree, I've changed the name.
Indeed, however, I think the fact that scripts and their purpose, users and their networks come in so many different shapes and sizes and everything keeps changing constantly I think making this setting have instantaneous effect is a welcome user-friendly feature and this current proposal supports scripts well using already existing events and parameters. Also I must remind that the
Yes, but a sound element may exist but not actually be playing if not streamed in, or some other odd reason. In this proposal changing this new setting does not affect the sound element; only the audio handle, which is extremely nice to have since it doesn't require any change in any scripts to work dynamically.
I believe we have to look at this as it is right now: Adding a new
We have yet to develop such feature, and is not exactly in scope of this pull request. Also it wouldn't really affect the functionality of this new feature, but would rather make scripting cases where external sounds are disabled slightly more convenient. Should we decide to merge this PR in, I believe implementing such function afterwards is just fine, but whichever is ok imho.
I believe you must've misunderstood my point. My point was meant as a good effect: client doesn't want sound played -> audio handle will not be created (or will be destroyed). Playing a blank audio file would consume resources for no reason and sounds like a hack (no pun intended :D)
@Dutchman101 pointed out that bandwidth consumption would still be an issue. Here is the summary of the previous discussion. Summary
|
Both bandwidth and security do matter, but my reasoning is that we should carefully evaluate how we want to optimise bandwidth consumption, instead of just applying changes to achieve this. I agree that being able to toggle sound streams is one of the solutions, but it should be discussed and decided upon separately. Please refer to #887 for (a little) more explanatory information about why future planning is important. Since this is literally the difference between a stream connecting to the gameserver vs. not connecting to the gameserver, I'll yield! It doesn't really matter either way and is ultimately a minor difference.
Fair! And my bad - forgot about the
Merging this before the introduction of I strongly believe that isSoundStopped (the naming) may cause confusion/problems in the future, however, and would strongly advise against keeping it in its current form. |
…net-sound-stream-setting
|
Only thing left in this PR is to rename the isSoundStopped to something else or remove it maybe. |
…net-sound-stream-setting
…net-sound-stream-setting
Let's rather make a generic client config getter function.
|
I have decided to remove the |
|
Causes #1096 |
Summary
Requesting client feedback
Requesting scripting feedback
cc @Dutchman101