Skip to content

Commit

Permalink
feat: add session replay automatic start config
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannisj committed Dec 13, 2024
1 parent 581a08b commit 5faf328
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions PostHog/Replay/PostHogSessionReplayConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
/// Defaults to 1s
@objc public var debouncerDelay: TimeInterval = 1.0

/// Whether to start session replay automatically or manually during the SDK setup
/// Options are:
/// - .automatic: Start session replay automatically during the SDK setup
/// - .manual: Start/Stop session replay manually by calling `startSessionReplay()` and `stopSessionReplay()`
/// Default is .automatic
@objc public var startMode: PostHogSessionReplayStartMode = .automatic

// TODO: sessionRecording config such as networkPayloadCapture, captureConsoleLogs, sampleRate, etc
}

@objc(PostHogSessionReplayStartMode) public enum PostHogSessionReplayStartMode: Int32 {
case automatic
case manual
}
#endif

0 comments on commit 5faf328

Please sign in to comment.