Adapters: add Meet, Zoom, Teams (coloured border) + adapter registry
Front-loads the remaining visual adapters per the Signal→Meet→Zoom priority. All three reuse GridCallAnalyzer's coloured-border (saturated) detection path and share the new bottom-left name anchor: - GridCallAnalyzer: generalise nameAtBottom:Bool into a NameAnchor enum (.bottomCenter for Signal's centered footer, .bottomLeft for Meet/Zoom/Teams where the name hugs the tile's bottom-left corner, .center for completeness). tileRect estimates the tile up-and-right of a bottom-left name. - MeetAdapter (Google-blue ring, browser-hosted), ZoomAdapter (green/yellow border), TeamsAdapter (violet ring): coloured-border on, white-border off, bottom-left names. Geometry constants are first-pass pending real fixtures. - AdapterRegistry.adapter(for:) maps CallDetector.DetectedApp → AppAdapter so VisualObserver can be constructed when live visual capture is wired in; unmapped apps degrade to audio-only. Synthetic 4-tile tests: Meet picks each blue-bordered speaker with no adjacent-tile bleed, Zoom picks the green-bordered speaker, and Signal's white-only detector correctly ignores a coloured border. 18/18 XCTest pass.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import Foundation
|
||||
|
||||
/// Maps a detected call app to its screen-reading adapter. One place to wire new
|
||||
/// adapters; `VisualObserver` is constructed from whatever this returns when the
|
||||
/// live visual capture is integrated into the session.
|
||||
enum AdapterRegistry {
|
||||
/// The adapter for a detected app, or nil if that app has no visual adapter
|
||||
/// yet (the session then runs audio-only — graceful degradation).
|
||||
static func adapter(for app: CallDetector.DetectedApp) -> (any AppAdapter)? {
|
||||
switch app {
|
||||
case .signal: return SignalAdapter()
|
||||
case .meet: return MeetAdapter()
|
||||
case .zoom: return ZoomAdapter()
|
||||
case .teams: return TeamsAdapter()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user