advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.29k stars 173 forks source link

[Enhancement]: cast local media #454

Open sluggathor opened 1 year ago

sluggathor commented 1 year ago

Describe the feature/enhancement

Right now we can only cast media steamed from the server. It would be nice to cast local media for situations where there is no connection to the server.

Thank you for your good work!

ghTravis commented 5 months ago

Is there any possibility that this will be looked at in the near future? Really interested in this feature and was surprised to see that I can't do this already.

advplyr commented 5 months ago

Yeah I'd like to do it. The cast SDK requires passing a URL to the chromecast receiver, so in order to do this the app has to start a local server on the device. I'm not sure how this would be done because I'm pretty sure that the URL is required to be https. If anyone has example code of this being implemented that would be really helpful.

ghTravis commented 5 months ago

I've seen a different player seems to be able to do this called Smart Audiobook Player (also on Android). It appears to start some kind of local server on the device because when I was troubleshooting firewall rules for isolated IoT devices (Nest mini) and my phone (on a different network and vlan), the nest mini appears to connect to the phone on a random port between 32000-65000 so I think it can definitely be done.

advplyr commented 5 months ago

Yeah I know it can be done but I'm not sure how at this point so a code example would be helpful