Conversation
| case 'isSessionReplayActive': | ||
| // not supported on Web | ||
| // Flutter Web uses the JS SDK for Session replay | ||
| return false; |
There was a problem hiding this comment.
This is a behavior change needed to expose to public API.
Safeguard to skip session recordings in Flutter was moved to native_communicator.dart
| @@ -0,0 +1,109 @@ | |||
| # Disabled rules | |||
There was a problem hiding this comment.
ported from posthog-ios repo
| @@ -1,5 +1,9 @@ | |||
| ## Next | |||
|
|
|||
| - feat: add manual session recording control APIs ([#256](https://github.com/PostHog/posthog-flutter/pull/256)) | |||
There was a problem hiding this comment.
do those API work even if config.sessionReplay is disabled or both ways?
There was a problem hiding this comment.
That's what we did for the other sdks I believe. So if local config is false, people can start a recording later on manually.
If remote config/flags is false, then no-op
Trying to validate these with some local testing
|
|
||
| @override | ||
| Future<void> startSessionRecording({bool resumeCurrent = true}) async { | ||
| if (!isSupportedPlatform()) { |
There was a problem hiding this comment.
| if (!isSupportedPlatform()) { | |
| if (!isSupportedPlatform() || macOS) { |
all those methods should bail if its a macOS app since replay isnt supported, theres no need to call method channels if we know its not gonna work
the code above is just pseudocode
marandaneto
left a comment
There was a problem hiding this comment.
left 2 comments otherwise LGTM
💡 Motivation and Context
Closes #124
Docs PR: PostHog/posthog.com#14487
💚 How did you test it?
Manual testing:
📝 Checklist