Skip to content

Commit 55d11dd

Browse files
committed
Merge branch 'master' into add_zoom_to_android_webview
* master: [webview_flutter] Add download listener to Android webview (flutter#4322) [video_player] add support for content-uri based videos (flutter#4330) [webview_flutter] Implementation of the webview_flutter_platform_interface package (flutter#4302) [camera] Bump minimum Flutter version and iOS deployment target (flutter#4327) [video_player] interface: add support for content-uri based videos (android only) (flutter#4307) Ignore unnecessary_import in legacy analysis options (flutter#4129) [ci] Enable the new Windows targets (flutter#4325) # Conflicts: # packages/webview_flutter/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java # packages/webview_flutter/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewBuilder.java
2 parents 31a20db + 5e4b5e0 commit 55d11dd

File tree

55 files changed

+2020
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2020
-73
lines changed

.ci.yaml

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,11 @@ platform_properties:
3535
os: Windows
3636

3737
targets:
38-
# TODO(stuartmorgan) Remove once the renamed version below has propagated.
39-
- name: Windows Plugins master channel
40-
recipe: plugins/plugins
41-
timeout: 30
42-
properties:
43-
add_recipes_cq: "true"
44-
target_file: windows_build_and_platform_tests.yaml
45-
dependencies: >
46-
[
47-
{"dependency": "vs_build"}
48-
]
49-
scheduler: luci
50-
51-
# TODO(stuartmorgan) Remove once the renamed version below has propagated.
52-
- name: Windows Plugins stable channel
53-
recipe: plugins/plugins
54-
timeout: 30
55-
properties:
56-
add_recipes_cq: "true"
57-
target_file: windows_build_and_platform_tests.yaml
58-
channel: stable
59-
dependencies: >
60-
[
61-
{"dependency": "vs_build"}
62-
]
63-
scheduler: luci
64-
6538
- name: Windows win32-platform_tests master
6639
recipe: plugins/plugins
67-
bringup: true
6840
timeout: 30
6941
properties:
70-
# TODO(stuartmorgan): Uncomment when removing bringup.
71-
#add_recipes_cq: "true"
42+
add_recipes_cq: "true"
7243
target_file: windows_build_and_platform_tests.yaml
7344
dependencies: >
7445
[
@@ -78,11 +49,9 @@ targets:
7849

7950
- name: Windows win32-platform_tests stable
8051
recipe: plugins/plugins
81-
bringup: true
8252
timeout: 30
8353
properties:
84-
# TODO(stuartmorgan): Uncomment when removing bringup.
85-
#add_recipes_cq: "true"
54+
add_recipes_cq: "true"
8655
target_file: windows_build_and_platform_tests.yaml
8756
channel: stable
8857
dependencies: >
@@ -93,11 +62,9 @@ targets:
9362

9463
- name: Windows windows-build_all_plugins master
9564
recipe: plugins/plugins
96-
bringup: true
9765
timeout: 30
9866
properties:
99-
# TODO(stuartmorgan): Uncomment when removing bringup.
100-
#add_recipes_cq: "true"
67+
add_recipes_cq: "true"
10168
target_file: build_all_plugins.yaml
10269
dependencies: >
10370
[
@@ -107,11 +74,9 @@ targets:
10774

10875
- name: Windows windows-build_all_plugins stable
10976
recipe: plugins/plugins
110-
bringup: true
11177
timeout: 30
11278
properties:
113-
# TODO(stuartmorgan): Uncomment when removing bringup.
114-
#add_recipes_cq: "true"
79+
add_recipes_cq: "true"
11580
target_file: build_all_plugins.yaml
11681
channel: stable
11782
dependencies: >
@@ -122,11 +87,9 @@ targets:
12287

12388
- name: Windows uwp-platform_tests master
12489
recipe: plugins/plugins
125-
bringup: true
12690
timeout: 30
12791
properties:
128-
# TODO(stuartmorgan): Uncomment when removing bringup.
129-
#add_recipes_cq: "true"
92+
add_recipes_cq: "true"
13093
target_file: uwp_build_and_platform_tests.yaml
13194
dependencies: >
13295
[
@@ -136,11 +99,9 @@ targets:
13699

137100
- name: Windows plugin_tools_tests
138101
recipe: plugins/plugins
139-
bringup: true
140102
timeout: 30
141103
properties:
142-
# TODO(stuartmorgan): Uncomment when removing bringup.
143-
#add_recipes_cq: "true"
104+
add_recipes_cq: "true"
144105
target_file: plugin_tools_tests.yaml
145106
scheduler: luci
146107

analysis_options_legacy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ analyzer:
77
- '**/*.mocks.dart' # Mockito @GenerateMocks
88
errors:
99
always_require_non_null_named_parameters: false # not needed with nnbd
10+
# TODO(https://github.com/flutter/flutter/issues/74381):
11+
# Clean up existing unnecessary imports, and remove line to ignore.
12+
unnecessary_import: ignore
1013
unnecessary_null_comparison: false # Turned as long as nnbd mix-mode is supported.
1114
linter:
1215
rules:

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.3
2+
3+
* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
4+
15
## 0.9.2+2
26

37
* Ensure that setting the exposure offset returns the new offset value on Android.

packages/camera/camera/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A Flutter plugin for iOS and Android allowing access to the device cameras.
66

77
*Note*: This plugin is still under development, and some APIs might not be available yet. We are working on a refactor which can be followed here: [issue](https://github.com/flutter/flutter/issues/31225)
88

9-
## Features:
9+
## Features
1010

1111
* Display live camera preview in a widget.
1212
* Snapshots can be captured and saved to a file.
@@ -19,7 +19,9 @@ First, add `camera` as a [dependency in your pubspec.yaml file](https://flutter.
1919

2020
### iOS
2121

22-
iOS 10.0 of higher is needed to use the camera plugin. If compiling for any version lower than 10.0 make sure to check the iOS version before using the camera plugin. For example, using the [device_info_plus](https://pub.dev/packages/device_info_plus) plugin.
22+
The camera plugin functionality works on iOS 10.0 or higher. If compiling for any version lower than 10.0,
23+
make sure to programmatically check the version of iOS running on the device before using any camera plugin features.
24+
The [device_info_plus](https://pub.dev/packages/device_info_plus) plugin, for example, can be used to check the iOS version.
2325

2426
Add two rows to the `ios/Runner/Info.plist`:
2527

packages/camera/camera/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<string>arm64</string>
2626
</array>
2727
<key>MinimumOSVersion</key>
28-
<string>8.0</string>
28+
<string>9.0</string>
2929
</dict>
3030
</plist>

packages/camera/camera/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
505505
GCC_WARN_UNUSED_FUNCTION = YES;
506506
GCC_WARN_UNUSED_VARIABLE = YES;
507-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
507+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
508508
MTL_ENABLE_DEBUG_INFO = YES;
509509
ONLY_ACTIVE_ARCH = YES;
510510
SDKROOT = iphoneos;
@@ -554,7 +554,7 @@
554554
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
555555
GCC_WARN_UNUSED_FUNCTION = YES;
556556
GCC_WARN_UNUSED_VARIABLE = YES;
557-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
557+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
558558
MTL_ENABLE_DEBUG_INFO = NO;
559559
SDKROOT = iphoneos;
560560
TARGETED_DEVICE_FAMILY = "1,2";

packages/camera/camera/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the camera plugin.
33
publish_to: none
44

55
environment:
6-
sdk: ">=2.12.0 <3.0.0"
7-
flutter: ">=1.22.0"
6+
sdk: ">=2.14.0 <3.0.0"
7+
flutter: ">=2.5.0"
88

99
dependencies:
1010
camera:

packages/camera/camera/ios/camera.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ A Flutter plugin to use the camera from your Flutter app.
1717
s.public_header_files = 'Classes/**/*.h'
1818
s.dependency 'Flutter'
1919

20-
s.platform = :ios, '8.0'
20+
s.platform = :ios, '9.0'
2121
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
2222
end

packages/camera/camera/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: A Flutter plugin for getting information about and controlling the
44
and streaming image buffers to dart.
55
repository: https://github.com/flutter/plugins/tree/master/packages/camera/camera
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
7-
version: 0.9.2+2
7+
version: 0.9.3
88

99
environment:
10-
sdk: ">=2.12.0 <3.0.0"
11-
flutter: ">=2.0.0"
10+
sdk: ">=2.14.0 <3.0.0"
11+
flutter: ">=2.5.0"
1212

1313
flutter:
1414
plugin:

packages/video_player/video_player/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.2.0
2+
3+
* Add `contentUri` based VideoPlayerController.
4+
15
## 2.1.15
26

37
* Ensured seekTo isn't called before video player is initialized. Fixes [#89259](https://github.com/flutter/flutter/issues/89259).

packages/video_player/video_player/lib/video_player.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,21 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
222222
httpHeaders = const {},
223223
super(VideoPlayerValue(duration: Duration.zero));
224224

225+
/// Constructs a [VideoPlayerController] playing a video from a contentUri.
226+
///
227+
/// This will load the video from the input content-URI.
228+
/// This is supported on Android only.
229+
VideoPlayerController.contentUri(Uri contentUri,
230+
{this.closedCaptionFile, this.videoPlayerOptions})
231+
: assert(defaultTargetPlatform == TargetPlatform.android,
232+
'VideoPlayerController.contentUri is only supported on Android.'),
233+
dataSource = contentUri.toString(),
234+
dataSourceType = DataSourceType.contentUri,
235+
package = null,
236+
formatHint = null,
237+
httpHeaders = const {},
238+
super(VideoPlayerValue(duration: Duration.zero));
239+
225240
/// The URI to the video file. This will be in different formats depending on
226241
/// the [DataSourceType] of the original video.
227242
final String dataSource;
@@ -298,6 +313,12 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
298313
uri: dataSource,
299314
);
300315
break;
316+
case DataSourceType.contentUri:
317+
dataSourceDescription = DataSource(
318+
sourceType: DataSourceType.contentUri,
319+
uri: dataSource,
320+
);
321+
break;
301322
}
302323

303324
if (videoPlayerOptions?.mixWithOthers != null) {

packages/video_player/video_player/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter
33
widgets on Android, iOS, and web.
44
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
6-
version: 2.1.15
6+
version: 2.2.0
77

88
environment:
99
sdk: ">=2.12.0 <3.0.0"
@@ -24,7 +24,7 @@ dependencies:
2424
flutter:
2525
sdk: flutter
2626
meta: ^1.3.0
27-
video_player_platform_interface: ^4.1.0
27+
video_player_platform_interface: ^4.2.0
2828
# The design on https://flutter.dev/go/federated-plugins was to leave
2929
# this constraint as "any". We cannot do it right now as it fails pub publish
3030
# validation, so we set a ^ constraint. The exact value doesn't matter since

packages/video_player/video_player/test/video_player_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,15 @@ void main() {
284284
});
285285
});
286286

287+
test('contentUri', () async {
288+
final VideoPlayerController controller =
289+
VideoPlayerController.contentUri(Uri.parse('content://video'));
290+
await controller.initialize();
291+
292+
expect(fakeVideoPlayerPlatform.dataSourceDescriptions[0].uri,
293+
'content://video');
294+
});
295+
287296
test('dispose', () async {
288297
final VideoPlayerController controller = VideoPlayerController.network(
289298
'https://127.0.0.1',

packages/video_player/video_player_platform_interface/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.2.0
2+
3+
* Add `contentUri` to `DataSourceType`.
4+
15
## 4.1.0
26

37
* Add `httpHeaders` to `DataSource`
@@ -29,7 +33,7 @@
2933

3034
## 2.1.0
3135

32-
* Add VideoPlayerOptions with audo mix mode
36+
* Add VideoPlayerOptions with audio mix mode
3337

3438
## 2.0.2
3539

packages/video_player/video_player_platform_interface/lib/method_channel_video_player.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class MethodChannelVideoPlayer extends VideoPlayerPlatform {
4242
case DataSourceType.file:
4343
message.uri = dataSource.uri;
4444
break;
45+
case DataSourceType.contentUri:
46+
message.uri = dataSource.uri;
47+
break;
4548
}
4649

4750
TextureMessage response = await _api.create(message);

packages/video_player/video_player_platform_interface/lib/video_player_platform_interface.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ enum DataSourceType {
196196

197197
/// The video was loaded off of the local filesystem.
198198
file,
199+
200+
/// The video is available via contentUri. Android only.
201+
contentUri,
199202
}
200203

201204
/// The file format of the given video.

packages/video_player/video_player_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/video_player
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 4.1.0
7+
version: 4.2.0
88

99
environment:
1010
sdk: ">=2.12.0 <3.0.0"

packages/video_player/video_player_web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.4
2+
3+
* Adopt `video_player_platform_interface` 4.2 and opt out of `contentUri` data source.
4+
15
## 2.0.3
26

37
* Add `implements` to pubspec.

packages/video_player/video_player_web/example/integration_test/video_player_web_test.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ void main() {
6868
throwsUnimplementedError);
6969
});
7070

71+
testWidgets('cannot create from content URI', (WidgetTester tester) async {
72+
expect(
73+
VideoPlayerPlatform.instance.create(
74+
DataSource(
75+
sourceType: DataSourceType.contentUri,
76+
uri: 'content://video',
77+
),
78+
),
79+
throwsUnimplementedError);
80+
});
81+
7182
testWidgets('can dispose', (WidgetTester tester) async {
7283
expect(VideoPlayerPlatform.instance.dispose(await textureId), completes);
7384
});

packages/video_player/video_player_web/lib/video_player_web.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ class VideoPlayerPlugin extends VideoPlayerPlatform {
8888
case DataSourceType.file:
8989
return Future.error(UnimplementedError(
9090
'web implementation of video_player cannot play local files'));
91+
case DataSourceType.contentUri:
92+
return Future.error(UnimplementedError(
93+
'web implementation of video_player cannot play content uri'));
9194
}
9295

9396
final _VideoPlayer player = _VideoPlayer(

packages/video_player/video_player_web/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_web
22
description: Web platform implementation of video_player.
33
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player_web
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.0.3
5+
version: 2.0.4
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
@@ -22,7 +22,7 @@ dependencies:
2222
flutter_web_plugins:
2323
sdk: flutter
2424
meta: ^1.3.0
25-
video_player_platform_interface: ^4.0.0
25+
video_player_platform_interface: ^4.2.0
2626

2727
dev_dependencies:
2828
flutter_test:

packages/webview_flutter/webview_flutter/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.0.13
22

3+
* Send URL of File to download to the NavigationDelegate on Android just like it is already done on iOS.
34
* Updated Android lint settings.
45
* Enable native double-tap to zoom, and pinch to zoom functionality on Android
56

0 commit comments

Comments
 (0)