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
[video_player] Move Android to per-player-instance Pigeon APIs (#9511)
Rather than having a single API to talk directly to the plugin, and having most of the methods in that API just do a map lookup and dispatch to a player instance, which was necessary when Pigeon didn't support instantiating multiple instances of an API, have each player instance set up an API instance that the Dart code can talk to directly. This follows the pattern used by plugins that migrated to Pigeon more recently (e.g., `google_maps_flutter` has a very similar pattern), reduces boilerplate native code, and moves closer to what an FFI-based implementation would look like if we go that route in the future.
Since the Dart unit tests needed to be significantly reworked anyway, this also moves to the pattern we are using in newer plugin code, where we use `mockito` to mock the Pigeon API surface. The "call log" approach it replaces dates back to pre-Pigeon, when only way to test that the right platform calls were made was to intercept and track method channel calls at the framework level.
Also updates to the latest version of Pigeon.
## Pre-Review Checklist
[^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_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java
+62-50Lines changed: 62 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
-
// Autogenerated from Pigeon (v22.6.1), do not edit directly.
4
+
// Autogenerated from Pigeon (v25.5.0), do not edit directly.
5
5
// See also: https://pub.dev/packages/pigeon
6
6
7
7
packageio.flutter.plugins.videoplayer;
@@ -380,28 +380,12 @@ public interface AndroidVideoPlayerApi {
Copy file name to clipboardExpand all lines: packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
+37-13Lines changed: 37 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,10 @@
21
21
*
22
22
* <p>It provides methods to control playback, adjust volume, and handle seeking.
0 commit comments