Skip to content
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

feat(web): chromecast support #13966

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

feat(web): chromecast support #13966

wants to merge 6 commits into from

Conversation

etnoy
Copy link
Contributor

@etnoy etnoy commented Nov 6, 2024

Cast your photos and videos from the web client!

image

image

This PR isn't finished but I need your help to test and clean up.

TODO:

  • Styling the cast button, ensure dark/light mode
  • Styling the video playback controls
  • Refactor and code cleanup
  • Authentication currently sucks, maybe we should just use the current session token?
  • The cast button has a hard time showing up in the timeline, but it shows up nicely in the asset viewer

I'm sure there are better ways to communicate reactive data from the cast sender. Runes?

@github-actions github-actions bot added documentation Improvements or additions to documentation 🖥️web labels Nov 6, 2024
@etnoy etnoy force-pushed the feat/cast branch 7 times, most recently from 68447c5 to 5b33d27 Compare November 8, 2024 13:52

private async createCastApiKey() {
try {
const data = await createApiKey({
Copy link

@omricarmel omricarmel Dec 6, 2024

Choose a reason for hiding this comment

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

Having this key created ad hoc is good but not enough. cast keys should be ephemeral and scoped bc they are handed over to the cast device. The cast device is inherently untrustable bc it is meant to be a common device sometimes in a public space.

Also the cast device should not have the view context of the current user.

A possible solution is to create an ephemeral "cast" shared album (instead of "cast" key) scoped with the photos in the cast session (added upon request) and deleted on session end with a possible expiry limitation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is just the initial ad-hoc implementation. We were just discussing today in the discord how to get this better before merging the PR. Obviously this must be improved. One idea is to use jwt tokens with decent duration to send with the URL instead of the current API keys

Copy link

@omricarmel omricarmel Dec 6, 2024

Choose a reason for hiding this comment

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

jwt is interesting but does the server already have support?

creating a cast album may open the door to cast queues and even shared queues similar to youtube's casting.
also takes care of asset access scope. adding a key (riding on the password mechanism of shared album) and attaching the credentials to the cast device session could be a nice addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:feature documentation Improvements or additions to documentation 🖥️web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants