Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions packages/video_player/video_player_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.8.4

* Fixes a [bug](https://github.com/flutter/flutter/issues/165149) where the `isBuffering` flag
always returns true after seeking to any position.

## 2.8.3

* Changes plugin to use `TextureRegistry.SurfaceProducer.handlesCropAndRotation` to detect
Expand Down Expand Up @@ -110,7 +115,9 @@

## 2.7.0

* Re-adds [support for Impeller](https://docs.flutter.dev/release/breaking-changes/android-surface-plugins).
*

Re-adds [support for Impeller](https://docs.flutter.dev/release/breaking-changes/android-surface-plugins).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this change:

Suggested change
*
Re-adds [support for Impeller](https://docs.flutter.dev/release/breaking-changes/android-surface-plugins).
* Re-adds [support for Impeller](https://docs.flutter.dev/release/breaking-changes/android-surface-plugins).


## 2.6.0

Expand Down Expand Up @@ -161,7 +168,8 @@
## 2.4.12

* Updates compileSdk version to 34.
* Adds error handling for `BehindLiveWindowException`, which may occur upon live-video playback failure.
* Adds error handling for `BehindLiveWindowException`, which may occur upon live-video playback
failure.

## 2.4.11

Expand Down Expand Up @@ -208,7 +216,8 @@

## 2.4.1

* Changes the severity of `javac` warnings so that they are treated as errors and fixes the violations.
* Changes the severity of `javac` warnings so that they are treated as errors and fixes the
violations.

## 2.4.0

Expand Down Expand Up @@ -247,15 +256,17 @@
## 2.3.7

* Bumps gradle version to 7.2.1.
* Ignores unnecessary import warnings in preparation for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/106316).
* Ignores unnecessary import warnings in preparation
for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/106316).

## 2.3.6

* Updates references to the obsolete master branch.

## 2.3.5

* Sets rotationCorrection for videos recorded in landscapeRight (https://github.com/flutter/flutter/issues/60327).
* Sets rotationCorrection for videos recorded in
landscapeRight (https://github.com/flutter/flutter/issues/60327).

## 2.3.4

Expand All @@ -264,7 +275,8 @@
## 2.3.3

* Removes unnecessary imports.
* Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors
* Fixes library_private_types_in_public_api, sort_child_properties_last and
use_key_in_widget_constructors
lint warnings.

## 2.3.2
Expand All @@ -284,3 +296,4 @@
## 2.2.17

* Splits from `video_player` as a federated implementation.
`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this change too.

Also nit: the rest of the changes seem like auto-formatter changes, that are not needed.

Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ public void onPlaybackStateChanged(final int playbackState) {
events.onBufferingUpdate(exoPlayer.getBufferedPosition());
break;
case Player.STATE_READY:
if (isInitialized) {
return;
if (!isInitialized) {
isInitialized = true;
sendInitialized();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes in theory seems reasonable to me! Can you please add a test for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will add test case.

}
isInitialized = true;
sendInitialized();
break;
case Player.STATE_ENDED:
events.onCompleted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ public void onPlaybackStateChangedEndedAfterBufferingSendsBufferingEndAndOnCompl
verifyNoMoreInteractions(mockCallbacks);
}

@Test
public void onPlaybackStateChangedReadyAfterBufferingSendsBufferingEnd() {
when(mockExoPlayer.getBufferedPosition()).thenReturn(10L);
eventListener.onPlaybackStateChanged(Player.STATE_BUFFERING);
verify(mockCallbacks).onBufferingStart();
verify(mockCallbacks).onBufferingUpdate(10L);

eventListener.onPlaybackStateChanged(Player.STATE_READY);
verify(mockCallbacks).onBufferingEnd();

verifyNoMoreInteractions(mockCallbacks);
}

@Test
public void onPlaybackStateChangedIdleDoNothing() {
eventListener.onPlaybackStateChanged(Player.STATE_IDLE);
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player/video_player_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_android
description: Android implementation of the video_player plugin.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.8.3
version: 2.8.4

environment:
sdk: ^3.6.0
Expand Down