diff --git a/Sources/HMSRoomKit/UIComponents/Conferencing/Internal/HMSOptionSheetView.swift b/Sources/HMSRoomKit/UIComponents/Conferencing/Internal/HMSOptionSheetView.swift index d99e67b..fe8a737 100644 --- a/Sources/HMSRoomKit/UIComponents/Conferencing/Internal/HMSOptionSheetView.swift +++ b/Sources/HMSRoomKit/UIComponents/Conferencing/Internal/HMSOptionSheetView.swift @@ -164,7 +164,8 @@ struct HMSOptionSheetView: View { } } - if !roomModel.transcript.isEmpty { + if roomModel.isTranscriptionAvailable { + HMSSessionMenuButton(text: captionsState.wrappedValue == .visible ? "Hide Captions" : "Show Captions", image: "captions-icon", highlighted: captionsState.wrappedValue == .visible) .onTapGesture { captionsState.wrappedValue = captionsState.wrappedValue == .visible ? .hidden : .visible diff --git a/Sources/HMSRoomKit/UIComponents/Conferencing/Toast Notifications/TranscriptView.swift b/Sources/HMSRoomKit/UIComponents/Conferencing/Toast Notifications/TranscriptView.swift index f10f833..1291825 100644 --- a/Sources/HMSRoomKit/UIComponents/Conferencing/Toast Notifications/TranscriptView.swift +++ b/Sources/HMSRoomKit/UIComponents/Conferencing/Toast Notifications/TranscriptView.swift @@ -46,21 +46,25 @@ struct HMSTranscriptView: View { let isChatOverlay = conferenceComponentParam.chat?.isOverlay ?? false if !(isChatOverlay && isChatPresented) { - if captionsState.wrappedValue == .visible { - viewBody + if roomModel.isTranscriptionAvailable { + if captionsState.wrappedValue == .visible { + viewBody + } } } else { - if captionsState.wrappedValue == .visible { - HMSTopControlStrip() - .padding([.bottom,.horizontal], 8) - .transition(.move(edge: .top)) - .frame(height: controlsState.wrappedValue == .hidden ? 0 : nil) - .opacity(0) - - viewBody - - Spacer() + if roomModel.isTranscriptionAvailable { + if captionsState.wrappedValue == .visible { + HMSTopControlStrip() + .padding([.bottom,.horizontal], 8) + .transition(.move(edge: .top)) + .frame(height: controlsState.wrappedValue == .hidden ? 0 : nil) + .opacity(0) + + viewBody + + Spacer() + } } } }