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

Cast receiver shouldn't be limited to Home devices #603

Open
GodTamIt opened this issue Aug 28, 2024 · 4 comments
Open

Cast receiver shouldn't be limited to Home devices #603

GodTamIt opened this issue Aug 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@GodTamIt
Copy link
Contributor

Describe the bug

The code in castDevices.ts and codecSupportHelper.ts make the assumption that the receiving device is one of the Home devices (i.e. GEN1AND2, AUDIO, GEN3, ULTRA, NESTHUBANDMAX, CCGTV). I don't think this is a valid assumption because any Android TV could be a web cast receiver. At least with the latest stable testing, it seems that way on my Android TV. Unless I'm mistaken, this is because the Jellyfin Android TV application hasn't implemented Cast Connect.

Additional context

I used to work on some of these devices 🙃

@IDisposable
Copy link

Starting to work on this. Cleaning up the device detection first. https://github.com/IDisposable/jellyfin-chromecast/tree/add-generic-android

@3flex
Copy link
Contributor

3flex commented Nov 3, 2024

I've been thinking about ways to do this too.

Instead of trying to identify specific device types I think it would be better to dynamically check for required support for resolution, codecs, profiles and levels and build the device profile from there.

For example, instead of trying to identify a specific Cast device then deciding that it supports 720p, 1080p or 4k based on published specs, just check for the resolution via canDisplayType. That way the check should work regardless of device type.

@IDisposable
Copy link

Couldn't agree more, taking a baby step upright now.

GodTamIt added a commit to GodTamIt/jellyfin-chromecast that referenced this issue Jan 13, 2025
This addresses several issues with how device profile building was done:

  1. Devices were hard-coded, which did not account for the many
     different device profiles that may not be 1st party Google
     Chromecast™️ devices. This includes almost every Android TV with
     Cast functionality built-in.
  2. Different devices may have slightly different profile requirements,
     so even if an overall codec WAS correct, certain profiles may not
     be supported.
  3. Resolution constraints were being sent as a poor representation of
     of video codec profile and bit depth constraints. This change fixes
     this issue.
  4. This also improves the accuracy of the codec detection for less
     popular codecs like AV1.

Issues:
  - jellyfin#401
  - jellyfin#603
  - jellyfin#606
  - jellyfin#743
GodTamIt added a commit to GodTamIt/jellyfin-chromecast that referenced this issue Jan 13, 2025
This addresses several issues with how device profile building was done:

  1. Devices were hard-coded, which did not account for the many
     different device profiles that may not be 1st party Google
     Chromecast™️ devices. This includes almost every Android TV with
     Cast functionality built-in.
  2. Different devices may have slightly different profile requirements,
     so even if an overall codec WAS correct, certain profiles may not
     be supported.
  3. Resolution constraints were being sent as a poor representation of
     of video codec profile and bit depth constraints. This change fixes
     this issue.
  4. This also improves the accuracy of the codec detection for less
     popular codecs like AV1.

Issues:
  - jellyfin#401
  - jellyfin#603
  - jellyfin#606
  - jellyfin#743
GodTamIt added a commit to GodTamIt/jellyfin-chromecast that referenced this issue Jan 13, 2025
This addresses several issues with how device profile building was done:

  1. Devices were hard-coded, which did not account for the many
     different device profiles that may not be 1st party Google
     Chromecast™️ devices. This includes almost every Android TV with
     Cast functionality built-in.
  2. Different devices may have slightly different profile requirements,
     so even if an overall codec WAS correct, certain profiles may not
     be supported.
  3. Resolution constraints were being sent as a poor representation of
     of video codec profile and bit depth constraints. This change fixes
     this issue.
  4. This also improves the accuracy of the codec detection for less
     popular codecs like AV1.

Issues:
  - jellyfin#401
  - jellyfin#603
  - jellyfin#606
  - jellyfin#743
@GodTamIt
Copy link
Contributor Author

For example, instead of trying to identify a specific Cast device then deciding that it supports 720p, 1080p or 4k based on published specs, just check for the resolution via canDisplayType. That way the check should work regardless of device type.

@3flex I finally got around to implementing something similar to what you suggested in #744. It is a lot more thorough about checking supported video codec profiles, codec levels and resolutions.

GodTamIt added a commit to GodTamIt/jellyfin-chromecast that referenced this issue Jan 13, 2025
This addresses several issues with how device profile building was done:

  1. Devices were hard-coded, which did not account for the many
     different device profiles that may not be 1st party Google
     Chromecast™️ devices. This includes almost every Android TV with
     Cast functionality built-in.
  2. Different devices may have slightly different profile requirements,
     so even if an overall codec WAS correct, certain profiles may not
     be supported.
  3. Resolution constraints were being sent as a poor representation of
     of video codec profile and bit depth constraints. This change fixes
     this issue.
  4. This also improves the accuracy of the codec detection for less
     popular codecs like AV1.

Issues:
  - jellyfin#401
  - jellyfin#603
  - jellyfin#606
  - jellyfin#743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants