Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ Three separate `ModelContainer`s:
- Engine policy (`PlayableMedia.unsupportedEngines`): Dispatcharr recordings skip AVPlayer (finished files are MKV), and skip VLC unless the playback carries a Bearer JWT that `DispatcharrPlaybackAuth` folds into `?token=` (password sign-in only — the endpoints never take an API key in the query). Excluded engines are filtered before playback, not counted as QoE fallbacks. Progress keys are `dispatcharr-<serverID>-<id>`.
- `users/me` returns the user's API key in plain text — never log or export that body, nor keys, JWTs, passwords or playback URLs.

### Philips Hue light sync (tvOS only)
- Lume Pro feature (`PremiumFeature.hueSync`), compiled for tvOS only. `HueSyncController.shared` drives one Hue Entertainment area. It pairs over CLIP v2 HTTPS (`hue-application-key`, the bridge's self-signed cert trusted through `HueTrustDelegate`) and streams HueStream v2 over DTLS 1.2 PSK (Network.framework, UDP 2100, suites 0x00A8 + 0x00A9) at ~50 Hz from a 20 ms tick.
- Frames come from the engine through `HueFrameSource`: KSPlayer (KSMEPlayer pixel buffer, `HuePlayerItemTap` for KSAVPlayer), AetherEngine (the same `HuePlayerItemTap` on the bridge's `LumeAetherSession.nativePlayer`; its software path, which every interlaced live channel takes, through `displayedSoftwareFrame()` off the sample-buffer layer) and LumeEngine (`PlayerSession.videoSamples` / `VideoSampleTap`, engine-side). AVPlayer and VLC report `UnsupportedHueFrameSource`. Sources detach their tap and re-attach lazily on the next `latestFrame()`. Multiview routes the tile with the sound (`HueSourceRouter`).
- **The bridge does not restore the lamps when a stream ends**; they keep the last streamed colour. Before `start`, Lume snapshots the area's lights and persists the snapshot (`hue.restoreSnapshot`). It restores and clears the snapshot on stop, and at launch if a crash left one behind. Streamed colours never reach the CLIP `light` resources (they keep reporting the pre-stream state), so restore always sends each light's whole captured state; never diff against what the bridge reports. A start the bridge refuses (area in use by another app) leaves the lamps and any leftover snapshot untouched. No retries.
- `stop()` is for leaving the player (it drops the source). Backgrounding and intensity Off use `suspend()`, which keeps the source so the session can resume.
- The application key and clientkey live in the Keychain (`HueCredentialStore`), device-local and never synced. The bridge host, bridge id and area id live in `hue.*` `UserDefaults`, which `DebugLogExporter` excludes. Keys, the bridge id/IP and area ids never go into logs or exports.

### Chromecast (Google Cast)
- iOS/iPadOS only. `GoogleCastDynamic` (google-cast-ios-sdk, exact version) is linked into the Lume app target with `platformFilter = ios` — never into LumeTopShelf/LumeWidgets. macOS/tvOS/visionOS must still build without it.
- `GoogleCastProvider.swift` is the only file that imports GoogleCast, wrapped in `#if os(iOS) && canImport(GoogleCast)` (never `canImport(UIKit)` — true on visionOS); `LumeAppDelegate` registers it under the same guard. Everything else talks to the `CastProvider` seam in `CastService.swift`, so cast logic stays pure and testable (`StubCastProvider`).
Expand Down
18 changes: 14 additions & 4 deletions Lume.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@
);
target = C6BD5701000000000000E001 /* LumeTopShelf */;
};
C6E0F1A52FE0000000000001 /* Exceptions for "LumeTests" folder in "LumeTests" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Fixtures/Hue/README.md,
);
target = C67C02D02F880F2400842DBA /* LumeTests */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
Expand All @@ -137,6 +144,9 @@
};
C67C02D42F880F2400842DBA /* LumeTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
C6E0F1A52FE0000000000001 /* Exceptions for "LumeTests" folder in "LumeTests" target */,
);
path = LumeTests;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -671,7 +681,7 @@
INFOPLIST_FILE = Lume/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs and Cast devices, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs, Cast devices and Philips Hue Bridges, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
Expand Down Expand Up @@ -733,7 +743,7 @@
INFOPLIST_FILE = Lume/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs and Cast devices, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs, Cast devices and Philips Hue Bridges, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
Expand Down Expand Up @@ -1068,7 +1078,7 @@
INFOPLIST_FILE = Lume/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs and Cast devices, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs, Cast devices and Philips Hue Bridges, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
Expand Down Expand Up @@ -1557,7 +1567,7 @@
INFOPLIST_FILE = Lume/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs and Cast devices, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Lume needs access to your local network to find TVs, Cast devices and Philips Hue Bridges, and to reach media servers, WebDAV shares and recording servers running on it.";
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
Expand Down
1 change: 1 addition & 0 deletions Lume/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<string>_lume-recorder._tcp</string>
<string>_googlecast._tcp</string>
<string>_CC1AD845._googlecast._tcp</string>
<string>_hue._tcp</string>
</array>
<key>TMDBAccessToken</key>
<string></string>
Expand Down
22 changes: 11 additions & 11 deletions Lume/InfoPlist.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -14,67 +14,67 @@
}
},
"NSLocalNetworkUsageDescription" : {
"comment" : "Permission prompt shown when Lume first looks for TVs and Cast devices, or reaches a media server, WebDAV share or recording server, on the local network.",
"comment" : "Permission prompt shown when Lume first looks for TVs, Cast devices or Philips Hue Bridges, or reaches a media server, WebDAV share or recording server, on the local network.",
"extractionState" : "manual",
"localizations" : {
"ar" : {
"stringUnit" : {
"state" : "translated",
"value" : "يحتاج Lume إلى الوصول إلى شبكتك المحلية للوصول إلى خوادم الوسائط ومجلدات WebDAV المشتركة وخوادم التسجيل التي تعمل عليها."
"value" : "يحتاج Lume إلى الوصول إلى شبكتك المحلية للعثور على أجهزة التلفزيون وأجهزة Cast وجسور Philips Hue، وللوصول إلى خوادم الوسائط ومجلدات WebDAV المشتركة وخوادم التسجيل التي تعمل عليها."
}
},
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume benötigt Zugriff auf dein lokales Netzwerk, um Fernseher und Cast-Geräte zu finden und darin laufende Medienserver, WebDAV-Freigaben und Aufnahmeserver zu erreichen."
"value" : "Lume benötigt Zugriff auf dein lokales Netzwerk, um Fernseher, Cast-Geräte und Philips Hue Bridges zu finden und darin laufende Medienserver, WebDAV-Freigaben und Aufnahmeserver zu erreichen."
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume needs access to your local network to find TVs and Cast devices, and to reach media servers, WebDAV shares and recording servers running on it."
"value" : "Lume needs access to your local network to find TVs, Cast devices and Philips Hue Bridges, and to reach media servers, WebDAV shares and recording servers running on it."
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume necesita acceso a tu red local para encontrar televisores y dispositivos Cast, y para conectarse a los servidores multimedia, recursos compartidos WebDAV y servidores de grabación que se ejecutan en ella."
"value" : "Lume necesita acceso a tu red local para encontrar televisores, dispositivos Cast y puentes Philips Hue, y para conectarse a los servidores multimedia, recursos compartidos WebDAV y servidores de grabación que se ejecutan en ella."
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume a besoin d’accéder à votre réseau local pour trouver les téléviseurs et les appareils Cast, et pour atteindre les serveurs multimédias, les partages WebDAV et les serveurs d’enregistrement qui s’y trouvent."
"value" : "Lume a besoin d’accéder à votre réseau local pour trouver les téléviseurs, les appareils Cast et les ponts Philips Hue, et pour atteindre les serveurs multimédias, les partages WebDAV et les serveurs d’enregistrement qui s’y trouvent."
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume ha bisogno di accedere alla rete locale per trovare TV e dispositivi Cast e per raggiungere i server multimediali, le condivisioni WebDAV e i server di registrazione presenti su di essa."
"value" : "Lume ha bisogno di accedere alla rete locale per trovare TV, dispositivi Cast e bridge Philips Hue e per raggiungere i server multimediali, le condivisioni WebDAV e i server di registrazione presenti su di essa."
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume は、テレビや Cast デバイスを見つけたり、ローカルネットワーク上のメディアサーバー、WebDAV 共有、録画サーバーに接続したりするためにアクセス権が必要です。"
"value" : "Lume は、テレビ、Cast デバイス、Philips Hue Bridge を見つけたり、ローカルネットワーク上のメディアサーバー、WebDAV 共有、録画サーバーに接続したりするためにアクセス権が必要です。"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume가 TV와 Cast 기기를 찾고 로컬 네트워크에서 실행 중인 미디어 서버, WebDAV 공유 및 녹화 서버에 연결하려면 접근 권한이 필요합니다."
"value" : "Lume가 TV, Cast 기기 및 Philips Hue Bridge를 찾고 로컬 네트워크에서 실행 중인 미디어 서버, WebDAV 공유 및 녹화 서버에 연결하려면 접근 권한이 필요합니다."
}
},
"pt" : {
"stringUnit" : {
"state" : "translated",
"value" : "O Lume precisa de acesso à sua rede local para encontrar TVs e dispositivos Cast e para alcançar servidores de mídia, compartilhamentos WebDAV e servidores de gravação em execução nela."
"value" : "O Lume precisa de acesso à sua rede local para encontrar TVs, dispositivos Cast e bridges Philips Hue e para alcançar servidores de mídia, compartilhamentos WebDAV e servidores de gravação em execução nela."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "Lume 需要访问您的本地网络,以查找电视和 Cast 设备,并连接其中运行的媒体服务器、WebDAV 共享和录制服务器。"
"value" : "Lume 需要访问您的本地网络,以查找电视、Cast 设备和 Philips Hue Bridge,并连接其中运行的媒体服务器、WebDAV 共享和录制服务器。"
}
}
}
Expand Down
Loading