Developers wanted: Google Chromecast support

AntennaPod is an open-source application that is dependent on volunteer contributions by the community. Because of some changes that are outside our control, we need to rewrite Google Chromecast support. We are therefore looking for a developer who is interested in doing the necessary code changes. If nobody volunteers, Google Chromecast support likely has to be removed in May.

Interested? Just leave a comment here or on GitHub :slight_smile:

I’m interested. What kind of development would be involved?

Welcome to the forum :slight_smile: Rewriting Chromecast support is a pretty big amount of work. I tried to do it at some point and then gave up because I am not motivated to spend 15+ hours on a feature that I don’t use myself. Google published a new Chromecast library that works differently to the one we already use. I think it might be easiest to delete all Chromecast functionality and start from scratch with the new library. Chromecast support currently is around 2800 lines of code - so the changes needed are massive. Also, it needs a lot of manual testing to ensure that it still works with the real Chromecast hardware.

1 Like

Thanks for the clarification. I’ll give it a shot. One year is a long time. Might as well get started and see where it goes. Who knows, others could join and help out.

2 Likes

If at some point you need testers, let me know :slight_smile:

Add me to tester list too - I use ChromeCast actively.

Also, should I join beta tester program?

I wish I was not so rusty with my coding and had mobile dev practice. Still I am pretty good with testing and describing testcases. Count me in for testing pls…

Did a search on the codebase for Chromecast code. Couldn’t find it. Where is it located?

The most interesting parts of the code are here: AntennaPod/core/src/play/java/de/danoeh/antennapod/core/cast at develop · AntennaPod/AntennaPod · GitHub but there are a few more places like CastEnabledActivity. Just search for “cast”.

Again, the disclaimer: I would really suggest to focus on one PR at a time :wink:

1 Like

Sorry for the late reply. I’ll be more prompt from now onwards. I’ll start reading through it but avoid doing any work. Let’s get that multi select done first.

2 Likes

I’ve just discovered AntennaPod, sand I think it’s fantastic. For someone who has heavily invested in Chromecast, it is encouraging news that the functionality is being re-added.

Apologies if these suggestions have already been thought about:

We could use the default casting app and the podcast episode URL to get “quick and dirty” casting functionality. Also if the path to downloaded episodes is exposed, there are numerous third party apps that specialize in casting local content.

This would be enough to satisfy me until the fully-fledged casting app is ready.

Do you think a stop-gap solution like this is worth it?

Edit: I wanted to add that I found the “share” menu item on each episode, and I feel like this is so close to working, but it just falls short. Sharing the link also includes the episode title before the URL, so it won’t play when you share it to another app, and I’m not sure exactly what the share file option does; I’ve only got it to work for copying the file to another location…it won’t play the media in VLC or something similar.

There already is Chromecast support. It can be enabled in playback settings. This thread is about re-implementing it because the technical library behind it is deprecated and will be unavailable next May.

Consider me embarrassed for not noticing that option. I think I must not have scrolled down all the way in the options screen :flushed:

Nevermind then! :slight_smile:

@ByteHamster, thanks for working on this feature yourself in the end. If you need testers, I have a device I can test the new implementation with. I imagine this will be part of the next beta cycle.

Yeah, it will be in the 2.5.x beta. Not sure if I’m motivated to properly fix glitches. My changes were mainly to keep the app compiling, not to make Chromecast support nice. I hope someone else volunteers to finalize it.

I’m up for the task.

1 Like

That’d be cool @peakvalleytech! @ByteHamster, would it be complicated also to register as Chromecast app so we can get the logo on screen as well? Would that require code changes?

1 Like

Nice! Most of it is already done, the library was upgraded in Chromecast rework by ByteHamster · Pull Request #5518 · AntennaPod/AntennaPod · GitHub. There are at least two things missing. Maybe there are more, so if you find more problems, let me know :slight_smile:

  • When switching to cast using the ActionBar button, the playback progress bar flashes to 100% for a short time.
  • When connecting to cast while not playing locally, query the state of the external device. If the external device is already playing a podcast episode, reflect that in AntennaPod.

It is mostly just doing the registration process (with our AntennaPod Google account).

Got it, I’ll take a look at the code soon.