Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@IlyaMax
Copy link
Contributor

@IlyaMax IlyaMax commented Feb 23, 2022

#4324 reopened this pr

Duplicated description from above issue
This PR introduces a new option to VideoPlayerOptions, which enables user to decide on whether user wants to keep playing video in the background or not.

This does NOT add functionality of video playback with controls. It could be achieved with audio_service package for instance.

Related issues
Fixes flutter/flutter#63836

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/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin 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.

@IlyaMax IlyaMax changed the title Add option to not observe lifecycle final pr [video_player] Added new field allowBackgroundPlayback Feb 23, 2022
@IlyaMax IlyaMax changed the title [video_player] Added new field allowBackgroundPlayback [video_player] Added new option to allowBackgroundPlayback Feb 23, 2022
@IlyaMax IlyaMax changed the title [video_player] Added new option to allowBackgroundPlayback [video_player] Added new option allowBackgroundPlayback Feb 23, 2022
required bool isObserving,
}) {
final wasPlayingBeforePause = controller.value.isPlaying;
WidgetsBinding.instance!
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll need to add _ambiguate to this file and call it on these lines to fix the analyzer issue on master.

issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.2.18
version: 2.3.0

Copy link
Contributor

Choose a reason for hiding this comment

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

You need to update the video_player_platform_interface minimum version to require the version that added the new option. As written someone's project could pass through package resolution with a version that wouldn't compile.

@ghost
Copy link

ghost commented Mar 8, 2022

Hi @IlyaMax, thanks so much for doing this work.

I really need this for a project soon so I've picked up and continued this PR in #5013. I hope you're doing ok!

@IlyaMax
Copy link
Contributor Author

IlyaMax commented Mar 8, 2022

@EconomicEgret yes, thanks, I'm not interested in this pr for now, hope you finish it.

@IlyaMax
Copy link
Contributor Author

IlyaMax commented Mar 8, 2022

I close this as you can continue

@IlyaMax IlyaMax closed this Mar 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[video_player] Keep audio playing in background

2 participants