File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Sources/StreamVideo/Utils
AudioSession/AudioRecorder/Extensions Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,15 @@ extension AVAudioRecorder {
88
88
]
89
89
) throws -> AVAudioRecorder {
90
90
// Get the cache directory for temporary audio storage
91
- let documentPath = FileManager . default. urls (
92
- for: . cachesDirectory,
93
- in: . userDomainMask
94
- ) [ 0 ]
95
-
91
+ guard
92
+ let documentPath = FileManager . default. urls (
93
+ for: . cachesDirectory,
94
+ in: . userDomainMask
95
+ ) . first
96
+ else {
97
+ throw ClientError ( " No cache directory available. " )
98
+ }
99
+
96
100
// Construct the full file URL
97
101
let fileURL = documentPath. appendingPathComponent ( filename)
98
102
Original file line number Diff line number Diff line change 2
2
// Copyright © 2025 Stream.io Inc. All rights reserved.
3
3
//
4
4
5
- /// Base class for store middleware that intercept actions for side effects.
5
+ /// Base class for store middleware that intercepts actions for side effects.
6
6
///
7
- /// Middleware sit between action dispatch and state reduction, allowing you
7
+ /// Middleware sits between action dispatch and state reduction, allowing you
8
8
/// to:
9
9
/// - Perform asynchronous operations
10
10
/// - Dispatch additional actions
14
14
///
15
15
/// ## Architecture
16
16
///
17
- /// Middleware receive actions before reducers process them. They can:
17
+ /// Middleware receives actions before reducers process them. They can:
18
18
/// 1. Perform side effects (API calls, timers, etc.)
19
19
/// 2. Dispatch new actions via the `dispatcher`
20
20
/// 3. Access current state via the `state` property
You can’t perform that action at this time.
0 commit comments