Skip to content

Conversation

@bwees
Copy link
Member

@bwees bwees commented May 23, 2025

Description

We load Google provided JS code to check if we can present Google Cast as a cast destination. This hits Google servers when you load the web ui. This is a privacy concern for some and thus should be opt-in. Google cast is now opt-in via Account Settings > Features > Cast > Google Cast toggle.

Fixes discord report

How Has This Been Tested?

Tested on local dev build. Once the setting is changed, a refresh will load/unload the Google scripts.

Screenshots (if appropriate)

image

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

bwees added 2 commits May 22, 2025 21:52
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 23, 2025
@bwees bwees added changelog:enhancement and removed documentation Improvements or additions to documentation labels May 23, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 23, 2025
@mmomjian
Copy link
Collaborator

Honestly, I don’t agree with making this disabled by default. I do understand the privacy concerns and I think providing a way to disable it is necessary. If it’s disabled by default, a large portion of users will never realize that it exists.

@mmomjian
Copy link
Collaborator

What if we had 3 states? disabled (default), enabled, and hidden? In disabled mode, the button would still be visible on the asset page and on click it would say "Google cast is disabled by default. Would you like to enable? Y/N/Never ask again (which would change state to hidden and hide the icon moving forward).

At least the way I am picturing this PR, the icon would never be seen unless the user goes into settings to enable feature.

we need to mock user prefs since CastButton uses it
@mertalev
Copy link
Member

mertalev commented May 25, 2025

What if we had 3 states? disabled (default), enabled, and hidden? In disabled mode, the button would still be visible on the asset page and on click it would say "Google cast is disabled by default. Would you like to enable? Y/N/Never ask again (which would change state to hidden and hide the icon moving forward).

At least the way I am picturing this PR, the icon would never be seen unless the user goes into settings to enable feature.

I like this idea. It lets the user discover the feature naturally at their own pace and informs them why they would or wouldn't want it. Being able to continue showing the icon also means they can decline for now and leave it as a reminder without needing to make a more lasting decision they might forget about.

@NicholasFlamy
Copy link
Collaborator

I like this idea. It lets the user discover the feature naturally at their own pace and informs them why they would or wouldn't want it. Being able to continue showing the icon also means they can decline for now and leave it as a reminder without needing to make a more lasting decision they might forget about.

Yes, this seems perfect. The biggest thing is that nothing hits Google's server until you agree. Also, is this going to be a user option or a server option?

Copy link
Member

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this for now, will make an onboarding flow to let users know of this feature

@alextran1502 alextran1502 merged commit 7822496 into main May 28, 2025
52 checks passed
@alextran1502 alextran1502 deleted the feat/cast-opt-in branch May 28, 2025 20:57
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
* add setting switch

this isnt bound to anything yet

* make google casting opt-in

* doc updates

* lint docs

* remove unneeded translation items

* update mobile openai defs

* fix failing test

we need to mock user prefs since CastButton uses it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants