Skip to content

Commit 8cd072c

Browse files
committed
Update
1 parent ef13eb4 commit 8cd072c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,17 +492,23 @@ class SentryFlutterPlugin :
492492
var width = call.argument("width") as? Double ?: 0.0
493493
var height = call.argument("height") as? Double ?: 0.0
494494

495+
val frameRate = call.argument("frameRate") as? Int ?: 0
496+
val bitRate = call.argument("bitRate") as? Int ?: 0
497+
495498
val invalidConfig =
496499
width == 0.0 ||
497500
height == 0.0 ||
498501
windowWidth == 0.0 ||
499-
windowHeight == 0.0
502+
windowHeight == 0.0 ||
503+
frameRate <= 0 ||
504+
bitRate <= 0
500505

501506
if (invalidConfig) {
502507
result.error(
503508
"5",
504509
"Replay config is not valid: width: $width, height: $height, " +
505-
"windowWidth: $windowWidth, windowHeight: $windowHeight",
510+
"windowWidth: $windowWidth, windowHeight: $windowHeight" +
511+
"frameRate: $frameRate, bitRate: $bitRate",
506512
null,
507513
)
508514
return
@@ -525,8 +531,8 @@ class SentryFlutterPlugin :
525531
recordingHeight = height.roundToInt(),
526532
scaleFactorX = width.toFloat() / windowWidth.toFloat(),
527533
scaleFactorY = height.toFloat() / windowHeight.toFloat(),
528-
frameRate = call.argument("frameRate") as? Int ?: 0,
529-
bitRate = call.argument("bitRate") as? Int ?: 0,
534+
frameRate = frameRate,
535+
bitRate = bitRate,
530536
)
531537
Log.i(
532538
"Sentry",

0 commit comments

Comments
 (0)