diff --git a/assets/src/components/admin/inspector.tsx b/assets/src/components/admin/inspector.tsx index 80f23d9f1..40ff03d91 100644 --- a/assets/src/components/admin/inspector.tsx +++ b/assets/src/components/admin/inspector.tsx @@ -86,7 +86,7 @@ const Inspector: ComponentType = () => { - + )} @@ -305,10 +305,7 @@ const DataControls: ComponentType<{ ); }; -const AudioControls: ComponentType<{ - config: Config; - screen: ScreenWithId; -}> = ({ config, screen }) => { +const AudioControls: ComponentType<{ screen: ScreenWithId }> = ({ screen }) => { const [isPlaying, setIsPlaying] = useState(false); const [ssml, setSSML] = useState(null); const dialogRef = useRef(null); @@ -318,24 +315,9 @@ const AudioControls: ComponentType<{ [dialogRef, ssml], ); - let audioPath: string | null = null; - let v1ScreenId: string | null = null; - - if (AUDIO_SCREEN_TYPES.has(screen.config.app_id)) { - // Temporarily special-case Busway screens while V2 doesn't support audio - // yet, in a way that aligns with how they're configured in reality (using - // the audio endpoint of a corresponding V1 screen). - if (screen.config.app_id == "busway_v2") { - const maybeV1Id = screen.id.replace(/-V2$/, ""); - - if (maybeV1Id != screen.id && config.screens[maybeV1Id]) { - audioPath = `/audio/${maybeV1Id}`; - v1ScreenId = maybeV1Id; - } - } else { - audioPath = `/v2/audio/${screen.id}`; - } - } + const audioPath = AUDIO_SCREEN_TYPES.has(screen.config.app_id) + ? `/v2/audio/${screen.id}` + : null; return (
@@ -361,14 +343,6 @@ const AudioControls: ComponentType<{ - {v1ScreenId && ( -
- - (from v1 screen {v1ScreenId}) - -
- )} -