File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import 'package:meta/meta.dart';
55import '../../sentry_flutter.dart' ;
66import '../event_processor/replay_event_processor.dart' ;
77import '../native/sentry_native_binding.dart' ;
8+ import 'replay_config.dart' ;
89
910@internal
1011const replayIntegrationName = 'ReplayIntegration' ;
@@ -24,6 +25,18 @@ class ReplayIntegration extends Integration<SentryFlutterOptions> {
2425 if ((options.experimental.replay.onErrorSampleRate ?? 0 ) > 0 ) {
2526 options.addEventProcessor (ReplayEventProcessor (hub, _native));
2627 }
28+
29+ SentryScreenshotWidget .onBuild ((status, prevStatus) {
30+ if (status != prevStatus) {
31+ _native.setReplayConfig (ReplayConfig (
32+ width: status.size? .width.round () ?? 0 ,
33+ height: status.size? .height.round () ?? 0 ,
34+ frameRate: 1 ,
35+ bitRate: 75000 , // TODO replay quality config
36+ ));
37+ }
38+ return true ;
39+ });
2740 }
2841 }
2942}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class ReplayConfig extends ScheduledScreenshotRecorderConfig {
1313
1414 final int bitRate;
1515
16- ReplayConfig ({
16+ const ReplayConfig ({
1717 required int super .width,
1818 required int super .height,
1919 required super .frameRate,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import '../screenshot/recorder_config.dart';
33class ScheduledScreenshotRecorderConfig extends ScreenshotRecorderConfig {
44 final int frameRate;
55
6- ScheduledScreenshotRecorderConfig ({
6+ const ScheduledScreenshotRecorderConfig ({
77 super .width,
88 super .height,
99 required this .frameRate,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class ScreenshotRecorderConfig {
77 final int ? width;
88 final int ? height;
99
10- ScreenshotRecorderConfig ({
10+ const ScreenshotRecorderConfig ({
1111 this .width,
1212 this .height,
1313 });
You can’t perform that action at this time.
0 commit comments