Skip to content

Add toggle to mute videos by default - #61

Open
sudonym1 wants to merge 2 commits into
dmilin1:masterfrom
sudonym1:master
Open

Add toggle to mute videos by default#61
sudonym1 wants to merge 2 commits into
dmilin1:masterfrom
sudonym1:master

Conversation

@sudonym1

@sudonym1 sudonym1 commented Jul 15, 2026

Copy link
Copy Markdown

I sent my agents after a feature I felt was missing from Hydra - that is a toggle to default videos to mute their audio. I borrowed the details from Apollo. When this setting is enabled, videos open muted by default. Pressing Volume Up unmutes. Once one video is unmuted, the next videos are also unmuted as well. Pressing the mute button (under the playback speed button) re-enables mute across videos. Exiting the app and opening it again also re-enables mute.

I have reviewed the code to the best of my ability, but I am not an expert in typescript, or iOS development. I would appreciate your review. If you ever find yourself in a situation where you need C++, Linux kernel code, or networking related software reviewed, please hit me up.

Some decisions left to make:

  1. Should this be default?
  2. Is the "native intent" worth having the extra module for?

I will also test this out on android, but I don't personally own an android device. If you can take a look at the general code, I can then try this out on the android simulator.

Screenshot 2026-09-05 at 20 04 23

@dmilin1

dmilin1 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

The UX for this seems really well thought out. Many vibe coded PRs get submitted to this repo and I don't have the time to sort through which are good and which are garbage. If you can clean up any problems, rebase, and test it thoroughly, I'd be happy to review and merge it!

@sudonym1

sudonym1 commented Aug 5, 2026

Copy link
Copy Markdown
Author

Thanks! I will follow up on this one and prepare a more complete implementation.

@dmilin1

dmilin1 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

@sudonym1 Wanted to give you a heads up that I just pushed a big rewrite of the media viewer, so you'll need to account for those changes.

@adude00

adude00 commented Sep 4, 2026

Copy link
Copy Markdown

This would be an awesome feature to have!

Add a default-mute setting and a mute button to full-screen videos,
remembering the choice until the app returns to the foreground. Unmute
on media-volume changes in either direction and native unmute signals
where supported, including at volume limits. Keep listeners scoped to
the focused, foreground viewer and release owned audio-session mute
state on cleanup.
@sudonym1 sudonym1 changed the title [RFC] Add toggle to mute videos by default Add toggle to mute videos by default Sep 6, 2026
@sudonym1

sudonym1 commented Sep 6, 2026

Copy link
Copy Markdown
Author

Alright, I took another pass at this. I got a little carried away solving the "volume up at 100% volume doesn't register an event problem" which required a native module to resolve. I am fine to remove it, though I do think it improves the UX a bit.

Please let me know what next step you would like me to take.

@dmilin1

dmilin1 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Thanks! Don't have time to do a deep dive into this today, but I'll take a deeper look tomorrow. A few questions before I do so:

I try to avoid unnecessary dependencies when possible. react-native-volume-manager seems like a popular and well maintained library, but if we need a native module anyway to solve the 100% volume problem, do you think it makes sense to implement the all the functionality we need in the native modules and drop the dependency? Or is it better to keep the native module's functionality narrow and trust the library to handle most of the work for us? If you think the native module approach is better, but you'd like to wrap this up, I'm happy to merge this as is and take care of it myself since you've already been so generous with your time and effort.

Did you test this on both iOS and Android? If you don't have devices to test with, I have both and I'm happy to test for you.

@sudonym1

sudonym1 commented Sep 6, 2026

Copy link
Copy Markdown
Author

Thanks! Don't have time to do a deep dive into this today, but I'll take a deeper look tomorrow. A few questions before I do so:

No rush. Thanks for your time.

but if we need a native module anyway to solve the 100% volume problem, do you think it makes sense to implement the all the functionality we need in the native modules and drop the dependency?

Depends - we can avoid the native module entirely if we limit to handling volume changes only. Less code is always nice. If we keep the functionality in, then I can see the value in rolling it all together.

Lets leave this one as open feedback. Once I collect the rest of your feedback I can try both ways.

Did you test this on both iOS and Android?

Nope. I don't have a device. If its easy enough for you, I would appreciate your help testing this.

tested on android emulator, found out I was attached to an unavailable event.
@sudonym1

sudonym1 commented Sep 6, 2026

Copy link
Copy Markdown
Author

Did you test this on both iOS and Android?

Ok. This has now been tested on a real iOS 26 iphone 16 pro max, the iOS simulator, and on the android emulator. It was broken on Android, and I pushed a fixup.

I still need some help testing on a real Android device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants