kakone / GoogleCast

Implementation of the Google Cast protocol (.NET Standard 2.0 library)
GNU General Public License v3.0
143 stars 22 forks source link

Setting volume and custom name+logo for receiver? #18

Closed cncb-gh closed 6 years ago

cncb-gh commented 6 years ago

First of all, thanks very much for your work on this and making it available to the rest of us.

I can't see how to set the volume for the receiver? I do see a GoogleCast.Messages.Receiver.SetVolumeMessage class in the source code but there appears to be no "GoogleCast.Messages.Receiver" namespace in the NuGet package?

Also, is there an easy way to have a custom name and logo for the receiver? When my app connects it just displays a generic casting logo on the TV screen (Android TV) when waiting to play media. It would be great to display my app's logo there. Likewise, the casting notification on my local devices shows casting to "Default Media Receiver". Is there an easy way to rename this?

kakone commented 6 years ago

I can't see how to set the volume for the receiver?

sender.GetChannel<IReceiverChannel>().SetVolumeAsync(level);

Also, is there an easy way to have a custom name and logo for the receiver? When my app connects it just displays a generic casting logo on the TV screen (Android TV) when waiting to play media. It would be great to display my app's logo there. Likewise, the casting notification on my local devices shows casting to "Default Media Receiver"

You need to register a new Styled Media Receiver.

cncb-gh commented 6 years ago

Perfect. Thanks!

janwiebe-jump commented 3 years ago

Hi @cncb-gh , Did you manage to use a Styled Media Receiver? What did you do to get that working? Just registering the app in the chromecast console, or also adding code in your app?

cncb-gh commented 3 years ago

I never did try to get a custom logo working. But once I registered my app for Google Cast, it shows the correct name when you "LaunchAsyc()" with your app id.

janwiebe-jump commented 3 years ago

ok, thank you!