-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[video_player_platform_interface] Improve seek performance on Android #11932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7b03d11
7811816
d55829f
10730e3
4c613f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -472,7 +472,11 @@ class VideoPlayerOptions { | |
| this.allowBackgroundPlayback = false, | ||
| this.preventsDisplaySleepDuringVideoPlayback = true, | ||
| this.webOptions, | ||
| }); | ||
| this.backBufferDurationMs, | ||
| }) : assert( | ||
| backBufferDurationMs == null || backBufferDurationMs >= 0, | ||
| 'backBufferDurationMs must be zero or greater', | ||
| ); | ||
|
|
||
| /// Set this to true to keep playing video in background, when app goes in background. | ||
| /// The default value is false. | ||
|
|
@@ -494,6 +498,12 @@ class VideoPlayerOptions { | |
|
|
||
| /// Additional web controls | ||
| final VideoPlayerWebOptions? webOptions; | ||
|
|
||
| /// The duration, in milliseconds, of media to retain in the buffer prior to | ||
| /// the current playback position. | ||
| /// | ||
| /// Ignored on platforms that do not support controlling the back buffer. | ||
| final int? backBufferDurationMs; | ||
|
mboetger marked this conversation as resolved.
|
||
| } | ||
|
|
||
| /// [VideoPlayerWebOptions] can be optionally used to set additional web settings | ||
|
|
@@ -593,13 +603,20 @@ class VideoViewOptions { | |
| @immutable | ||
| class VideoCreationOptions { | ||
| /// Constructs an instance of [VideoCreationOptions]. | ||
| const VideoCreationOptions({required this.dataSource, required this.viewType}); | ||
| const VideoCreationOptions({ | ||
| required this.dataSource, | ||
| required this.viewType, | ||
| this.videoPlayerOptions, | ||
| }); | ||
|
|
||
| /// The data source used to create the player. | ||
| final DataSource dataSource; | ||
|
|
||
| /// The type of view to be used for displaying the video player | ||
| final VideoViewType viewType; | ||
|
|
||
| /// Additional configuration options for the video player. | ||
| final VideoPlayerOptions? videoPlayerOptions; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Composing the two different options classes seems potentially confusing, but it doesn't look like the API surface ever clearly distinguished these conceptually. Since @tarrinneal As part of revisiting the |
||
| } | ||
|
|
||
| /// Represents an audio track in a video with its metadata. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.