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

Discussion: Display only video receiver #68

Open
JumBay opened this issue Sep 11, 2020 · 4 comments
Open

Discussion: Display only video receiver #68

JumBay opened this issue Sep 11, 2020 · 4 comments

Comments

@JumBay
Copy link

JumBay commented Sep 11, 2020

Hi,

This is not an issue but rather a discussion. I'd like to know if there is a way to display only the video receivers on the receiver list that pops up?

Thanks

@Lindsay-Needs-Sleep
Copy link
Collaborator

When I was working on getting the list of receivers from the native side I don't remember seeing anything obvious that would allow us to differentiate between video vs. other receivers.

If there is an attribute or method or something that lets us do that, (for iOS and Android), then it would be pretty simple to output that to js as an attribute for the returned Route objects. (Then it should be fairly trivial for a dev to filter the routes based on that from the js side.)

@JumBay
Copy link
Author

JumBay commented Sep 12, 2020

YouTube does it in its app, I suppose they use the same sdk. I did look into the sdk doc but didn't find it yet.

@Lindsay-Needs-Sleep
Copy link
Collaborator

Lindsay-Needs-Sleep commented Sep 12, 2020

Theoretically Youtube should be using the same SDK... I was trying to do something that youtube did (can't remember what), but it was impossible as far as I could tell (after multiple full days on it). I think there is a chance that youtube has access to the SD source code since it is part of Google.

But, this seems more likely to be possible.

If you are interested in experimenting or seeing exactly where the plugin does the route stuff, there are 2 locations:

#1 - For requestSession (the native dialog that pops up with the route chooser)
ChromecastConnection.java - requestSession - line 294-306

#2 - For the list of available routes that are provided to js (chrome.cast.cordova.scanForRoutes) (probably easier to implement for this option)
ChromecastUtilities.java - createRoutesArray - line 749-764
This is where the output routes are translated into JSON, this is where we should add a "type" or "capabilities" or something (depending on how many types of receivers there are)

I am less familiar with the iOS code, but it does basically follow the same structure. (And I was able to do everything in iOS that I did in Android).

@JumBay
Copy link
Author

JumBay commented Sep 13, 2020

Ok I'll check this, thanks

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

No branches or pull requests

2 participants