Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update app-facing
  • Loading branch information
stuartmorgan-g committed Dec 16, 2022
commit 568a4523937a89ba354c71f9058cf80eb81c3bf3
2 changes: 1 addition & 1 deletion packages/video_player/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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