[video_player] Implements background playback functionality#9212
[video_player] Implements background playback functionality#9212ArvidNy wants to merge 25 commits intoflutter:mainfrom
Conversation
|
Thanks for the contribution! Please see https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins for the process to make a multi-package PR, so that our CI can run tests. |
|
Thanks for the link, I missed that! I might be missing something very obvious here, but I'm not sure how to update so that the remaining checks will complete. From what I understand it fails due to a cached version of I can get the camera example to run locally, but only if I use direct dependencies instead of overridden dependencies. What's the best approach here? Should I just remove the path-based dependencies for the camera example or is there another way to resolve it? |
|
@stuartmorgan-g It looks like
@ArvidNy You should be able to fix this by manually adding the rest of the dependencies to the failing plugins. They should look like: dependency_overrides:
video_player: {path: ../../../../packages/video_player/video_player}
video_player_android: {path: ../../../../packages/video_player/video_player_android}
video_player_avfoundation: {path: ../../../../packages/video_player/video_player_avfoundation}
video_player_platform_interface: {path: ../../../../packages/video_player/video_player_platform_interface}
video_player_web: {path: ../../../../packages/video_player/video_player_web}Let me know if that works. |
Yes, the tooling should account for that though.
That shouldn't have been necessary. What command did you run, exactly, to generate what's in the PR now? |
|
This is the command I ran: dart run script/tool/bin/flutter_plugin_tools.dart make-deps-path-based --target-dependencies=video_player_platform_interface,video_player_android,video_player_avfoundation,video_player,video_player_web |
|
Oh, and manually adding the rest of the dependency overrides does seem to resolve the issue, at least locally. So I can push that to resolve the PR tests if there's no other obvious fix for it. |
|
I see the issue; I've filed flutter/flutter#168538 to track it. The best solution in the context of this PR is to revert all the non- |
…terface dependency to version 6.5.0 across all packages
… for iOS; update comments for background playback handling
…ype; update related API interface and message handling
|
OK, I think it's finally ready for a re-review now. |
| # the parent directory to use the current plugin's version. | ||
| path: ../ | ||
| video_player_platform_interface: ^6.3.0 | ||
| video_player_platform_interface: ^6.5.0 |
| @@ -1,3 +1,7 @@ | |||
| ## 2.9.0 | |||
|
|
|||
| * Implements background playback functionality using allowBackgroundPlayback option. | |||
There was a problem hiding this comment.
This isn't really a true changelog as it's a no-op
| ## 2.5.0 | ||
|
|
||
| * Updates minimum supported SDK version to Flutter 3.29/Dart 3.7. | ||
| * Implements background playback functionality using allowBackgroundPlayback option. |
hellohuanlin
left a comment
There was a problem hiding this comment.
it looks like a no-op on ios side
|
From triage: @ArvidNy Happy new year! Are you planning on updating this based on the last review feedback? It looks like this is almost ready to start splitting into sub-PRs for landing. |
This pull request adds the missing implementation for background playback. This allows
video_playerto be used with e.g.audio_serviceto continue playing audio after the screen is closed or the app is move to the background. A sample implementation for testing can be found here: https://github.com/ArvidNy/video_player_audio_serviceCloses flutter/flutter#62739
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3