Skip to content

[video_player] synchronize isPlaying state #3261

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

Merged
merged 25 commits into from
Apr 3, 2023

Conversation

maRci002
Copy link
Contributor

This was the original PR: flutter/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
Contributor

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

@maRci002
Copy link
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'.

Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

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

iOS part looks good

@hellohuanlin
Copy link
Contributor

hellohuanlin commented Feb 22, 2023

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 ditman, camsim99 and tarrinneal February 23, 2023 08:39
@hellohuanlin
Copy link
Contributor

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

@maRci002
Copy link
Contributor Author

How can add back the reviewers?

Copy link
Member

@ditman ditman left a comment

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!

Copy link
Contributor

@camsim99 camsim99 left a comment

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 :)

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

It looks like this also already has approval for, iOS, web, and Android. So, I'll take a look at #3361.

@BraveEvidence
Copy link

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

@maRci002
Copy link
Contributor Author

In my opinion this PR is ready

@gmackall
Copy link
Member

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

@tarrinneal
Copy link
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
9 participants