Skip to content

Commit 7efb5e8

Browse files
[video_player] Add compatibility with the current platform interface (flutter#6855)
* Relax version constraints * Update app-facing * Version bumps
1 parent abc9f9a commit 7efb5e8

File tree

12 files changed

+33
-28
lines changed

12 files changed

+33
-28
lines changed

packages/video_player/video_player/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.4.10
2+
3+
* Adds compatibilty with version 6.0 of the platform interface.
4+
15
## 2.4.9
26

37
* Fixes file URI construction.

packages/video_player/video_player/pubspec.yaml

+2-2
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/main/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.4.9
6+
version: 2.4.10
77

88
environment:
99
sdk: ">=2.14.0 <3.0.0"
@@ -25,7 +25,7 @@ dependencies:
2525
html: ^0.15.0
2626
video_player_android: ^2.3.5
2727
video_player_avfoundation: ^2.2.17
28-
video_player_platform_interface: ^5.1.1
28+
video_player_platform_interface: ">=5.1.1 <7.0.0"
2929
video_player_web: ^2.0.0
3030

3131
dev_dependencies:

packages/video_player/video_player/test/video_player_test.dart

+12-14
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ class _FakeClosedCaptionFile extends ClosedCaptionFile {
106106
}
107107

108108
void main() {
109+
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
110+
111+
setUp(() {
112+
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
113+
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
114+
});
115+
109116
void verifyPlayStateRespondsToLifecycle(
110117
VideoPlayerController controller, {
111118
required bool shouldPlayInBackground,
@@ -235,13 +242,6 @@ void main() {
235242
});
236243

237244
group('VideoPlayerController', () {
238-
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
239-
240-
setUp(() {
241-
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
242-
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
243-
});
244-
245245
group('initialize', () {
246246
test('started app lifecycle observing', () async {
247247
final VideoPlayerController controller = VideoPlayerController.network(
@@ -1015,13 +1015,6 @@ void main() {
10151015
});
10161016

10171017
group('VideoPlayerOptions', () {
1018-
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;
1019-
1020-
setUp(() {
1021-
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
1022-
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
1023-
});
1024-
10251018
test('setMixWithOthers', () async {
10261019
final VideoPlayerController controller = VideoPlayerController.network(
10271020
'https://127.0.0.1',
@@ -1160,6 +1153,11 @@ class FakeVideoPlayerPlatform extends VideoPlayerPlatform {
11601153
Future<void> setMixWithOthers(bool mixWithOthers) async {
11611154
calls.add('setMixWithOthers');
11621155
}
1156+
1157+
@override
1158+
Widget buildView(int textureId) {
1159+
return Texture(textureId: textureId);
1160+
}
11631161
}
11641162

11651163
/// This allows a value of type T or T? to be treated as a value of type T?.

packages/video_player/video_player_android/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 2.3.10
22

3+
* Adds compatibilty with version 6.0 of the platform interface.
34
* Fixes file URI construction in example.
45
* Updates code for new analysis options.
56
* Updates code for `no_leading_underscores_for_local_identifiers` lint.

packages/video_player/video_player_android/example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
# The example app is bundled with the plugin so we use a path dependency on
1717
# the parent directory to use the current plugin's version.
1818
path: ../
19-
video_player_platform_interface: ">=4.2.0 <6.0.0"
19+
video_player_platform_interface: ">=5.1.1 <7.0.0"
2020

2121
dev_dependencies:
2222
flutter_driver:

packages/video_player/video_player_android/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_android
22
description: Android implementation of the video_player plugin.
33
repository: https://github.com/flutter/plugins/tree/main/packages/video_player/video_player_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.3.9
5+
version: 2.3.10
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"
@@ -20,7 +20,7 @@ flutter:
2020
dependencies:
2121
flutter:
2222
sdk: flutter
23-
video_player_platform_interface: ^5.1.1
23+
video_player_platform_interface: ">=5.1.1 <7.0.0"
2424

2525
dev_dependencies:
2626
flutter_test:

packages/video_player/video_player_avfoundation/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 2.3.8
22

3+
* Adds compatibilty with version 6.0 of the platform interface.
34
* Fixes file URI construction in example.
45
* Updates code for new analysis options.
56
* Adds an integration test for a bug where the aspect ratios of some HLS videos are incorrectly inverted.

packages/video_player/video_player_avfoundation/example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
# The example app is bundled with the plugin so we use a path dependency on
1717
# the parent directory to use the current plugin's version.
1818
path: ../
19-
video_player_platform_interface: ">=4.2.0 <6.0.0"
19+
video_player_platform_interface: ">=4.2.0 <7.0.0"
2020

2121
dev_dependencies:
2222
flutter_driver:

packages/video_player/video_player_avfoundation/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_avfoundation
22
description: iOS implementation of the video_player plugin.
33
repository: https://github.com/flutter/plugins/tree/main/packages/video_player/video_player_avfoundation
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.3.7
5+
version: 2.3.8
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"
@@ -19,7 +19,7 @@ flutter:
1919
dependencies:
2020
flutter:
2121
sdk: flutter
22-
video_player_platform_interface: ">=4.2.0 <6.0.0"
22+
video_player_platform_interface: ">=4.2.0 <7.0.0"
2323

2424
dev_dependencies:
2525
flutter_test:

packages/video_player/video_player_web/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 2.0.13
22

3+
* Adds compatibilty with version 6.0 of the platform interface.
34
* Updates minimum Flutter version to 2.10.
45

56
## 2.0.12

packages/video_player/video_player_web/example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
flutter:
1010
sdk: flutter
1111
js: ^0.6.0
12-
video_player_platform_interface: ">=4.2.0 <6.0.0"
12+
video_player_platform_interface: ">=4.2.0 <7.0.0"
1313
video_player_web:
1414
path: ../
1515

packages/video_player/video_player_web/pubspec.yaml

+2-2
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/main/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.12
5+
version: 2.0.13
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
@@ -21,7 +21,7 @@ dependencies:
2121
sdk: flutter
2222
flutter_web_plugins:
2323
sdk: flutter
24-
video_player_platform_interface: ">=4.2.0 <6.0.0"
24+
video_player_platform_interface: ">=4.2.0 <7.0.0"
2525

2626
dev_dependencies:
2727
flutter_test:

0 commit comments

Comments
 (0)