-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[video_player] #60048 ios picture in picture #3500
base: main
Are you sure you want to change the base?
[video_player] #60048 ios picture in picture #3500
Conversation
@hellohuanlin & @stuartmorgan I did the migration from flutter/plugins#6284 to here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
carrying over the stamp from previous PR
@tarrinneal can I assist you with the review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial pass. A few changes to be made. Good work on this!
packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
Outdated
Show resolved
Hide resolved
packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart
Outdated
Show resolved
Hide resolved
packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m
Outdated
Show resolved
Hide resolved
packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m
Outdated
Show resolved
Hide resolved
packages/video_player/video_player_avfoundation/ios/Classes/FLTVideoPlayerPlugin.m
Outdated
Show resolved
Hide resolved
packages/video_player/video_player_platform_interface/CHANGELOG.md
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/video_player/video_player/CHANGELOG.md # packages/video_player/video_player/lib/video_player.dart # packages/video_player/video_player/pubspec.yaml # packages/video_player/video_player_android/example/lib/mini_controller.dart # packages/video_player/video_player_avfoundation/CHANGELOG.md # packages/video_player/video_player_avfoundation/example/lib/mini_controller.dart # packages/video_player/video_player_avfoundation/lib/src/avfoundation_video_player.dart # packages/video_player/video_player_avfoundation/pubspec.yaml
…tsPictureInPicture
@tarrinneal I updated my pull request fully retested it to make sure it does what I expect. |
@@ -106,6 +107,9 @@ class VideoPlayerValue { | |||
/// The current speed of the playback. | |||
final double playbackSpeed; | |||
|
|||
/// True if picture-in-picture is currently active. | |||
final bool isPictureInPictureActive; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vanlooverenkoen
Nice job, I'm in need of this feature.
I'm testing this pr in a project and I found a bug when updating this value. This property is not used in the bool operator ==(Object other)
function, so it is not updated in the ValueNotifier. Can you fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn! Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like you added a Dart unit test to cover that change (i.e., one which would have caught this bug).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like you added a Dart unit test to cover that change (i.e., one which would have caught this bug).
This doesn't appear to have been resolved.
Seems like you still have a few broken tests. I should be able to get this re-reviewed this week, if you can git them sorted out. |
@tarrinneal the tests are failing on camera because of the dependency overrides. How should I handle this? Because the dependency override script doesn't update it in the camera package. I will fix the merge conflicts today |
Anyone interested in completing this PR is welcome to do so. |
Hello @vanlooverenkoen, I'm trying your branch to use the PiP mode with the
After doing a whole
Flutter doctor[✓] Flutter (Channel stable, 3.24.5, on macOS 15.1.1 24B91 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.95.3)
[✓] Connected device (3 available)
[✓] Network resources
Do you know how I could fix this? Thanks a lot in advance ✨ I got the package to work by overide the depency in the
And in the
For now this is the only good workround that I found to solve the PiP issue 🫡 |
@vanlooverenkoen do you have a plan update this PR with latest videoplayer changes? |
Hi @vanlooverenkoen and @stuartmorgan, I've picked up the old branch and merged all changes from main. I've also done some refactoring and regenerating the pigeon files. Thanks for all the hard work and kindest regards, |
Thanks @Nols1000!!! It has been quite a hectic year for me! I don't have an active project where I use the video_player package which makes it even harder to stay on top of this pull request. So thanks @Nols1000 for updating & fixing the merge conflicts. I have some fixes on my branch I did a couple weeks ago (not tested & not committed), but new merge conflicts are already added again. @stuartmorgan I really want to get this merged, but what do you think is the best way forward?
I calculated all the hours I have spend on this PR and it is already 41,5hours sinds august 2022. So it would be ashame if all that time was for nothing. So thanks again @Nols1000 🙏 |
Hi @vanlooverenkoen, |
Either one is fine; usually when people pick up unfinished PRs they aren't able to push to them so make a new PR, but since that's not an issue here continuing with the same PR shouldn't have any issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of quick notes on the updated version until I have time for a full review.
#import "./include/video_player_avfoundation/AVAssetTrackUtils.h" | ||
#import "AVAssetTrackUtils.h" | ||
#import "FVPDisplayLink.h" | ||
#import "messages.g.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local imports need to use project-relative paths; fixing that should fix the build_all CI failures.
@@ -4,10 +4,14 @@ | |||
|
|||
#import "./include/video_player_avfoundation/FVPVideoPlayer.h" | |||
#import "./include/video_player_avfoundation/FVPVideoPlayer_Test.h" | |||
#import "./include/video_player_avfoundation/AVAssetTrackUtils.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is incorrect; please see the style guide rules for header import ordering.
@@ -1,7 +1,7 @@ | |||
// Copyright 2013 The Flutter Authors. All rights reserved. | |||
// Use of this source code is governed by a BSD-style license that can be | |||
// found in the LICENSE file. | |||
// Autogenerated from Pigeon (v22.5.0), do not edit directly. | |||
// Autogenerated from Pigeon (v22.7.2), do not edit directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was video_player_android
Pigeon code regenerated for this PR?
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
This feature is only available on iOS because android has a different implementation. simple_pip_mode can be used for Android
Fixes flutter/flutter#60048
Migration from flutter/plugin to flutter/packages is done with this pr
old pr: flutter/plugins#6284
No migration needed this is an addon
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.