Create BearWave macOS radio-first app

This commit is contained in:
Sebastian Palencsar
2026-06-25 09:21:42 +02:00
commit b47b591e03
42 changed files with 3814 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import Foundation
enum PlaybackStatus: Equatable {
case stopped
case connecting
case buffering
case playing
case paused
case failed(PlaybackError)
var isPlaying: Bool {
self == .playing || self == .connecting || self == .buffering
}
var title: String {
switch self {
case .stopped:
String(localized: "Stopped")
case .connecting:
String(localized: "Connecting...")
case .buffering:
String(localized: "Buffering...")
case .playing:
String(localized: "Playing")
case .paused:
String(localized: "Paused")
case let .failed(error):
error.title
}
}
var detail: String? {
if case let .failed(error) = self {
return error.detail
}
return nil
}
}