@@ -139,7 +139,7 @@ class SentryOnDemandReplay: NSObject, SentryReplayVideoMaker {
139
139
140
140
func createVideoAsyncWith( beginning: Date , end: Date , completion: @escaping ( [ SentryVideoInfo ] ? , Error ? ) -> Void ) {
141
141
// Note: In Swift it is best practice to use `Result<Value, Error>` instead of `(Value?, Error?)`
142
- // Due to interoperability with Objective-C and @objc, we can not use Result here .
142
+ // Due to interoperability with Objective-C and @objc, we can not use Result for the completion callback .
143
143
SentryLog . debug ( " [Session Replay] Creating video with beginning: \( beginning) , end: \( end) " )
144
144
145
145
// Dispatch the video creation to a background queue to avoid blocking the calling queue.
@@ -203,7 +203,7 @@ class SentryOnDemandReplay: NSObject, SentryReplayVideoMaker {
203
203
private func renderVideo( with videoFrames: [ SentryReplayFrame ] , from: Int , at outputFileURL: URL , completion: @escaping ( Result < SentryRenderVideoResult , Error > ) -> Void ) {
204
204
SentryLog . debug ( " [Session Replay] Rendering video with \( videoFrames. count) frames, from index: \( from) , to output url: \( outputFileURL) " )
205
205
guard from < videoFrames. count, let image = UIImage ( contentsOfFile: videoFrames [ from] . imagePath) else {
206
- SentryLog . debug ( " [Session Replay] Failed to render video, reason: index out of bounds or can't read image at path: \( videoFrames [ from] . imagePath) " )
206
+ SentryLog . error ( " [Session Replay] Failed to render video, reason: index out of bounds or can't read image at path: \( videoFrames [ from] . imagePath) " )
207
207
return completion ( . success( SentryRenderVideoResult (
208
208
info: nil ,
209
209
finalFrameIndex: from
@@ -218,7 +218,7 @@ class SentryOnDemandReplay: NSObject, SentryReplayVideoMaker {
218
218
do {
219
219
videoWriter = try AVAssetWriter ( url: outputFileURL, fileType: . mp4)
220
220
} catch {
221
- SentryLog . debug ( " [Session Replay] Failed to create video writer, reason: \( error) " )
221
+ SentryLog . error ( " [Session Replay] Failed to create video writer, reason: \( error) " )
222
222
return completion ( . failure( error) )
223
223
}
224
224
0 commit comments