You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Sailendra Bathi
committed
[video_player] Improve seek performance on Android
Adds `backBufferDurationMs` to `VideoPlayerOptions` and configures ExoPlayer's `DefaultLoadControl` to retain the back buffer from keyframes. This significantly improves seek performance and responsiveness during video playback on Android.
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerOptions.java
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,17 @@
6
6
7
7
publicclassVideoPlayerOptions {
8
8
publicbooleanmixWithOthers;
9
+
10
+
/**
11
+
* The duration of the back buffer in milliseconds, used to configure ExoPlayer's load control.
12
+
*/
13
+
publicLongbackBufferDurationMs;
14
+
15
+
publicVideoPlayerOptions() {}
16
+
17
+
/** Copy constructor to ensure all options are reliably copied. */
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -87,12 +87,15 @@ public long createForPlatformView(@NonNull CreationOptions options) {
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/platformview/PlatformViewVideoPlayer.java
0 commit comments