-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[video_player] set message handler to nil on detach from engine #2814
Conversation
// This is the correct behavior we never did it in the past and the engine | ||
// doesn't currently support it. | ||
// FLTVideoPlayerApiSetup(registrar.messenger, nil); | ||
FLTVideoPlayerApiSetup(registrar.messenger, nil); |
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 57151 landed on stable yet
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.
So 2759 isn't an appropriate workaround? Since 57151 is on master but not stable, would conditionally setting the messageHandler to nil if not on stable work (i.e. calling flutter channel
using NSTask
and storing the active channel in an NSString
to make this check)?
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.
do you know if 57151 is already on stable v1.20.2?
@gaaclarke Can this get in now? |
flutter/engine#18428 was brought over in this roll flutter/flutter@f64f6e2 So, it's on stable. |
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.
Please rebase to resolve the conflicts, otherwise lgtm.
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.
LGTM, pending changelog/pubspec updates
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@cg021 I have a feeling your CLA is no longer valid - could you check? |
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.
LGTM
Description
Allow message handler to be set to nil when
detachFromEngineForRegistrar
is called inFLTVideoPlayerPlugin.m
on iOS. Method call handlers are already set to null on Android whenonDetachedFromEngine
is called. This behavior was commented out as a temporary patch before setting message handlers to nil when detaching from a dying engine was allowed in the flutter engine. It should be reintroduced to the plugin since the fix is in the engine.Related Issues
flutter/flutterfire_temporary#15, flutter/flutter#57151, flutter/engine#18428, #2759
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?