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 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
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.1.0

* Adds `allowBackgroundPlayback` to `VideoPlayerOptions`.

## 5.0.2

* Adds the Pigeon definitions used to create the method channel implementation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,14 @@ class VideoPlayerOptions {
// in all of the other video player packages, fix this, and then update
// the other packages to use const.
// ignore: prefer_const_constructors_in_immutables
VideoPlayerOptions({this.mixWithOthers = false});
VideoPlayerOptions({
this.mixWithOthers = false,
this.allowBackgroundPlayback = false,
});

/// Set this to true to keep playing video in background, when app goes in background.
/// The default value is false.
final bool allowBackgroundPlayback;

/// Set this to true to mix the video players audio with other audio sources.
/// The default value is false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/video_player/v
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 5.0.2
version: 5.1.0

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:video_player_platform_interface/video_player_platform_interface.dart';

void main() {
test(
'VideoPlayerOptions allowBackgroundPlayback defaults to false',
() {
final VideoPlayerOptions options = VideoPlayerOptions();
expect(options.allowBackgroundPlayback, false);
},
);
test(
'VideoPlayerOptions mixWithOthers defaults to false',
() {
final VideoPlayerOptions options = VideoPlayerOptions();
expect(options.mixWithOthers, false);
},
);
}