Commit c8d6440
Add native audio attachment playback in the message list (#1574)
* Extract shared audio playback into AudioSessionHandler
Voice recordings and audio files both drive the same player, so the handler no longer lives next to voice-only views.
* Add a linear playback progress bar
Audio files need a seekable track instead of the voice-recording waveform.
* Add native audio file attachments in the message list
Audio files now play inline with a dedicated player instead of rendering as generic file attachments.
* Snapshot audio attachments with and without captions
Cover both Figma layouts in the message bubble and drop the redundant MessageAttachmentsView snapshot.
* Share AudioSessionHandler across audio and voice playback
Keep play/pause state in sync when switching between audio files and voice recordings by using a single shared handler.
* Share audio playback logic between audio and voice attachments
Extract the queue advancing, playback state updates, play button chrome
and duration loading into shared components, and group the audio utils
under Utils/Audio.
* Update CHANGELOG for native audio attachment playback
* Update CHANGELOG.md
* Initialize audio attachment container from view options
Keep the public initializer stable by taking AudioAttachmentViewOptions
instead of individual parameters.
* Stop audio playback on channel cleanup regardless of voice recording
Clean up the shared player whenever one is active so audio attachments
do not keep playing after leaving a channel with voice recording off.
* Advance audio queues only for the stopped attachment
Ignore stop events from other assets so a shared session cannot start
the next file in an unrelated message.
* Use the shared CommonUI audio file icon
Drop the local file-audio asset and pin stream-chat-swift so SwiftUI
can use Appearance.Images.iconAudio.
* Point StreamChat dependency at the LLC audio branch
Track fix/audio-type-attachments-support while the UIKit PR is in
review so SwiftUI can build against iconAudio and related changes.
* Update StreamChat dependency to latest develop
Pin stream-chat-swift at d1bba90 now that the UIKit audio attachment
work is merged.
* [CI] Snapshots (#1576)
Co-authored-by: Stream Bot <ci@getstream.io>
---------
Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com>
Co-authored-by: Stream Bot <ci@getstream.io>1 parent cab0154 commit c8d6440
155 files changed
Lines changed: 1281 additions & 244 deletions
File tree
- Sources/StreamChatSwiftUI
- ChatChannel
- ChannelInfo
- ChatComposer/Attachments
- VoiceRecording
- ChatMessageList
- AsyncVoiceMessages
- AudioAttachments
- CommonViews
- Generated
- Resources
- Assets.xcassets
- en.lproj
- Utils
- Audio
- ViewFactory
- Options
- StreamChatSwiftUI.xcodeproj
- StreamChatSwiftUITests/Tests
- ChatChannel
- ChannelInfo/__Snapshots__/ChatChannelInfoView_Tests
- __Snapshots__
- AudioAttachmentView_Tests
- FileAttachmentView_Tests
- MessageComposerView_Tests
- MessageView_Tests
- CommonViews/__Snapshots__/StreamButton_Tests
- Utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Lines changed: 3 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
255 | 247 | | |
256 | 248 | | |
257 | 249 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
896 | 896 | | |
| 897 | + | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 18 additions & 136 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 20 | + | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
| |||
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
| 34 | + | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
90 | 68 | | |
91 | 69 | | |
92 | 70 | | |
| |||
105 | 83 | | |
106 | 84 | | |
107 | 85 | | |
108 | | - | |
109 | | - | |
| 86 | + | |
110 | 87 | | |
111 | 88 | | |
112 | 89 | | |
113 | 90 | | |
114 | 91 | | |
115 | 92 | | |
116 | 93 | | |
| 94 | + | |
| 95 | + | |
117 | 96 | | |
118 | 97 | | |
119 | 98 | | |
120 | 99 | | |
121 | | - | |
122 | | - | |
| 100 | + | |
| 101 | + | |
123 | 102 | | |
124 | 103 | | |
125 | 104 | | |
| |||
137 | 116 | | |
138 | 117 | | |
139 | 118 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 119 | + | |
150 | 120 | | |
151 | 121 | | |
152 | 122 | | |
153 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
154 | 128 | | |
155 | 129 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 130 | | |
166 | 131 | | |
167 | 132 | | |
| |||
200 | 165 | | |
201 | 166 | | |
202 | 167 | | |
203 | | - | |
| 168 | + | |
204 | 169 | | |
205 | 170 | | |
206 | 171 | | |
| |||
225 | 190 | | |
226 | 191 | | |
227 | 192 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
0 commit comments