Skip to content

Commit ef70110

Browse files
authored
Merge 6942db1 into 724865d
2 parents 724865d + 6942db1 commit ef70110

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ internal class SimpleVideoEncoder(
136136
)
137137
format.setInteger(MediaFormat.KEY_BIT_RATE, bitRate)
138138
format.setFloat(MediaFormat.KEY_FRAME_RATE, muxerConfig.frameRate.toFloat())
139-
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, -1) // use -1 to force always non-key frames, meaning only partial updates to save the video size
139+
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10) // use 10 to force non-key frames, meaning only partial updates to save the video size. Every 10th second is a key frame, which is useful for buffer mode
140140

141141
format
142142
}

sentry/src/main/java/io/sentry/SentryReplayOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ public final class SentryReplayOptions {
1111

1212
public static final String TEXT_VIEW_CLASS_NAME = "android.widget.TextView";
1313
public static final String IMAGE_VIEW_CLASS_NAME = "android.widget.ImageView";
14+
public static final String WEB_VIEW_CLASS_NAME = "android.webkit.WebView";
15+
public static final String VIDEO_VIEW_CLASS_NAME = "android.widget.VideoView";
16+
public static final String EXOPLAYER_VIEW_CLASS_NAME = "androidx.media3.ui.PlayerView";
1417

1518
public enum SentryReplayQuality {
1619
/** Video Scale: 80% Bit Rate: 50.000 */
@@ -99,6 +102,9 @@ public enum SentryReplayQuality {
99102
public SentryReplayOptions() {
100103
setMaskAllText(true);
101104
setMaskAllImages(true);
105+
maskViewClasses.add(WEB_VIEW_CLASS_NAME);
106+
maskViewClasses.add(VIDEO_VIEW_CLASS_NAME);
107+
maskViewClasses.add(EXOPLAYER_VIEW_CLASS_NAME);
102108
}
103109

104110
public SentryReplayOptions(

0 commit comments

Comments
 (0)