Skip to content

[video_player] synchronize isPlaying state#3261

Merged
auto-submit[bot] merged 25 commits into
flutter:mainfrom
maRci002:track-playing-updates
Apr 3, 2023
Merged

[video_player] synchronize isPlaying state#3261
auto-submit[bot] merged 25 commits into
flutter:mainfrom
maRci002:track-playing-updates

Conversation

@maRci002

Copy link
Copy Markdown
Contributor

This was the original PR: flutter-team-archive/plugins#7198

Resolves flutter/flutter#49081.
Resolves flutter/flutter#120872.

This PR synchronizes isPlaying state between native and dart code, for example if a headset is unplugged or a phone call interrupts the video.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@hellohuanlin

Copy link
Copy Markdown
Contributor

Feel free to request review again when my comments in the original PR is addressed.

@maRci002

Copy link
Copy Markdown
Contributor Author

I've addressed your comments but removing those two dependency_overrides section results error like this:

Error (Xcode): ../lib/video_player.dart:441:29: Error: Member not found: 'isPlayingStateUpdate'.

@hellohuanlin hellohuanlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

iOS part looks good

Comment thread packages/video_player/video_player_android/example/pubspec.yaml Outdated
Comment thread packages/video_player/video_player_avfoundation/example/pubspec.yaml Outdated
@hellohuanlin

hellohuanlin commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

I've addressed your comments but removing those two dependency_overrides section results error like this: Error (Xcode): ../lib/video_player.dart:441:29: Error: Member not found: 'isPlayingStateUpdate'.

My understanding is that what you changed is the standard approach in 1p plugins. IIRC I have seen similar practice in other plugins. Without that overrides, the dependency would be the previously published version

@maRci002 maRci002 requested review from hellohuanlin and removed request for camsim99, ditman and tarrinneal February 23, 2023 08:39
@hellohuanlin

Copy link
Copy Markdown
Contributor

I stamped the iOS part. you probably wanna add back the reviewers for android/web.

@maRci002

Copy link
Copy Markdown
Contributor Author

How can add back the reviewers?

@ditman ditman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The web bits look good to me, this is a big update for the player, thanks for doing it!

@camsim99 camsim99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Android parts look good to me!

This PR made me realize the lack of test coverage on the Android native parts, so you could add a test for this change, but definitely not blocking for this PR. More-so a note to self :)

@BraveEvidence

Copy link
Copy Markdown

This will help https://www.youtube.com/watch?v=IMQdSTlTXjA

@maRci002

Copy link
Copy Markdown
Contributor Author

In my opinion this PR is ready

@gmackall

Copy link
Copy Markdown
Member

Is this PR missing anything in order to be able to merge?

@tarrinneal

Copy link
Copy Markdown
Contributor

Is this PR missing anything in order to be able to merge?

Seems ready to me.

@bparrishMines bparrishMines added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Apr 3, 2023
@auto-submit auto-submit Bot merged commit 43b5424 into flutter:main Apr 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 4, 2023
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
[video_player] synchronize isPlaying state
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
[video_player] synchronize isPlaying state
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
[video_player] synchronize isPlaying state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

9 participants