Skip to content

Commit b15c746

Browse files
Play audio in videos when in silent mode
1 parent 7701739 commit b15c746

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
### ✅ Added
77
- Config for changing supported media types in the composer
88

9+
### 🐞 Fixed
10+
- Play audio in videos when in silent mode
11+
912
# [4.37.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.37.0)
1013
_September 18, 2023_
1114

Sources/StreamChatSwiftUI/ChatChannel/Gallery/VideoPlayerView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public struct VideoPlayerView: View {
4848
.foregroundColor(Color(colors.text))
4949
}
5050
.onAppear {
51+
try? AVAudioSession.sharedInstance().setCategory(.playback, options: [])
5152
avPlayer.play()
5253
}
5354
}

0 commit comments

Comments
 (0)