Can a custom Android Media Route Provider appear in the Cast dropdown list?

956 Views Asked by At

Media Route Providers declare entities that can receive media, but it seems that they don't appear in the same list as Chromecast in applications like Netflix.

Is there a way for me to make a Media Route Provider that I can stream to from common application (Youtube/Netflix, etc)?

I suspected that it might be possible to do this by setting the category in my provider to the result of CastMediaControlIntent.categoryForCast(CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID) but it didn't seem to work. (When I set it to this, my custom test player can see it but Youtube etc still don't see any castable devices).

It is possible to create a cast receiver, but I would rather have it treated as local within android.

1

There are 1 best solutions below

0
On

No, you cannot get stream to a non-official Cast Receiver using Youtube or Netflix. Both of them use the official Cast Android SDK which does an automatic authentication check for an official Cast Receiver so whatever you try to use there will not work.

However, you can very much inject Routes into the Cast Receiver list that you see in Youtube and Netflix. The problem that you are facing in that regard is that Youtube and Netflix are probably searching for their own App IDs and not the Default Media Receiver. You will need to figure out what their App IDs are before you can inject into their list.