advplyr / audiobookshelf-app

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

Apple TV Support #629

Open mrburns-42 opened 1 year ago

mrburns-42 commented 1 year ago

Is your feature request related to a problem? Please describe.

In my family and circle of friends, music is often played through an app on the Apple TV, such as Plex or Apple Music. It is controlled entirely via the Apple TV, and often a soundbar, HomePods or a music system is connected to it in order to listen via this route. It would be great if this were also possible for audio books via ABS.

Describe the solution you'd like

It would be great if the ABS app were also available for the Apple TV, so that the podcasts and audiobooks could also be played comfortably via this device.

benonymity commented 1 year ago

This would be awesome, though will probably not happen for a long time, as Apple TV doesn't support the webView technology that the mobile apps do, and so would need a ground-up rewrite in Swift. Basically, a whole new app. But there are ABS apps already written in Swift, like @rasmuslos' ShelfPlayer, so there is some hope!

advplyr commented 1 year ago

I don't think this would require an entirely new app but I could be mistaken. It just requires a separate UI similar to android auto, car play, google chromecast, etc

benonymity commented 1 year ago

Yeah, it could certainly be the same app you install from the App Store, but there would be no support for ordinary JS/webView, so the UI would have to be rewritten in SwiftUI and look different than on mobile. Though most of the native Swift for the audio player and such could probably do double duty. Yeah, same challenge as Carplay, widgets, shortcuts, etc.

rasmuslos commented 1 year ago

It would not require a complete rewrite, most of the Shared code could be reused. The problem is, as far as I understand it, that the existing code is extremely dependent on the capacitor frontend for syncing and auth flow, ... because it is more or less just the audio player and some stuff to support it. It is definitely not impossible to expand this into a native tvOS app but would be very time-consuming as the existing native iOS code base is pretty small. But because you mentioned ShelfPlayer I have made a proof of concept and it does work but I don't think I am going to work on it soon.

rasmuslos commented 1 year ago

This is of course from when I worked on it, I have no idea how much it has evolved, maybe I am not doing it justice here

benonymity commented 1 year ago

I don't think the Shared code has changed much (if at all) recently, so I think that's still true. Though I imagine TvOS has some differences in how audio is handled as well. Cool PoC! I imagine that you'd still get to TvOS with ShelfPlayer before this app does, especially since it seems like Carplay is a higher priority here.

advplyr commented 1 year ago

Syncing is done in the Swift code. Capacitor is only used for the UI