You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactors and simplifies some of the native code in `video_player_avfoundation`:
- Separates `create` into two different entry points for the two display types, instead of having one entry point and then branching several times based on the display type.
- Moves `dispose` to the player instance, with the other instance-specific calls, by making plugin-level tracking cleanup part of `onDispose`.
- Moves the URL->`AVPlayerItem` logic out of the two player classes and into a central helper in the plugin class, reducing duplication and simplifying the player initialization logic.
- Addresses the TODO to separate texture IDs from player IDs.
- Makes `expectFrame` a private implementation detail rather than making a client call it.
- Removes an ARC check; we have used ARC everywhere in this repo for a long time.
Part of flutter/flutter#172763
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h
+7-12Lines changed: 7 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -14,22 +14,17 @@ NS_ASSUME_NONNULL_BEGIN
14
14
/// updates frames, and handles display link callbacks.
15
15
/// If you need to display a video using platform view, use FVPVideoPlayer instead.
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h
+5-9Lines changed: 5 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -36,15 +36,11 @@ NS_ASSUME_NONNULL_BEGIN
36
36
/// A block that will be called when dispose is called.
Copy file name to clipboardExpand all lines: packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,6 @@ NS_ASSUME_NONNULL_BEGIN
25
25
/// Indicates whether the video player has been initialized.
0 commit comments