[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[video_player] Add compatibility with the current platform interface #6855

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/video_player/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.4.10

* Adds compatibilty with version 6.0 of the platform interface.

## 2.4.9

* Fixes file URI construction.
Expand Down
4 changes: 2 additions & 2 deletions packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter
widgets on Android, iOS, and web.
repository: https://github.com/flutter/plugins/tree/main/packages/video_player/video_player
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.4.9
version: 2.4.10

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -25,7 +25,7 @@ dependencies:
html: ^0.15.0
video_player_android: ^2.3.5
video_player_avfoundation: ^2.2.17
video_player_platform_interface: ^5.1.1
video_player_platform_interface: ">=5.1.1 <7.0.0"
video_player_web: ^2.0.0

dev_dependencies:
Expand Down
26 changes: 12 additions & 14 deletions packages/video_player/video_player/test/video_player_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ class _FakeClosedCaptionFile extends ClosedCaptionFile {
}

void main() {
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;

setUp(() {
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
});

void verifyPlayStateRespondsToLifecycle(
VideoPlayerController controller, {
required bool shouldPlayInBackground,
Expand Down Expand Up @@ -235,13 +242,6 @@ void main() {
});

group('VideoPlayerController', () {
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;

setUp(() {
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
});

group('initialize', () {
test('started app lifecycle observing', () async {
final VideoPlayerController controller = VideoPlayerController.network(
Expand Down Expand Up @@ -1015,13 +1015,6 @@ void main() {
});

group('VideoPlayerOptions', () {
late FakeVideoPlayerPlatform fakeVideoPlayerPlatform;

setUp(() {
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
});

test('setMixWithOthers', () async {
final VideoPlayerController controller = VideoPlayerController.network(
'https://127.0.0.1',
Expand Down Expand Up @@ -1160,6 +1153,11 @@ class FakeVideoPlayerPlatform extends VideoPlayerPlatform {
Future<void> setMixWithOthers(bool mixWithOthers) async {
calls.add('setMixWithOthers');
}

@override
Widget buildView(int textureId) {
return Texture(textureId: textureId);
}
}

/// This allows a value of type T or T? to be treated as a value of type T?.
Expand Down
3 changes: 2 additions & 1 deletion packages/video_player/video_player_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.3.10

* Adds compatibilty with version 6.0 of the platform interface.
* Fixes file URI construction in example.
* Updates code for new analysis options.
* Updates code for `no_leading_underscores_for_local_identifiers` lint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
video_player_platform_interface: ">=4.2.0 <6.0.0"
video_player_platform_interface: ">=5.1.1 <7.0.0"

dev_dependencies:
flutter_driver:
Expand Down
4 changes: 2 additions & 2 deletions packages/video_player/video_player_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_android
description: Android implementation of the video_player plugin.
repository: https://github.com/flutter/plugins/tree/main/packages/video_player/video_player_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.3.9
version: 2.3.10

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -20,7 +20,7 @@ flutter:
dependencies:
flutter:
sdk: flutter
video_player_platform_interface: ^5.1.1
video_player_platform_interface: ">=5.1.1 <7.0.0"

dev_dependencies:
flutter_test:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.3.8

* Adds compatibilty with version 6.0 of the platform interface.
* Fixes file URI construction in example.
* Updates code for new analysis options.
* Adds an integration test for a bug where the aspect ratios of some HLS videos are incorrectly inverted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
video_player_platform_interface: ">=4.2.0 <6.0.0"
video_player_platform_interface: ">=4.2.0 <7.0.0"

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

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -19,7 +19,7 @@ flutter:
dependencies:
flutter:
sdk: flutter
video_player_platform_interface: ">=4.2.0 <6.0.0"
video_player_platform_interface: ">=4.2.0 <7.0.0"

dev_dependencies:
flutter_test:
Expand Down
3 changes: 2 additions & 1 deletion packages/video_player/video_player_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.0.13

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

## 2.0.12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
flutter:
sdk: flutter
js: ^0.6.0
video_player_platform_interface: ">=4.2.0 <6.0.0"
video_player_platform_interface: ">=4.2.0 <7.0.0"
video_player_web:
path: ../

Expand Down
4 changes: 2 additions & 2 deletions packages/video_player/video_player_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_web
description: Web platform implementation of video_player.
repository: https://github.com/flutter/plugins/tree/main/packages/video_player/video_player_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.0.12
version: 2.0.13

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -21,7 +21,7 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
video_player_platform_interface: ">=4.2.0 <6.0.0"
video_player_platform_interface: ">=4.2.0 <7.0.0"

dev_dependencies:
flutter_test:
Expand Down